Skip to content

Commit a5ef486

Browse files
committed
chromium_ec: Add support for EC_CMD_PSU_CONTROL
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 922bbc5 commit a5ef486

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

framework_lib/src/chromium_ec/command.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ pub enum EcCommands {
9898
GetGpuSerial = 0x3E1D,
9999
/// Set gpu bay serial and program structure
100100
ProgramGpuEeprom = 0x3E1F,
101+
/// Enable/disable force on the PSU in standby mode
102+
PsuControl = 0x3E28,
101103
}
102104

103105
pub trait EcRequest<R> {

framework_lib/src/chromium_ec/commands.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,3 +1155,20 @@ impl EcRequest<EcResponseSetGpuSerial> for EcRequestSetGpuSerial {
11551155
EcCommands::ProgramGpuEeprom
11561156
}
11571157
}
1158+
1159+
#[repr(C, packed)]
1160+
pub struct EcRequestPsuControl {
1161+
pub force_enable_in_standby: u8,
1162+
}
1163+
1164+
#[repr(C, packed)]
1165+
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
1166+
pub struct EcResponsePsuControl {
1167+
pub force_enable_in_standby: u8,
1168+
}
1169+
1170+
impl EcRequest<EcResponsePsuControl> for EcRequestPsuControl {
1171+
fn command_id() -> EcCommands {
1172+
EcCommands::PsuControl
1173+
}
1174+
}

0 commit comments

Comments
 (0)