On 2023-12-15 08:01:59-0800, Srinivas Pandruvada wrote:
With the commit ee3710f39f9d ("iio: hid-sensor-als: Add light chromaticity support"), there is an assumption that the every HID ALS descriptor has support of usage ids for chromaticity support. If they are not present, probe fails for the driver . This breaks ALS functionality on majority of platforms.
It is possible that chromaticity usage ids are not present. When not present, restrict number of IIO channels to not include support for chromaticity and continue.
Fixes: ee3710f39f9d ("iio: hid-sensor-als: Add light chromaticity support") Reported-by: Thomas Weißschuh thomas@t-8ch.de Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218223 Signed-off-by: Srinivas Pandruvada srinivas.pandruvada@linux.intel.com Cc: stable@vger.kernel.org
drivers/iio/light/hid-sensor-als.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
Thanks!
Tested-by: Thomas Weißschuh linux@weissschuh.net # on Framework 13 AMD