2022-08-10 15:53:15

by Krzysztof Kozlowski

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

On 10/08/2022 18:23, Shenwei Wang wrote:
>
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <[email protected]>
>> Sent: Wednesday, August 10, 2022 9:46 AM
>> To: Shenwei Wang <[email protected]>; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; dl-linux-imx <[email protected]>
>> Cc: [email protected]; [email protected]; linux-
>> [email protected]; [email protected]; [email protected]
>> 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 <[email protected]>
>>> ---
>>> .../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


2022-08-10 15:56:29

by Shenwei Wang

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



> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Wednesday, August 10, 2022 10:46 AM
> To: Shenwei Wang <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; dl-linux-imx <[email protected]>
> Cc: [email protected]; [email protected]; linux-
> [email protected]; [email protected]; [email protected]
> Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: gpio: Add imx scu gpio driver
> bindings
>
> Caution: EXT Email
>
> On 10/08/2022 18:23, Shenwei Wang wrote:
> >
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <[email protected]>
> >> Sent: Wednesday, August 10, 2022 9:46 AM
> >> To: Shenwei Wang <[email protected]>; [email protected];
> >> [email protected]; [email protected];
> >> [email protected]; [email protected]; [email protected];
> >> [email protected]; [email protected]; dl-linux-imx
> >> <[email protected]>
> >> Cc: [email protected]; [email protected]; linux-
> >> [email protected]; [email protected];
> >> [email protected]
> >> 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 <[email protected]>
> >>> ---
> >>> .../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.
>

Okay. I will only keep "fsl,imx8qxp-sc-gpio" for now.

Thanks,
Shenwei

> Best regards,
> Krzysztof