From: Nishanth Menon <nm@ti.com>
To: "Rob Herring (Arm)" <robh@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
<linux-gpio@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Tony Lindgren <tony@atomide.com>
Subject: Re: [PATCH] dt-bindings: pinctrl: pinctrl-single: Define a max count for "pinctrl-single,gpio-range"
Date: Tue, 18 Jun 2024 13:57:05 -0500 [thread overview]
Message-ID: <20240618185705.5fwevm7drphgvwl2@dilation> (raw)
In-Reply-To: <171873566448.3500109.16734660300499772836.robh@kernel.org>
On 12:34-20240618, Rob Herring wrote:
>
> On Tue, 18 Jun 2024 11:51:02 -0500, Nishanth Menon wrote:
> > "pinctrl-single,gpio-range" allows us to define a dis-contiguous
> > range of pinctrl registers that can have different mux settings for
> > GPIO mode of operation. However, the maxItems seem to be set to 1 in
> > processed schema for some reason. This is incorrect. For example:
> > arch/arm64/boot/dts/hisilicon/hi6220.dtsi and others have more than
> > one dis-contiguous range.
> >
> > Arbitrarily define a max 100 count to override the defaults.
> >
> > Signed-off-by: Nishanth Menon <nm@ti.com>
> > ---
> > I am not sure if I should call this RFC or not.. and if this is even the
> > right solution.. I am on 2024.05 dt-schema for this check.
> >
> > I noticed this when adding gpio-ranges for am62p platform:
> > https://gist.github.com/nmenon/7019cd2f24be47997640df5db60a7544
> >
> > It is possible that this is a bug in dt-schema, but I have'nt been able
> > to track it down either.
> >
> > behavior seen is the following:
> > pinctrl-single,gpio-range = <&mcu_pmx_range 0 21 7>;
> > generates no warning
> > However,
> > pinctrl-single,gpio-range = <&mcu_pmx_range 0 21 7>, <&mcu_pmx_range 32 2 7>;
> >
> > generates "is too long" warning.
> >
> >
> > Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml | 1 +
> > 1 file changed, 1 insertion(+)
> >
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml: properties:pinctrl-single,gpio-range: {'description': 'Optional list of pin base, nr pins & gpio function', '$ref': '/schemas/types.yaml#/definitions/phandle-array', 'maxItems': 100, 'items': [{'items': [{'description': 'phandle of a gpio-range node'}, {'description': 'pin base'}, {'description': 'number of pins'}, {'description': 'gpio function'}]}]} should not be valid under {'required': ['maxItems']}
> hint: "maxItems" is not needed with an "items" list
> from schema $id: http://devicetree.org/meta-schemas/items.yaml#
yes, I had expected the same, but processed schema indicates a maxItems
of 1 for reasons I am unable to make sense of.. will be great to have
some additional eyes:
https://gist.github.com/nmenon/7019cd2f24be47997640df5db60a7544#file-processed-schema-pinctrl
next-20240617 baseline
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
next prev parent reply other threads:[~2024-06-18 18:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 16:51 [PATCH] dt-bindings: pinctrl: pinctrl-single: Define a max count for "pinctrl-single,gpio-range" Nishanth Menon
2024-06-18 18:34 ` Rob Herring (Arm)
2024-06-18 18:57 ` Nishanth Menon [this message]
2024-06-19 16:19 ` Andrew Davis
2024-06-21 13:36 ` Nishanth Menon
2024-06-21 14:00 ` Andrew Davis
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=20240618185705.5fwevm7drphgvwl2@dilation \
--to=nm@ti.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tony@atomide.com \
/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