diff options
| author | Basavaraj Natikar <Basavaraj.Natikar@amd.com> | 2026-08-03 23:22:28 +0530 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-08-14 14:43:46 +0200 |
| commit | f797387307c2c33ca251c3ac1665bb15c663612f (patch) | |
| tree | 4ec3056d80df8473996f9b1680dbe80e8a9a60c3 /include | |
| parent | c57016bcf6d0b57cda5579e5d6856bd9bbe52a77 (diff) | |
| download | linux-f797387307c2c33ca251c3ac1665bb15c663612f.tar.gz linux-f797387307c2c33ca251c3ac1665bb15c663612f.zip | |
HID: amd_sfh: Add accessor to read the operating-mode sensor
Allow other drivers to query the operating mode (laptop or tablet)
reported by the Sensor Fusion Hub. This is the interface used by the
tablet-mode switch driver to report the device posture to userspace.
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/amd-pmf-io.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/amd-pmf-io.h b/include/linux/amd-pmf-io.h index 55198d2875cc..dc59c43bd8f2 100644 --- a/include/linux/amd-pmf-io.h +++ b/include/linux/amd-pmf-io.h @@ -19,11 +19,13 @@ * @MT_HPD: Message ID to know the Human presence info from MP2 FW * @MT_ALS: Message ID to know the Ambient light info from MP2 FW * @MT_SRA: Message ID to know the SRA data from MP2 FW + * @MT_OP_MODE: Message ID to know the operating-mode (tablet/laptop) info */ enum sfh_message_type { MT_HPD, MT_ALS, MT_SRA, + MT_OP_MODE, }; /** @@ -44,12 +46,24 @@ enum sfh_hpd_info { * @user_present: Populates the user presence information * @platform_type: Operating modes (clamshell, flat, tent, etc.) * @laptop_placement: Device states (ontable, onlap, outbag) + * @op_mode: Operating-mode field (see enum sfh_dev_mode); used for tablet detection */ struct amd_sfh_info { u32 ambient_light; u8 user_present; u32 platform_type; u32 laptop_placement; + u32 op_mode; +}; + +/** + * enum sfh_dev_mode - SFH operating-mode field (sfh_op_mode.mode, bits 0-2) + * @SFH_MODE_LAPTOP: Device is in laptop/clamshell posture + * @SFH_MODE_TABLET: Device is in tablet posture + */ +enum sfh_dev_mode { + SFH_MODE_LAPTOP = 1, + SFH_MODE_TABLET = 3, }; enum laptop_placement { |
