[PATCH RFC v2] dt-bindings: mmc: mmc-slot: make compatible property optional
Conor Dooley
conor at kernel.org
Fri Feb 7 08:03:14 PST 2025
On Fri, Feb 07, 2025 at 10:17:29AM +0100, neil.armstrong at linaro.org wrote:
> On 07/02/2025 10:02, Dharma.B at microchip.com wrote:
> > On 07/02/25 2:25 pm, Neil Armstrong wrote:
> > > EXTERNAL EMAIL: Do not click links or open attachments unless you know
> > > the content is safe
> > >
> > > On 05/02/2025 04:48, Dharma Balasubiramani wrote:
> > > > Remove the compatible property from the list of required properties and
> > > > mark it as optional.
> > > >
> > > > Signed-off-by: Dharma Balasubiramani <dharma.b at microchip.com>
> > > > ---
> > > > Changes in v2:
> > > > - Instead of moving the compatible string to the other binding, just
> > > > make it
> > > > optional (remove from required list).
> > > > - Link to v1: https://lore.kernel.org/r/20241219-mmc-slot-v1-1-
> > > > dfc747a3d3fb at microchip.com
> > > > ---
> > > > Documentation/devicetree/bindings/mmc/mmc-slot.yaml | 1 -
> > > > 1 file changed, 1 deletion(-)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/mmc/mmc-slot.yaml b/
> > > > Documentation/devicetree/bindings/mmc/mmc-slot.yaml
> > > > index 1f0667828063..ca3d0114bfc6 100644
> > > > --- a/Documentation/devicetree/bindings/mmc/mmc-slot.yaml
> > > > +++ b/Documentation/devicetree/bindings/mmc/mmc-slot.yaml
> > > > @@ -29,7 +29,6 @@ properties:
> > > > maxItems: 1
> > > >
> > > > required:
> > > > - - compatible
> > > > - reg
> > >
> > > If you remove it from here then it's still required in Documentation/
> > > devicetree/bindings/mmc/amlogic,meson-mx-sdio.yaml
> > > so please add it.
> >
> > If moving the compatible to its specific binding isn't appropriate (as
> > per Conor),
> > and if removing it from the required list here doesn’t seem reasonable
> > to you,
> > then adding an unnecessary compatible string in our DTS files doesn’t
> > make sense to me.
> >
> > What could be the solution then?
>
> The solution is right but you modify the meson-mx-sdio bindings, so
> simply add compatible in a required list for the slot node.
>
> Something like:
> ========================================================================
> diff --git a/Documentation/devicetree/bindings/mmc/amlogic,meson-mx-sdio.yaml b/Documentation/devicetree/bindings/mmc/amlogic,meson-mx-sdio.yaml
> index 022682a977c6..0d4d9ca6a8d9 100644
> --- a/Documentation/devicetree/bindings/mmc/amlogic,meson-mx-sdio.yaml
> +++ b/Documentation/devicetree/bindings/mmc/amlogic,meson-mx-sdio.yaml
> @@ -60,6 +60,9 @@ patternProperties:
> bus-width:
> enum: [1, 4]
>
> + required:
> + - compatible
> +
> unevaluatedProperties: false
>
> ========================================================================
>
> Conor, Is it right ?
Looks about right, ye.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20250207/fc9256a0/attachment.sig>
More information about the linux-amlogic
mailing list