Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Dharma.B@microchip.com
Cc: robh@kernel.org, conor+dt@kernel.org,
	linux-kernel@vger.kernel.org, alexandre.belloni@bootlin.com,
	devicetree@vger.kernel.org, Aubin.Constans@microchip.com,
	linux-mmc@vger.kernel.org, ulf.hansson@linaro.org,
	claudiu.beznea@tuxon.dev, krzk+dt@kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] dt-bindings: mmc: atmel,hsmci: Convert to json schema
Date: Fri, 6 Dec 2024 17:02:49 +0000	[thread overview]
Message-ID: <20241206-untoasted-ripening-83ecf98bc42f@spud> (raw)
In-Reply-To: <4e3a4154-9e05-40b4-961f-6d7e95ec0890@microchip.com>

[-- Attachment #1: Type: text/plain, Size: 2238 bytes --]

On Fri, Dec 06, 2024 at 05:16:39AM +0000, Dharma.B@microchip.com wrote:
> Hi Conor,
> 
> On 05/12/24 11:15 pm, Conor Dooley wrote:
> > On Thu, Dec 05, 2024 at 03:27:02PM +0530, Dharma Balasubiramani wrote:
> > 
> >> +patternProperties:
> >> +  "^slot@[0-9]+$":
> >> +    type: object
> >> +    description: A slot node representing an MMC, SD, or SDIO slot.
> >> +
> >> +    allOf:
> >> +      - $ref: mmc-controller.yaml
> >> +
> >> +    properties:
> >> +      reg:
> >> +        description: Slot ID.
> >> +        minimum: 0
> >> +
> >> +      bus-width:
> >> +        description: Number of data lines connected to the controller.
> >> +        enum: [1, 4, 8]
> >> +
> >> +      cd-gpios:
> >> +        description: GPIO used for card detection.
> >> +
> >> +      cd-inverted:
> >> +        type: boolean
> > This type conflicts with mmc-controller.yaml, it's a flag there.
> 
> Yes, I overlooked it. I'll simply remove the type here.
> 
> > 
> >> +        description: Inverts the value of the card detection GPIO.
> >> +
> >> +      wp-gpios:
> >> +        description: GPIO used for write protection.
> >> +
> >> +    required:
> >> +      - reg
> >> +      - bus-width
> >> +
> >> +    unevaluatedProperties: false
> > Do you mean additionalProperties: false here? You listed properties
> > contained in mmc-controller.yaml which makes it seem like you're
> > restricting to this subset rather than allowing all properties - but you
> > need additionalProperties: false to do that.
> 
> No, I'm not restricting the properties to this subset. There are 
> additional properties, such as "non-removable," "broken-cd," and 
> "disable-wp," that are used in our DTS files but are not defined in the 
> old text bindings. For this reason, I used `unevaluatedProperties: 
> false` instead of `additionalProperties: false`.

> Let me know if an 
> `allOf` reference to `mmc-controller` alone would be sufficient in this 
> context.

Yes, there's no point duplicating properties from there, unless you're
restricting to a subset. I think all you need to keep (other than the
reference) is the required properties list because there seems to be
none in mmc-controller.yaml.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      parent reply	other threads:[~2024-12-06 17:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05  9:57 [PATCH] dt-bindings: mmc: atmel,hsmci: Convert to json schema Dharma Balasubiramani
2024-12-05 17:45 ` Conor Dooley
     [not found]   ` <4e3a4154-9e05-40b4-961f-6d7e95ec0890@microchip.com>
2024-12-06 17:02     ` Conor Dooley [this message]

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=20241206-untoasted-ripening-83ecf98bc42f@spud \
    --to=conor@kernel.org \
    --cc=Aubin.Constans@microchip.com \
    --cc=Dharma.B@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox