From fcb1ba86e04d7be3fd902a4c761b2b2d78a9aff1 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 18 Jun 2025 14:13:37 +0800 Subject: [PATCH] --inputdeck: On FW16 also print sleep_l gpio state To help debug keyboard/EC issues it's useful to know what the state of that GPIO is. EC uses it to tell the keyboard about system sleep and lid state. ``` > framework_tool --inputdeck Chassis Closed: true Input Deck State: On Touchpad present: true SLEEP# GPIO high: true Positions: Pos 0: KeyboardA Pos 1: Disconnected Pos 2: Disconnected Pos 3: KeyboardB Pos 4: Disconnected ``` Signed-off-by: Daniel Schaefer --- EXAMPLES.md | 1 + framework_lib/src/chromium_ec/mod.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/EXAMPLES.md b/EXAMPLES.md index 61b4aac..2361b19 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -234,6 +234,7 @@ Input Deck Chassis Closed: true Input Deck State: On Touchpad present: true +SLEEP# GPIO high: true Positions: Pos 0: GenericC Pos 1: KeyboardA diff --git a/framework_lib/src/chromium_ec/mod.rs b/framework_lib/src/chromium_ec/mod.rs index 0adba41..ed1210e 100644 --- a/framework_lib/src/chromium_ec/mod.rs +++ b/framework_lib/src/chromium_ec/mod.rs @@ -603,9 +603,11 @@ impl CrosEc { pub fn print_fw16_inputdeck_status(&self) -> EcResult<()> { let intrusion = self.get_intrusion_status()?; let status = self.get_input_deck_status()?; + let sleep_l = self.get_gpio("sleep_l")?; println!("Chassis Closed: {}", !intrusion.currently_open); println!("Input Deck State: {:?}", status.state); println!("Touchpad present: {}", status.touchpad_present); + println!("SLEEP# GPIO high: {}", sleep_l); println!("Positions:"); println!(" Pos 0: {:?}", status.top_row.pos0); println!(" Pos 1: {:?}", status.top_row.pos1);