From: Rob Herring <robh@kernel.org>
To: Dharma.B@microchip.com
Cc: neil.armstrong@linaro.org, ulf.hansson@linaro.org,
krzk+dt@kernel.org, conor+dt@kernel.org, khilman@baylibre.com,
jbrunet@baylibre.com, martin.blumenstingl@googlemail.com,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC v2] dt-bindings: mmc: mmc-slot: make compatible property optional
Date: Tue, 11 Feb 2025 14:12:30 -0600 [thread overview]
Message-ID: <20250211201230.GA600687-robh@kernel.org> (raw)
In-Reply-To: <7de20917-3176-4e80-8ccd-9c01c037cc9a@microchip.com>
On Mon, Feb 10, 2025 at 05:28:27AM +0000, Dharma.B@microchip.com wrote:
> On 07/02/25 2:47 pm, neil.armstrong@linaro.org wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know
> > the content is safe
> >
> > On 07/02/2025 10:02, Dharma.B@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.
The diff tells us that. Please say why 'compatible' being required is a
problem and needs to not be required.
> >>>>
> >>>> Signed-off-by: Dharma Balasubiramani <dharma.b@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@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.
>
> Okay, we declare compatible as optional in the generic mmc-slot binding
> but make it required in the meson-mx-sdio binding, which inherits from it.
>
> So why not define the property directly in the meson-mx-sdio binding
> instead?
Because mmc-slot.yaml is designed to be complete (hence
"unevaluatedProperties: false"). There's at least 2 bindings which use
it (with "mmc-slot" compatible). Leaving it at least prevents folks from
coming up with their own random compatible strings for mmc-slot.
Rob
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Dharma.B@microchip.com
Cc: neil.armstrong@linaro.org, ulf.hansson@linaro.org,
krzk+dt@kernel.org, conor+dt@kernel.org, khilman@baylibre.com,
jbrunet@baylibre.com, martin.blumenstingl@googlemail.com,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC v2] dt-bindings: mmc: mmc-slot: make compatible property optional
Date: Tue, 11 Feb 2025 14:12:30 -0600 [thread overview]
Message-ID: <20250211201230.GA600687-robh@kernel.org> (raw)
In-Reply-To: <7de20917-3176-4e80-8ccd-9c01c037cc9a@microchip.com>
On Mon, Feb 10, 2025 at 05:28:27AM +0000, Dharma.B@microchip.com wrote:
> On 07/02/25 2:47 pm, neil.armstrong@linaro.org wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know
> > the content is safe
> >
> > On 07/02/2025 10:02, Dharma.B@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.
The diff tells us that. Please say why 'compatible' being required is a
problem and needs to not be required.
> >>>>
> >>>> Signed-off-by: Dharma Balasubiramani <dharma.b@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@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.
>
> Okay, we declare compatible as optional in the generic mmc-slot binding
> but make it required in the meson-mx-sdio binding, which inherits from it.
>
> So why not define the property directly in the meson-mx-sdio binding
> instead?
Because mmc-slot.yaml is designed to be complete (hence
"unevaluatedProperties: false"). There's at least 2 bindings which use
it (with "mmc-slot" compatible). Leaving it at least prevents folks from
coming up with their own random compatible strings for mmc-slot.
Rob
next prev parent reply other threads:[~2025-02-11 20:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 3:48 [PATCH RFC v2] dt-bindings: mmc: mmc-slot: make compatible property optional Dharma Balasubiramani
2025-02-05 3:48 ` Dharma Balasubiramani
2025-02-06 18:27 ` Conor Dooley
2025-02-06 18:27 ` Conor Dooley
2025-02-07 7:38 ` Dharma.B
2025-02-07 8:55 ` Neil Armstrong
2025-02-07 8:55 ` Neil Armstrong
2025-02-07 9:02 ` Dharma.B
2025-02-07 9:17 ` neil.armstrong
2025-02-07 9:17 ` neil.armstrong
2025-02-07 16:03 ` Conor Dooley
2025-02-07 16:03 ` Conor Dooley
2025-02-10 5:28 ` Dharma.B
2025-02-10 9:51 ` neil.armstrong
2025-02-10 9:51 ` neil.armstrong
2025-02-11 20:12 ` Rob Herring [this message]
2025-02-11 20:12 ` Rob Herring
2025-02-12 3:51 ` Dharma.B
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250211201230.GA600687-robh@kernel.org \
--to=robh@kernel.org \
--cc=Dharma.B@microchip.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.