diff --git a/device.yaml b/device.yaml index 44ea408..e0026a9 100644 --- a/device.yaml +++ b/device.yaml @@ -1155,6 +1155,15 @@ DpConfig: Usb: 0x0 Dp: 0x1 Reserved: catch_all + UsbDataPath: + base: uint + start: 15 + end: 16 + description: USB data path support. + conversion: + name: DpUsbDataPath + MayBeRequired: 0x0 + NotRequired: 0x1 DfpdPinAssignment: base: uint start: 16 @@ -1324,6 +1333,15 @@ TbtConfig: base: bool start: 49 description: Assert this bit to enable TBT auto-entry. + UsbDataPath: + base: uint + start: 54 + end: 55 + description: USB data path support. + conversion: + name: TbtUsbDataPath + MayBeRequired: 0x0 + NotRequired: 0x1 SourceVCONNDelay: base: uint start: 56 diff --git a/src/asynchronous/internal/mod.rs b/src/asynchronous/internal/mod.rs index 06c2882..7cecf2b 100644 --- a/src/asynchronous/internal/mod.rs +++ b/src/asynchronous/internal/mod.rs @@ -515,6 +515,17 @@ impl Tps6699x { .await } + /// Modify Tbt config settings + pub async fn modify_tbt_config( + &mut self, + port: LocalPortId, + f: impl FnOnce(&mut registers::field_sets::TbtConfig) -> registers::field_sets::TbtConfig, + ) -> Result> { + let port = self.borrow_port(port)?; + let mut registers = port.into_registers(); + registers.tbt_config().modify_async(|r| f(r)).await + } + /// Set unconstrained power on a port pub async fn set_unconstrained_power(&mut self, port: LocalPortId, enable: bool) -> Result<(), Error> { let mut control = self.get_port_control(port).await?;