Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions src/asynchronous/internal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,17 @@ impl<B: I2c> Tps6699x<B> {
.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<registers::field_sets::TbtConfig, Error<B::Error>> {
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<B::Error>> {
let mut control = self.get_port_control(port).await?;
Expand Down