OpenCloudOS-Kernel/drivers/hid/amd-sfh-hid
Mario Limonciello 7bcfdab3f0 HID: amd_sfh: if no sensors are enabled, clean up
It was reported that commit b300667b33 ("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: b300667b33 ("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>
2023-02-06 11:00:36 +01:00
..
hid_descriptor HID: amd_sfh: Add descriptor operations in amd_mp2_ops 2022-07-21 13:43:58 +02:00
sfh1_1 HID: amd_sfh: Fix warning unwind goto 2023-01-06 16:06:05 +01:00
Kconfig
Makefile HID: amd_sfh: Implement SFH1.1 functionality 2022-07-21 13:44:04 +02:00
amd_sfh_client.c HID: amd_sfh: if no sensors are enabled, clean up 2023-02-06 11:00:36 +01:00
amd_sfh_common.h HID: amd_sfh: Implement SFH1.1 functionality 2022-07-21 13:44:04 +02:00
amd_sfh_hid.c HID: amd_sfh: Add NULL check for hid device 2022-07-21 13:43:58 +02:00
amd_sfh_hid.h HID: amd_sfh: if no sensors are enabled, clean up 2023-02-06 11:00:36 +01:00
amd_sfh_pcie.c HID: AMD_SFH: Add a DMI quirk entry for Chromebooks 2022-08-25 11:42:54 +02:00
amd_sfh_pcie.h HID: amd_sfh: Move global functions to static 2022-07-21 13:43:59 +02:00