From: Krzysztof Kozlowski <krzk@kernel.org>
To: Uday Kiran <challauday369@gmail.com>
Cc: lee@kernel.org, pavel@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
skhan@linuxfoundation.org, me@brighamcampbell.com,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] dt-bindings: leds: lacie,netxbig-leds: Convert to DT schema
Date: Sat, 12 Sep 2026 09:50:08 +0200 [thread overview]
Message-ID: <f402d93f-4443-4209-a6c7-5c30e7c8751a@kernel.org> (raw)
In-Reply-To: <CAAj-GBkiTvFwx+3htJaKGFCYAC0jGdhyxkfUa8dKWPkYmbGViw@mail.gmail.com>
On 11/09/2026 16:29, Uday Kiran wrote:
>>> +properties:
>>> + compatible:
>>> + const: lacie,netxbig-leds
>>> +
>>> + gpio-ext:
>>> + description: Phandle for the gpio-ext bus.
>>> + $ref: /schemas/types.yaml#/definitions/phandle
>>> +
>>> + timers:
>>> + description: |
>>> + Timer array. Each timer entry is represented by three integers:
>>> + Mode (gpio-ext bus), delay_on and delay_off.
>>> + $ref: /schemas/types.yaml#/definitions/uint32-array
>>> +
>>> +patternProperties:
>>> + "^(?!gpio-ext$|pinctrl-[0-9]+$)[a-z][a-z0-9]*(-[a-z0-9]+)+$":
>>
>> This is an odd pattern. Why is pinctrl an LED? or gpio-ext?
>>
>> Actually entire pattern is very odd - it has $ in the middle, but then
>> followed with other REQUIRED stuff. I am surprised it works, but
>> regardless it is absolutely not readable. Looks like a begative pattern,
>> but why would you have negative pattern for known properties?
>
> Thanks for the review Krzysztof.
>
> The negative lookahead was added because patternProperties matches all top-
> level property names that fit the pattern, so excluded known top-level
> properties like gpio-ext and pinctrl-*;
>
> In patch v1, I've used additionalProperties which removes the regex entirely
> and allows arbitrary child-node names. But removed and used patternProperties
> as per the review feedback.
>
> Could you please suggest to me which way to proceed? with additionalProperties
> or patternProperties
The children are leds, so they should use generic node name pattern like
"^led-[a-z0-9]+$"
Best regards,
Krzysztof
prev parent reply other threads:[~2026-09-12 7:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 17:03 [PATCH v3] dt-bindings: leds: lacie,netxbig-leds: Convert to DT schema Udaya Kiran Challa
2026-09-01 17:08 ` sashiko-bot
2026-09-09 7:06 ` Krzysztof Kozlowski
2026-09-11 14:29 ` Uday Kiran
2026-09-12 7:50 ` Krzysztof Kozlowski [this message]
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=f402d93f-4443-4209-a6c7-5c30e7c8751a@kernel.org \
--to=krzk@kernel.org \
--cc=challauday369@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=me@brighamcampbell.com \
--cc=pavel@kernel.org \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.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