mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikita Travkin <nikita@trvn.ru>
To: Rob Herring <robh@kernel.org>
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: Fri, 21 Jan 2022 11:20:05 +0500	[thread overview]
Message-ID: <174803bf1ea1e71a0dfdd1d5365946ca@trvn.ru> (raw)
In-Reply-To: <Yem0wtltC/6FklZu@robh.at.kernel.org>

Rob Herring писал(а) 21.01.2022 00:15:
> 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.
> 

Oh, thanks for clarifying that. My assumption was that just numbering
the nodes is not informative enough, but if it's the agreed way to do
it, I will use this format instead.

I will drop this commit and correct the bindings to use 'pwm' with
no suffix as an example. (Though I still think that having a
meaningful suffix is nicer in the DT so one could see what the
node is used for)

Thanks
Nikita

>>
>> 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
>>
>>

  reply	other threads:[~2022-01-21  6:20 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
2022-01-21  6:20     ` Nikita Travkin [this message]
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=174803bf1ea1e71a0dfdd1d5365946ca@trvn.ru \
    --to=nikita@trvn.ru \
    --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=robh@kernel.org \
    --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

all inboxes | Powered by JetHome®