diff options
| author | Pit Henrich <pithenrichmail@googlemail.com> | 2026-08-25 21:12:10 +0200 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2026-09-16 02:18:35 +0300 |
| commit | 8873641968ed5b3d825315baf627f9aebf592860 (patch) | |
| tree | 02ec34c539f58cab55d9f99488b857f92d3ec95c /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | 4cfc3631d4ca19199f7220c16b4a24204218e588 (diff) | |
platform/x86: thinkpad-acpi: Add X1 Fold keyboard attachment detection
ThinkPad X1 Fold 16 Gen 1 firmware reports whether the keyboard is
magnetically attached (on the screen), but thinkpad-acpi does not expose
this to userspace. The state can be obtained via ACPI methods: GDST (get
device state).
Add a read-only keyboard_attached_on_screen sysfs attribute, gated by
a DMI match.
Cache the state and emit a sysfs notification on
TP_HKEY_EV_TABLET_CHANGED (0x60c0) when it changes. Initialize the
cache during hotkey setup and refresh it before the resume notification
to keep the state consistent across suspend and resume.
Signed-off-by: Pit Henrich <pithenrich2d@gmail.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://patch.msgid.link/20260825191210.55090-1-pithenrich2d@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
