Skip to content

Commit deb7c7a

Browse files
committed
--flash-gpu-descriptor: dry-run skip bay power control
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 628ac98 commit deb7c7a

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

  • framework_lib/src/chromium_ec

framework_lib/src/chromium_ec/mod.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,15 +1356,20 @@ impl CrosEc {
13561356
if let Ok(ExpansionBayBoard::DualInterposer) = info.expansion_bay_board() {
13571357
// If bay power is on already, we don't need to enable/disable it
13581358
if !self.get_gpio("gpu_3v_5v_en")? {
1359-
// Force power to the GPU if we are writing the EEPROM
1360-
let res = self.set_gpio("gpu_3v_5v_en", true);
1361-
if let Err(err) = res {
1362-
error!("Failed to set ALW power to GPU on {:?}", err);
1363-
return Err(err);
1359+
println!("Expansion Bay Power is Off");
1360+
if dry_run {
1361+
println!("Forcing Power to Expansion Bay (skip - dry-run)");
1362+
} else {
1363+
// Force power to the GPU if we are writing the EEPROM
1364+
let res = self.set_gpio("gpu_3v_5v_en", true);
1365+
if let Err(err) = res {
1366+
error!("Failed to set ALW power to GPU on {:?}", err);
1367+
return Err(err);
1368+
}
1369+
println!("Forcing Power to Expansion Bay");
1370+
os_specific::sleep(100_000);
1371+
force_power = true;
13641372
}
1365-
println!("Forcing Power to GPU");
1366-
os_specific::sleep(100_000);
1367-
force_power = true;
13681373
}
13691374
}
13701375

0 commit comments

Comments
 (0)