]> www.infradead.org Git - users/jedix/linux-maple.git/commit
HID: amd_sfh: Allow configuring whether HPD is enabled or disabled
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 28 Feb 2025 16:31:51 +0000 (10:31 -0600)
committerJiri Kosina <jkosina@suse.com>
Tue, 4 Mar 2025 20:49:32 +0000 (21:49 +0100)
commite38764f6dbb39c57615d7fb82152c4166e48f25e
treef3bd7f1e7a1b1a175ecc81a0d698a46743c1d249
parent58c9bf3363e596d744f56616d407278ef5f97f5a
HID: amd_sfh: Allow configuring whether HPD is enabled or disabled

Human presence detection (HPD) sensor uses a camera to determine when
user is physically in front of the machine.  This might not be a
desirable behavior because it can (for example) cause the machine to
wake on approach.

Add a new sysfs file "hpd" that will control whether this sensor is
enabled. Use the value of this sysfs file to turn off HPD and prevent
it from re-enabling after resume from suspend.

Cc: Pratap Nirujogi <pratap.nirujogi@amd.com>
Tested-by: Anson Tsao <anson.tsao@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Documentation/ABI/testing/sysfs-driver-amd-sfh [new file with mode: 0644]
drivers/hid/amd-sfh-hid/amd_sfh_common.h
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c
drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.h