From: Krzysztof Kozlowski <krzk@kernel.org>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>,
"huziji@marvell.com" <huziji@marvell.com>,
"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dt-bindings: mmc: xenon: Convert to JSON schema
Date: Mon, 21 Mar 2022 09:17:15 +0100 [thread overview]
Message-ID: <8331991b-90e9-1649-8faa-4f42b4318488@kernel.org> (raw)
In-Reply-To: <b2ffd5d0-6cff-3ed1-cdca-e93ca1c6d5d0@alliedtelesis.co.nz>
On 20/03/2022 20:51, Chris Packham wrote:
>
(...)
>>> +
>>> +patternProperties:
>>> + "^sdhci@[0-9a-f]+$":
>>> + type: object
>>> + $ref: mmc-controller.yaml
>> This is unusual schema... What are you matching here? Are these children
>> of this device?
> I was going for compatibility with existing uses. The
> mmc-controller.yaml schema expects these nodes to be mmc@... . But all
> of the existing usages of these bindings use sdhci@... as the primary
> node. I could make my example use mmc@ to squash the warning but I was
> hoping to be able to do something that didn't make the existing usages
> invalid.
Please do not create inconsistent bindings because some DTS are
inconsistent. Change the DTS and align them with generic MMC schema.
Node name should not be considered an ABI, so it can be changed in DTS.
Some systems unfortunately break (usually Android and Chrome like to
encode node names), so then it would have to be individually discussed.
>> Looks like you wanted allOf. See some existing examples, like:
>> Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
>>
>>> +
>>> + properties:
>>> + compatible:
>>> + oneOf:
>>> + - const: marvell,armada-3700-sdhci
>>> + description: |
>>> + Must provide a second register area and marvell,pad-type
>>> + - const: marvell,armada-ap806-sdhci
>>> + - const: marvell,armada-ap807-sdhci
>> This looks wrong. Either these can be standalone properties or in a list
>> like in your last items below.
> I was trying to allow 'compatible = "marvell,armada-ap806-sdhci";' or
> 'compatible = "marvell,armada-ap807-sdhci", "marvell,armada-ap806-sdhci";'
But you have here 807! Both 806 and 807. So is 807 compatible with 806
or not?
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-03-21 8:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 3:35 Chris Packham
2022-03-18 14:20 ` Krzysztof Kozlowski
2022-03-20 19:51 ` Chris Packham
2022-03-21 8:17 ` Krzysztof Kozlowski [this message]
2022-03-21 0:12 ` Chris Packham
2022-03-21 8:18 ` Krzysztof Kozlowski
2022-03-20 2:13 ` Rob Herring
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=8331991b-90e9-1649-8faa-4f42b4318488@kernel.org \
--to=krzk@kernel.org \
--cc=Chris.Packham@alliedtelesis.co.nz \
--cc=devicetree@vger.kernel.org \
--cc=huziji@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=robh+dt@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
all inboxes | Powered by JetHome®