Re: [PATCH 1/2] dt-bindings: iio: light: Add AMS TCS3472 and TCS3400
From: Krzysztof Kozlowski
Date: Sat Oct 17 2026 - 03:58:20 EST
On 17/10/2026 02:36, Jonathan Cameron wrote:
>>> +properties:
>>> + compatible:
>>> + enum:
>>> + - ams,tcs3400
>>> + - ams,tcs3472
>>
>> Your driver cod suggests these are compatible, so it should be expressed.
>
> That's only true because this driver hard rejects a whoami mismatch
> which is something we shouldn't really be doing. If we do a look
> up in driver and fail to match we should be using the data associated with
> the ID that the fallback compatible would have had.
>
> Our old fun of what should we do about fallback compatibles and
> devices with ID registers. Some of which (in this driver) are actually
> compatible with each other and some of which are not (in the sense
> that the match the WHOAMI and do different things depending on that
> matching).
>
> I still prefer that we never claim devices that need different
> handling are compatible (even if detectable) because of that prevents
> new drop in parts being used (as they normally have different whoami
> values even as supposedly drop in replacements).
>
> I don't mind enough to argue much about it however.
> Note that before this series all the supported parts were actually
> compatible and the only difference was a print on the id match. So
> if this patch hadn't turned up an I'd noticed, I have simply
> deleted the error return.
In such case lack of compatibility should be very briefly explained in
the commit msg or description in binding.
Best regards,
Krzysztof