Re: [PATCH] iio: light: vcnl4035: Fix swapped raw channel readings

From: Andy Shevchenko

Date: Fri Nov 13 2026 - 09:15:50 EST


On Fri, Nov 13, 2026 at 11:01:23AM +0000, Hungyu Lin wrote:
> The IIO_LIGHT channel has channel number 0 and the IIO_INTENSITY
> channel has channel number 1. vcnl4035_read_info_raw() selects the ALS
> register for a nonzero channel number, so in_illuminance_raw returns
> the white-channel sample and in_intensity_both_raw returns the ALS
> sample. This also causes the illuminance scale to be applied to a
> white-channel sample.
>
> Select the ALS data register for IIO_LIGHT and the white data register
> for the intensity channel.
>
> Fixes: 55707294c4eb ("iio: light: Add support for vishay vcnl4035")
> Link: https://www.vishay.com/docs/84251/vcnl4035x01.pdf

Make a Link tag with a reference: Link: $URL [1], and refer to that in the
commit message. Or make it a Datasheet tag. Otherwise intention of this
Link is odd.

--
With Best Regards,
Andy Shevchenko