diff options
author | Basavaraj Natikar <Basavaraj.Natikar@amd.com> | 2023-12-20 10:00:42 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.com> | 2024-01-04 17:19:17 +0300 |
commit | 584f35a3647d42980af495fc0bc5c51eb174aa35 (patch) | |
tree | 330e1475772898a343eb0d34f2523182caae67a0 /drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | |
parent | b5b0774d53bb81bddbf8c609b3f183d4af6e91da (diff) | |
download | linux-584f35a3647d42980af495fc0bc5c51eb174aa35.tar.xz |
HID: amd_sfh: Add a new interface for exporting ALS data
AMDSFH has information about the Ambient light via the Ambient
Light Sensor (ALS) which is part of the AMD sensor fusion hub.
Add a new interface to export this information, where other drivers like
PMF can use this information to enhance user experiences.
Link: https://lore.kernel.org/all/ad064333-48a4-4cfa-9428-69e8a7c44667@redhat.com/
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Co-developed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c')
-rw-r--r-- | drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c index 0351b0fd394a..9dbe6f4cb294 100644 --- a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c +++ b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c @@ -77,6 +77,9 @@ static int amd_sfh_hid_client_deinit(struct amd_mp2_dev *privdata) case HPD_IDX: privdata->dev_en.is_hpd_present = false; break; + case ALS_IDX: + privdata->dev_en.is_als_present = false; + break; } if (cl_data->sensor_sts[i] == SENSOR_ENABLED) { @@ -188,6 +191,9 @@ static int amd_sfh1_1_hid_client_init(struct amd_mp2_dev *privdata) case HPD_IDX: privdata->dev_en.is_hpd_present = true; break; + case ALS_IDX: + privdata->dev_en.is_als_present = true; + break; } } dev_dbg(dev, "sid 0x%x (%s) status 0x%x\n", |