summaryrefslogtreecommitdiff
path: root/drivers/hid/amd-sfh-hid/amd_sfh_hid.h
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-02-04 01:08:49 +0300
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>2023-02-06 13:00:36 +0300
commit7bcfdab3f0c6672ca52be3cb65a0550d8b99554b (patch)
tree0a40184f4bbca1bd9f4a9d3f9af4d66b18bd4b13 /drivers/hid/amd-sfh-hid/amd_sfh_hid.h
parent690eb7dec72ae52d1d710d14a451844b4d0f4f19 (diff)
downloadlinux-7bcfdab3f0c6672ca52be3cb65a0550d8b99554b.tar.xz
HID: amd_sfh: if no sensors are enabled, clean up
It was reported that commit b300667b33b2 ("HID: amd_sfh: Disable the interrupt for all command") had caused increased resume time on HP Envy x360. Before this commit 3 sensors were reported, but they were not actually functional. After this commit the sensors are no longer reported, but also the resume time increased. To avoid this problem explicitly look for the number of disabled sensors. If all the sensors are disabled, clean everything up. Fixes: b300667b33b2 ("HID: amd_sfh: Disable the interrupt for all command") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2115 Reported-by: Xaver Hugl <xaver.hugl@gmail.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Link: https://lore.kernel.org/r/20230203220850.13924-1-mario.limonciello@amd.com Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Diffstat (limited to 'drivers/hid/amd-sfh-hid/amd_sfh_hid.h')
-rw-r--r--drivers/hid/amd-sfh-hid/amd_sfh_hid.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_hid.h b/drivers/hid/amd-sfh-hid/amd_sfh_hid.h
index 3754fb423e3a..528036892c9d 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_hid.h
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_hid.h
@@ -32,6 +32,7 @@ struct amd_input_data {
struct amdtp_cl_data {
u8 init_done;
u32 cur_hid_dev;
+ bool is_any_sensor_enabled;
u32 hid_dev_count;
u32 num_hid_devices;
struct device_info *hid_devices;