[PATCH] dt-bindings: mmc: fsl-imx-esdhc: allow more compatible combinations

Rob Herring robh at kernel.org
Sun Jan 8 14:46:33 PST 2023


On Sat, Jan 07, 2023 at 04:54:57PM +0100, Andreas Kemnade wrote:
> On Sat, 7 Jan 2023 16:07:35 +0100
> Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org> wrote:
> 
> > On 07/01/2023 16:01, Andreas Kemnade wrote:
> > > On Sat, 7 Jan 2023 15:09:24 +0100
> > > Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org> wrote:
> > >   
> > >> On 07/01/2023 15:07, Andreas Kemnade wrote:  
> > >>> On Sat, 7 Jan 2023 15:00:56 +0100
> > >>> Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org> wrote:
> > >>>
> > >>> [...]    
> > >>>>>> I asked to remove half-compatible. Not to enforce.
> > >>>>>>      
> > >>> so you are saying that allowing
> > >>> compatible = "A", "B" 
> > >>> is not ok, if B is not fully compatible. I agree with that
> > >>> one.    
> > >>
> > >> I did not say that. It's not related to this problem.
> > >>  
> > > You said "I asked to remove half-compatible" that means to me
> > > remove "B" if not fully compatible with A which sounds sane to me.
> > >   
> > >> Again - you cannot have device which is and is not compatible with
> > >> something else. It's not a Schroedinger's cat to be in two states,
> > >> unless you explicitly document the cases (there are exception). If this
> > >> is such exception, it requires it's own documentation.
> > >>  
> > > so conclusion:
> > > If having A and B half-compatible with A:
> > > 
> > > compatible = "A" only: is allowed to specifiy it the binding (status quo),
> > >   but not allowed to make the actual dtsi match the binding documentation
> > >   https://lore.kernel.org/linux-devicetree/72e1194e10ccb4f87aed96265114f0963e805092.camel@pengutronix.de/
> > >   and
> > >   https://lore.kernel.org/linux-devicetree/20210924091439.2561931-5-andreas@kemnade.info/
> > > 
> > > compatible = "A", "B" in the binding definition: is not allowed ("I asked to remove
> > >    half-compatible" (= removing B))  
> > 
> > No, half compatible is the A in such case.
> > 
> I think that there is some misunderstanding in here. I try once again.
> 
> Define compatible with "X" here:
> To me it means:
> 
> device fully works with flags defined in:
> 
> static const struct esdhc_soc_data usdhc_X_data = { ... };
> 
> with usdhc_X_data referenced in
>         { .compatible = "X", .data = &usdhc_X_data, },
> 
> 
> So if there is only "A" matching with above definition of compatibility
>   compatible = "A" would sound sane to me.
> 
> And scrutinizing the flags more and not just wanting to achieve error-free
> dtbs_check, I think is this in most cases where there is only "A". 
> 
> If there is "A" and "B" which match that compatibility definition, you
> say that only compatible = "A", "B" is allowed, but not compatible = "A".
> In that case I would have no problem with that.
> 
> But if there is only "A" but no "B" matching the above definition, I would expect
> that only compatible = "A" is allowed but *not* compatible = "A", "B".

A is either compatible with B or it isn't. You can look at that from 
the h/w perspective and client/OS perspective. From the h/w side, is the 
h/w interface the same or only has additions which can be ignored? On 
the client side, the question is whether a client that only understands 
B could use A's h/w without change. Looking at the match data is a 
good indicator of that for Linux. It's also possible the answer is 
different for different clients, but we only need 1 client that could 
benefit from compatibility.

Rob



More information about the linux-arm-kernel mailing list