2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/platform/x86/amd/pmf
Shyam Sundar S K 78296429e2
platform/x86/amd/pmf: Fix to Update HPD Data When ALS is Disabled
If the Ambient Light Sensor (ALS) is disabled, the current code in the PMF
driver does not query for Human Presence Detection (HPD) data in
amd_pmf_get_sensor_info(). As a result, stale HPD data is used by PMF-TA
to evaluate policy conditions, leading to unexpected behavior in the policy
output actions.

To resolve this issue, modify the PMF driver to query HPD data
independently of ALS.

Since user_present is a boolean, modify the current code to return true if
the user is present and false if the user is away or if the sensor is not
detected, and report this status to the PMF TA firmware accordingly.

With this change, amd_pmf_get_sensor_info() now returns void instead of
int.

Fixes: cedecdba60 ("platform/x86/amd/pmf: Get ambient light information from AMD SFH driver")
Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20240730142316.3846259-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2024-08-08 14:53:35 +03:00
..
acpi.c platform/x86/amd: pmf: Add infrastructure for quirking supported funcs 2024-04-16 15:17:31 +03:00
auto-mode.c platform/x86/amd/pmf: Add PMF debug facilities 2023-05-15 15:18:03 +02:00
cnqf.c platform/x86/amd/pmf: Use str_on_off() helper 2023-08-21 15:20:28 +02:00
core.c platform/x86/amd/pmf: Add new ACPI ID AMDI0107 2024-07-30 15:35:10 +03:00
Kconfig platform/x86/amd/pmf: Get Human presence information from AMD SFH driver 2024-01-26 20:09:41 +01:00
Makefile platform/x86/amd: pmf: Add infrastructure for quirking supported funcs 2024-04-16 15:17:31 +03:00
pmf-quirks.c platform/x86/amd: pmf: Add quirk for ROG Ally X 2024-07-30 15:29:35 +03:00
pmf.h platform/x86/amd/pmf: Use existing input event codes to update system states 2024-07-11 10:41:48 +03:00
spc.c platform/x86/amd/pmf: Fix to Update HPD Data When ALS is Disabled 2024-08-08 14:53:35 +03:00
sps.c platform/x86/amd/pmf: Update sps power thermals according to the platform-profiles 2024-03-12 12:48:34 +02:00
tee-if.c platform/x86/amd/pmf: Use existing input event codes to update system states 2024-07-11 10:41:48 +03:00