Skip to content

Commit 085da60

Browse files
committed
laptop13: Support input deck related commands
- Mostly update documentation - `--inputdeck-mode` already works as long as the host command is present - `--inputdeck` now attempts to use the host command to print the status Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 3f2deb2 commit 085da60

8 files changed

Lines changed: 17 additions & 11 deletions

File tree

EXAMPLES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ Options:
8080
--intrusion
8181
Show status of intrusion switch
8282
--inputdeck
83-
Show status of the input modules (Framework 16 only)
83+
Show status of the input modules
8484
--inputdeck-mode <INPUTDECK_MODE>
85-
Set input deck power mode [possible values: auto, off, on] (Framework 16 only) [possible values: auto, off, on]
85+
Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16) [possible values: auto, off, on]
8686
--expansion-bay
8787
Show status of the expansion bay (Framework 16 only)
8888
--charge-limit [<CHARGE_LIMIT>]

framework_lib/src/chromium_ec/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub enum EcCommands {
9090
PriavcySwitchesCheckMode = 0x3E14,
9191
/// Not used by this library
9292
ChassisCounter = 0x3E15,
93-
/// On Framework 16, check the status of the input module deck
93+
/// Check the status of the input module deck (Framework 13 and 16)
9494
CheckDeckState = 0x3E16,
9595
/// Not used by this library
9696
GetSimpleVersion = 0x3E17,

framework_lib/src/chromium_ec/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,12 @@ impl CrosEc {
674674

675675
println!("Input Deck");
676676
println!(" Chassis Closed: {}", !intrusion.currently_open);
677+
678+
if let Ok(status) = self.get_input_deck_status() {
679+
println!(" Deck State: {:?}", status.state);
680+
println!(" Touchpad present: {}", status.touchpad_present);
681+
}
682+
677683
println!(
678684
" Audio Daughterboard: {}",
679685
if let Some(audio) = audio {

framework_lib/src/commandline/clap_std.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ struct ClapCli {
163163
#[arg(long)]
164164
intrusion: bool,
165165

166-
/// Show status of the input modules (Framework 16 only)
166+
/// Show status of the input modules
167167
#[arg(long)]
168168
inputdeck: bool,
169169

170-
/// Set input deck power mode [possible values: auto, off, on] (Framework 16 only)
170+
/// Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16)
171171
#[arg(long)]
172172
inputdeck_mode: Option<InputDeckModeArg>,
173173

framework_lib/src/commandline/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@ Options:
18551855
--s0ix-counter Show S0ix counter
18561856
--intrusion Show status of intrusion switch
18571857
--inputdeck Show status of the input deck
1858-
--inputdeck-mode Set input deck power mode [possible values: auto, off, on] (Framework 16 only)
1858+
--inputdeck-mode Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16)
18591859
--expansion-bay Show status of the expansion bay (Framework 16 only)
18601860
--nvidia Show NVIDIA GPU information (Framework 16 only)
18611861
--charge-limit [<VAL>] Get or set battery charge limit (Percentage number as arg, e.g. '100')

framework_tool/completions/fish/framework_tool.fish

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ complete -c framework_tool -l flash-full-ec -d 'Flash full EC flash with new fir
2626
complete -c framework_tool -l flash-ec -d 'Flash EC (RO+RW) with new firmware from file - may render your hardware unbootable!' -r -F
2727
complete -c framework_tool -l flash-ro-ec -d 'Flash EC with new RO firmware from file - may render your hardware unbootable!' -r -F
2828
complete -c framework_tool -l flash-rw-ec -d 'Flash EC with new RW firmware from file' -r -F
29-
complete -c framework_tool -l inputdeck-mode -d 'Set input deck power mode [possible values: auto, off, on] (Framework 16 only)' -r -f -a "auto\t''
29+
complete -c framework_tool -l inputdeck-mode -d 'Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16)' -r -f -a "auto\t''
3030
off\t''
3131
on\t''"
3232
complete -c framework_tool -l charge-limit -d 'Get or set max charge limit' -r
@@ -87,7 +87,7 @@ complete -c framework_tool -l dp-hdmi-info -d 'Show details about connected DP o
8787
complete -c framework_tool -l audio-card-info -d 'Show details about connected Audio Expansion Cards (Needs root privileges)'
8888
complete -c framework_tool -l privacy -d 'Show privacy switch statuses (camera and microphone)'
8989
complete -c framework_tool -l intrusion -d 'Show status of intrusion switch'
90-
complete -c framework_tool -l inputdeck -d 'Show status of the input modules (Framework 16 only)'
90+
complete -c framework_tool -l inputdeck -d 'Show status of the input modules'
9191
complete -c framework_tool -l expansion-bay -d 'Show status of the expansion bay (Framework 16 only)'
9292
complete -c framework_tool -l stylus-battery -d 'Check stylus battery level (USI 2.0 stylus only)'
9393
complete -c framework_tool -l uptimeinfo

framework_tool/completions/zsh/_framework_tool

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ _framework_tool() {
3636
'--flash-ec=[Flash EC (RO+RW) with new firmware from file - may render your hardware unbootable!]:FLASH_EC:_files' \
3737
'--flash-ro-ec=[Flash EC with new RO firmware from file - may render your hardware unbootable!]:FLASH_RO_EC:_files' \
3838
'--flash-rw-ec=[Flash EC with new RW firmware from file]:FLASH_RW_EC:_files' \
39-
'--inputdeck-mode=[Set input deck power mode \[possible values\: auto, off, on\] (Framework 16 only)]:INPUTDECK_MODE:(auto off on)' \
39+
'--inputdeck-mode=[Set input deck power mode \[possible values\: auto, off, on\] (Framework 13 and 16)]:INPUTDECK_MODE:(auto off on)' \
4040
'--charge-limit=[Get or set max charge limit]::CHARGE_LIMIT:_default' \
4141
'*--charge-current-limit=[Set max charge current limit]:CHARGE_CURRENT_LIMIT:_default' \
4242
'*--charge-rate-limit=[Set max charge current limit]:CHARGE_RATE_LIMIT:_default' \
@@ -78,7 +78,7 @@ _framework_tool() {
7878
'--audio-card-info[Show details about connected Audio Expansion Cards (Needs root privileges)]' \
7979
'--privacy[Show privacy switch statuses (camera and microphone)]' \
8080
'--intrusion[Show status of intrusion switch]' \
81-
'--inputdeck[Show status of the input modules (Framework 16 only)]' \
81+
'--inputdeck[Show status of the input modules]' \
8282
'--expansion-bay[Show status of the expansion bay (Framework 16 only)]' \
8383
'--stylus-battery[Check stylus battery level (USI 2.0 stylus only)]' \
8484
'--uptimeinfo[]' \

support-matrices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
| `--privacy` | EC Communication | All Laptops |
4343
| `--intrusion` | EC Communication | All Laptops |
4444
| `--inputdeck` | EC Communication | All Laptops |
45-
| `--inputdeck-mode` | EC Communication | Framework 16 |
45+
| `--inputdeck-mode` | EC Communication | Framework 13, 16 |
4646
| `--console` | EC Communication | All |
4747
| `--get-gpio` | EC Communication | All |
4848
| `--kblight` | EC Communication | Framework 13 |

0 commit comments

Comments
 (0)