All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Rob Herring <robh@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [PATCH v3] dt-bindings: gpio: add common consumer GPIO lines
Date: Fri, 1 Apr 2022 15:26:56 +0200	[thread overview]
Message-ID: <2d124d53-1f36-5315-3877-af8f8ad5f824@linaro.org> (raw)
In-Reply-To: <1648818806.914066.2864970.nullmailer@robh.at.kernel.org>

On 01/04/2022 15:13, Rob Herring wrote:
> On Fri, 01 Apr 2022 09:27:14 +0200, Krzysztof Kozlowski wrote:
>> Typical GPIO lines like enable, powerdown, reset or wakeup are not
>> documented as common, which leads to new variations of these (e.g.
>> pwdn-gpios).  Add a common schema which serves also as a documentation
>> for preferred naming.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
>> Changes since v2:
>> 1. Correct email.
>>
>> Changes since v1:
>> 1. Select-true, add maxItems and description for each entry (Rob).
>> 2. Mention ACTIVE_LOW in bindings description (Linus).
>> 3. Add allOf for pwrseq reset-gpios case.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  .../bindings/gpio/gpio-consumer-common.yaml   | 64 +++++++++++++++++++
>>  1 file changed, 64 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/gpio/gpio-consumer-common.yaml
>>
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.example.dt.yaml: rt4801@73: enable-gpios: [[4294967295, 2, 0], [4294967295, 3, 0]] is too long
> 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/gpio/gpio-consumer-common.yaml
> 

Hi Rob,

With v1, you proposed to use maxItems for all these standard gpios, but
as we see here there are two exceptions:
1. pwrseq might have up to 32 reset-gpios,
2. richtek,rt4801 uses up to 2 enable-gpios.

One way is to add exceptions in gpio-consumer-common.yaml, like I did
for reset-gpios and pwrseq. However this scales poor if more of such
usages appear.

Maybe let's drop the maxItems for all of them?

Best regards,
Krzysztof

  reply	other threads:[~2022-04-01 13:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01  7:27 [PATCH v3] dt-bindings: gpio: add common consumer GPIO lines Krzysztof Kozlowski
2022-04-01 13:13 ` Rob Herring
2022-04-01 13:26   ` Krzysztof Kozlowski [this message]
2022-04-01 15:01     ` Rob Herring
2022-04-01 15:11       ` Krzysztof Kozlowski
2022-04-01 19:44         ` 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=2d124d53-1f36-5315-3877-af8f8ad5f824@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@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 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.