CHROMIUM: iio: cros_ec_light: Fix illuminance assignment

Only the lower 8 bit of illuminance were copied from the EC fifo to
the sensor fifo. sysfs attributes are not affected.

Fixes: 93069b13d ("CHROMIUM: iio: cros_ec_light: Add FIFO support for RGB sensor)

BUG=chromium:946178,b:129419982,b:200969843
TEST=Before, looking at the iio fifo with od, we would get:
[tested on brya with all channels to return clear illuminance]
od -Ax -x -w16 /dev/iio\:device3
      |clea|red |gree|blue| timestamp         |
000000 00a5 0ea5 0ea5 0ea5 c45d 74a6 0075 0000
000010 00a2 0ea2 0ea2 0ea2 49c3 afc3 0075 0000
000020 00a1 0ea1 0ea1 0ea1 ba25 ead1 0075 0000
000030 00a3 0ea3 0ea3 0ea3 75b8 25eb 0076 0000
000040 00a9 0ea9 0ea9 0ea9 e65b 6105 0076 0000
000050 00a6 0ea6 0ea6 0ea6 cd53 9c2a 0076 0000
000060 00a4 0ea4 0ea4 0ea4 fe4a 1260 0077 0000
000070 00a3 0ea3 0ea3 0ea3 6cf7 8882 0077 0000

Clear illuminance, the first channel would be truncated.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Change-Id: I7503e71a1292458cc488ba94e1a18e99001f4b01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3181517
Reviewed-by: Cheng-Hao Yang <chenghaoyang@chromium.org>
(cherry picked from commit 7886945de9b694c426f847fc0dd4734f4fc5bcda)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3190240
1 file changed