Re: [PATCH v3 2/2] iio: light: add ams OSRAM TCS3430 XYZ and ambient light sensor driver
From: Jonathan Cameron
Date: Fri Nov 27 2026 - 20:17:39 EST
On Fri, 27 Nov 2026 19:45:56 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Fri, Nov 27, 2026 at 09:12:50AM +0100, Robert Ijtsma via B4 Relay wrote:
> >
> > Add an IIO driver for the ams OSRAM TCS3430 ambient light and CIE 1931
> > XYZ tristimulus color sensor (found at I2C address 0x39 on devices such
> > as the Microsoft Surface Pro X).
> >
> > Unlike the older TAOS RGBC drivers (tcs3414, tcs3472) that use the 0x80
> > COMMAND-bit SMBus protocol and RGBC channels, and unlike the banked
> > MAZeT/JENCOLOR as73211 driver, the TCS3430 uses ams's direct-addressed
> > 0x80..0xdd register map and exposes Z, Y, IR1, and X tristimulus channels.
> >
> > The driver exposes:
> > - Illuminance (photopic Y channel) with raw counts and lux scale
> > - Modified intensity channels for X, Y, Z, and IR1
> > - Selectable scale and integration time via the IIO GTS helper across
> > 1x/4x/16x/64x/128x gain and 50.04/100.08/200.16/400.32 ms integration
> > time settings
> > - Regulator management and system sleep suspend/resume support
> >
> > Tested on Microsoft Surface Pro X SQ2 (SC8180X).
>
>
> There are a couple of nit-picks below, but overall LGTM, after addressing them
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>
> ...
>
> > +config TCS3430
> > + tristate "ams OSRAM TCS3430 ambient light and CIE 1931 XYZ sensor"
>
> This doesn't scale, but okay, I don't expect this kind of compatible devices
> appear in a volume, we may rephrase this later on.
>
> > + depends on I2C
> > + select IIO_GTS_HELPER
> > + select REGMAP_I2C
> > + help
> > + If you say yes here you get support for the ams OSRAM TCS3430
> > + ambient light and CIE 1931 XYZ tristimulus color sensor.
>
> Usually when it starts with more that a single vendor line of the devices
> the list of them is better as it's easier to tweak later on:
>
> If you say yes here you get support for the following sensors:
> - ams OSRAM TCS3430 ambient light
> - CIE 1931 XYZ tristimulus color
Agree with general statement and perhaps only know this because of
a history with colour spaces: That second bit is a colour space in which
the ams OSRAM sensor presents its data, not another sensor.
Jonathan