From: Rob Herring <robh@kernel.org>
To: Nikita Travkin <nikita@trvn.ru>
Cc: thierry.reding@gmail.com, lee.jones@linaro.org,
u.kleine-koenig@pengutronix.de, sboyd@kernel.org,
krzk@kernel.org, linus.walleij@linaro.org, masneyb@onstation.org,
linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v3 1/3] dt-bindings: pwm: Fix node name pattern
Date: Thu, 20 Jan 2022 13:15:14 -0600 [thread overview]
Message-ID: <Yem0wtltC/6FklZu@robh.at.kernel.org> (raw)
In-Reply-To: <20220120161442.140800-2-nikita@trvn.ru>
On Thu, Jan 20, 2022 at 09:14:40PM +0500, Nikita Travkin wrote:
> It looks like it was intended to allow two types of node names with the
> binding:
>
> - With unit address, e.g. pwm@1f000000
Yes, but the format of the unit-address is up to the parent bus which is
outside the scope of this binding.
> - With a suffix, e.g. pwm-clk
No. pwm-0, pwm-1, etc. only to cover the few cases with no unit-address.
Third is just 'pwm' as the '*' on the end means 0 or more. Though a '?'
would have been more correct.
>
> However the pattern regex only correctly matches the first variant,
> as well as some incorrect ones.
>
> Fix the regex to match only two patterns shown above. (Either unit
> address starting with @ and following with one or more hexademical
> digit or arbitrary suffix stating with - and at least one symbol long)
>
> Fixes: 89650a1e3b6f ("dt-bindings: pwm: Convert PWM bindings to json-schema")
> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> ---
> Documentation/devicetree/bindings/pwm/pwm.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/pwm/pwm.yaml b/Documentation/devicetree/bindings/pwm/pwm.yaml
> index 3c01f85029e5..4926fe65886f 100644
> --- a/Documentation/devicetree/bindings/pwm/pwm.yaml
> +++ b/Documentation/devicetree/bindings/pwm/pwm.yaml
> @@ -13,7 +13,7 @@ select: false
>
> properties:
> $nodename:
> - pattern: "^pwm(@.*|-[0-9a-f])*$"
> + pattern: "^pwm(@[0-9a-f]+|-.+)?$"
>
> "#pwm-cells":
> description:
> --
> 2.30.2
>
>
next prev parent reply other threads:[~2022-01-20 19:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 16:14 [PATCH v3 0/3] Clock based PWM output driver Nikita Travkin
2022-01-20 16:14 ` [PATCH v3 1/3] dt-bindings: pwm: Fix node name pattern Nikita Travkin
2022-01-20 19:15 ` Rob Herring [this message]
2022-01-21 6:20 ` Nikita Travkin
2022-01-20 16:14 ` [PATCH v3 2/3] dt-bindings: pwm: Document clk based PWM controller Nikita Travkin
2022-01-21 7:34 ` Krzysztof Kozlowski
2022-01-21 21:34 ` Sean Anderson
2022-01-22 10:13 ` Krzysztof Kozlowski
2022-01-20 16:14 ` [PATCH v3 3/3] pwm: Add clock based PWM output driver Nikita Travkin
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=Yem0wtltC/6FklZu@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=masneyb@onstation.org \
--cc=nikita@trvn.ru \
--cc=sboyd@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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).