From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
To: Rob Herring <robh@kernel.org>
Cc: Jingoo Han <jingoohan1@gmail.com>,
Gustavo Pimentel <gustavo.pimentel@synopsys.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string
Date: Fri, 15 Apr 2022 09:55:40 +0900 [thread overview]
Message-ID: <d4eb8a3e-ca20-77be-0ae1-84d520f46aa5@socionext.com> (raw)
In-Reply-To: <YlX3uxZzmnb1nM/R@robh.at.kernel.org>
Hi Rob,
On 2022/04/13 7:05, Rob Herring wrote:
> On Thu, Apr 07, 2022 at 10:22:32AM +0900, Kunihiko Hayashi wrote:
>> Instead of "oneOf:" choices, use "allOf:" and "if:" to define reg,
> clocks,
>> resets, and their names that can be taken by the compatible string.
>>
>> The order of their names doesn't change here.
>>
>> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
>> ---
>> .../pci/socionext,uniphier-pcie-ep.yaml | 84 ++++++++++++-------
>> 1 file changed, 56 insertions(+), 28 deletions(-)
>>
>> diff --git
> a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
> b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
>> index 437e61618d06..49a5b2ca266c 100644
>> ---
> a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
>> +++
> b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
>> @@ -15,9 +15,6 @@ description: |
>> maintainers:
>> - Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
>>
>> -allOf:
>> - - $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
>> -
>> properties:
>> compatible:
>> enum:
>> @@ -28,41 +25,19 @@ properties:
>> minItems: 4
>> maxItems: 5
>>
>> - reg-names:
>> - oneOf:
>> - - items:
>> - - const: dbi
>> - - const: dbi2
>> - - const: link
>> - - const: addr_space
>> - - items:
>> - - const: dbi
>> - - const: dbi2
>> - - const: link
>> - - const: addr_space
>> - - const: atu
>
> This could be just:
>
> minItems: 4
> items:
> - const: dbi
> - const: dbi2
> - const: link
> - const: addr_space
> - const: atu
>
> Then the if/then can have just 'minItems: 5' or 'maxItems: 4' for each
> case. I prefer the if/then schemas to be minimal.
I've got it. It means writing a common description, and writing
only the constraints in if/then. I'll rewrite it next.
Thank you,
---
Best Regards
Kunihiko Hayashi
next prev parent reply other threads:[~2022-04-15 0:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 1:22 [PATCH v2 0/3] dt-bindings: PCI: uniphier: Fix endpoint descriptions Kunihiko Hayashi
2022-04-07 1:22 ` [PATCH v2 1/3] dt-bindings: PCI: designware-ep: Increase maxItems of reg and reg-names Kunihiko Hayashi
2022-04-07 1:22 ` [PATCH v2 2/3] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string Kunihiko Hayashi
2022-04-12 22:05 ` Rob Herring
2022-04-15 0:55 ` Kunihiko Hayashi [this message]
2022-04-07 1:22 ` [PATCH v2 3/3] ARM: dts: uniphier: Remove compatible "snps,dw-pcie-ep" from Pro5 pcie-ep node Kunihiko Hayashi
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=d4eb8a3e-ca20-77be-0ae1-84d520f46aa5@socionext.com \
--to=hayashi.kunihiko@socionext.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=robh@kernel.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;
as well as URLs for NNTP newsgroup(s).