]> git.baikalelectronics.ru Git - kernel.git/commit
HID: amd_sfh: Add illuminance mask to limit ALS max value
authorBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Mon, 31 Jan 2022 17:18:33 +0000 (22:48 +0530)
committerJiri Kosina <jkosina@suse.cz>
Wed, 2 Feb 2022 14:04:26 +0000 (15:04 +0100)
commit7fda3c904b80fd6b082392e535d035da9a09fcfa
tree1ddcd96d3ecb3decc823deb097b07fc9b8024e0e
parent253846b10c7cf34f6b6d0ef7ff3ad50c7182854c
HID: amd_sfh: Add illuminance mask to limit ALS max value

ALS illuminance value present only in first 15 bits from SFH firmware
for V2 platforms. Hence added a mask of 15 bit to limit ALS max
illuminance values to get correct illuminance value.

Fixes: 87f79096f73f ("HID: amd_sfh: Extend ALS support for newer AMD platform")
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c