diff options
author | Basavaraj Natikar <Basavaraj.Natikar@amd.com> | 2022-05-09 16:20:20 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-05-11 15:16:26 +0300 |
commit | b5d7f43e97dabfa04a4be5ff027ce7da119332be (patch) | |
tree | 87f93a3970cc9a1211c84f8b1db5d593f2d20695 /drivers/hid/amd-sfh-hid/amd_sfh_pcie.h | |
parent | 62f8857b2d082069b11851d1ae8ce101752436ee (diff) | |
download | linux-b5d7f43e97dabfa04a4be5ff027ce7da119332be.tar.xz |
HID: amd_sfh: Add support for sensor discovery
Sensor discovery status fails in case of broken sensors or
platform not supported. Hence disable driver on failure
of sensor discovery.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@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 | 4 |
1 files changed, 4 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 97b99861fae2..9aa88a91ac8d 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h @@ -39,6 +39,9 @@ #define AMD_SFH_IDLE_LOOP 200 +#define SENSOR_DISCOVERY_STATUS_MASK GENMASK(5, 3) +#define SENSOR_DISCOVERY_STATUS_SHIFT 3 + /* SFH Command register */ union sfh_cmd_base { u32 ul; @@ -143,5 +146,6 @@ struct amd_mp2_ops { int (*response)(struct amd_mp2_dev *mp2, u8 sid, u32 sensor_sts); void (*clear_intr)(struct amd_mp2_dev *privdata); int (*init_intr)(struct amd_mp2_dev *privdata); + int (*discovery_status)(struct amd_mp2_dev *privdata); }; #endif |