diff options
author | Basavaraj Natikar <Basavaraj.Natikar@amd.com> | 2021-06-18 13:48:38 +0530 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2021-06-24 14:28:03 +0200 |
commit | 24a31ea94922d391a96a9dd0a9a830de65423817 (patch) | |
tree | 3f566b555d1a75475d80d7f15049d4e0a3412078 /drivers/hid/amd-sfh-hid/amd_sfh_pcie.h | |
parent | 0aad9c95eb9a2b086322e28ae2e58ad25598604e (diff) | |
download | linux-24a31ea94922d391a96a9dd0a9a830de65423817.tar.gz linux-24a31ea94922d391a96a9dd0a9a830de65423817.tar.bz2 linux-24a31ea94922d391a96a9dd0a9a830de65423817.zip |
HID: amd_sfh: Add initial support for HPD sensor
Add Human Presence Detection (HPD) sensors support
on AMD next generation HPD supported platforms.
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Reviewed-by: Nehal Shah <nehal-bakulchandra.shah@amd.com>
Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/amd-sfh-hid/amd_sfh_pcie.h')
-rw-r--r-- | drivers/hid/amd-sfh-hid/amd_sfh_pcie.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h index 0886b2ad033e..2d5c57e3782d 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h @@ -30,6 +30,8 @@ #define V2_STATUS 0x2 +#define HPD_IDX 16 + /* SFH Command register */ union sfh_cmd_base { u32 ul; @@ -92,6 +94,18 @@ enum mem_use_type { USE_C2P_REG, }; +struct hpd_status { + union { + struct { + u32 human_presence_report : 4; + u32 human_presence_actual : 4; + u32 probablity : 8; + u32 object_distance : 16; + } shpd; + u32 val; + }; +}; + void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info); void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx); void amd_stop_all_sensors(struct amd_mp2_dev *privdata); |