Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: gpio: Add imx scu gpio driver bindings

From: Krzysztof Kozlowski
Date: Wed Aug 10 2022 - 11:46:12 EST


On 10/08/2022 18:23, Shenwei Wang wrote:
>
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
>> Sent: Wednesday, August 10, 2022 9:46 AM
>> To: Shenwei Wang <shenwei.wang@xxxxxxx>; robh+dt@xxxxxxxxxx;
>> krzysztof.kozlowski+dt@xxxxxxxxxx; linus.walleij@xxxxxxxxxx; brgl@xxxxxxxx;
>> shawnguo@xxxxxxxxxx; s.hauer@xxxxxxxxxxxxxx; kernel@xxxxxxxxxxxxxx;
>> festevam@xxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>
>> Cc: devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-
>> gpio@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; imx@xxxxxxxxxxxxxxx
>> Subject: [EXT] Re: [PATCH v3 1/3] dt-bindings: gpio: Add imx scu gpio driver
>> bindings
>>
>> Caution: EXT Email
>>
>> On 10/08/2022 16:30, Shenwei Wang wrote:
>>> Add binding document for the imx scu gpio driver.
>>>
>>> Signed-off-by: Shenwei Wang <shenwei.wang@xxxxxxx>
>>> ---
>>> .../bindings/gpio/fsl,imx-sc-gpio.yaml | 40 +++++++++++++++++++
>>> +properties:
>>> + compatible:
>>> + enum:
>>> + - fsl,imx8qxp-sc-gpio
>>> + - fsl,imx-scu-gpio
>>
>>
>> This is too generic compatible and it even conflicts with the above...
>> Your driver binds to both without driver data which is even more confusing.
>> Make the compatible specific for one, given SoC.
>>
>
> Oh, that's my bad. It is a typo. The generic compatible should be "fsl,imx-sc-gpio".
> So far there is no driver data required for both imx8qxp and imx8dxl, but it might be
> required sometimes later in case the scu firmware is customized for a specified use case.
> That's why I put the generic one here.

That's not a proper reason to add generic one. Either all
implementations are compatible or not. If you are unsure, this should be
assumed as not and just use specific compatible. If you are 100% sure,
then use fallback, not two compatibles, and properly justify it.

Best regards,
Krzysztof