[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20E2821E-3A3B-425B-8E5A-AEC36A2AB9CE@gmail.com>
Date: Mon, 09 Feb 2026 09:13:35 +0200
From: Svyatoslav Ryhel <clamor95@...il.com>
To: Rob Herring <robh@...nel.org>, David Lechner <dlechner@...libre.com>
CC: Jonathan Cameron <jic23@...nel.org>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>, Lee Jones <lee@...nel.org>,
Pavel Machek <pavel@...nel.org>, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Dixit Parmar <dixitparmar19@...il.com>,
Tony Lindgren <tony@...mide.com>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-input@...r.kernel.org, linux-leds@...r.kernel.org
Subject: Re: [PATCH v2 01/11] dt-bindings: regulator: cpcap-regulator: convert to DT schema
9 лютого 2026 р. 00:37:41 GMT+02:00, Rob Herring <robh@...nel.org> пише:
>On Sat, Feb 7, 2026 at 11:32 AM David Lechner <dlechner@...libre.com> wrote:
>>
>> On 2/7/26 11:25 AM, Svyatoslav Ryhel wrote:
>> > сб, 7 лют. 2026 р. о 19:19 David Lechner <dlechner@...libre.com> пише:
>> >>
>> >> On 2/7/26 3:20 AM, Svyatoslav Ryhel wrote:
>> >>> сб, 7 лют. 2026 р. о 01:09 Rob Herring <robh@...nel.org> пише:
>> >>>>
>> >>>> On Fri, Feb 06, 2026 at 07:28:35PM +0200, Svyatoslav Ryhel wrote:
>> >>>>> Convert devicetree bindings for the Motorola CPCAP MFD regulator subnode
>> >>>>> from TXT to YAML format. Main functionality preserved.
>> >>>>>
>> >>
>> >> ...
>> >>
>> >>>>> +properties:
>> >>>>> + compatible:
>> >>>>> + enum:
>> >>>>> + - motorola,cpcap-regulator
>> >>>>> + - motorola,mapphone-cpcap-regulator
>> >>>>> + - motorola,xoom-cpcap-regulator
>> >>>>> +
>> >>>>> + regulators:
>> >>>>> + type: object
>> >>>>> +
>> >>>>> + patternProperties:
>> >>>>> + "$[A-Z0-9]+^":
>> >>>>
>> >>>> I thought it was said on the last version to list the names. Considering
>> >>>> you already have them below, better to put them in schema than prose.
>> >>>> And pretty much all regulator bindings define the names.
>> >>>>
>> >>>
>> >>> What exactly do you propose? All those names will not fit into a
>> >>> single unbreakable line (more than 125 columns in length btw). Patch
>> >>> checker will complain about this. Duplicate pattern properties for
>> >>> every few names? Please be a bit more specific. Thank you!
>> >>
>> >> Making checkpatch happy is not a hard requirement. If you have to
>> >> go over 125 characters for technical reasons, no one is going to
>> >> complain.
>> >>
>> >> I already gave an example on the last version. It is just a regex
>> >> expression. (And note that you didn't fix the $ and ^ either. ^
>> >> means beginning of the line and $ means the end of the line. So
>> >> the pattern currently won't match anything.)
>> >>
>> >> patternProperties:
>> >> "^(SW1|SW2|SW3|SW4|SW5|...)$":
>> >>
>> >>
>> >> And I hope it is obvious that you are meant to replace ... with the
>> >> rest of the names separated by |.
>> >>
>> >
>> > David, thank you for your suggestions and I did not want to offend you
>> > nor Rob, or ignore. Using this large string IMHO feels a bit wrong. No
>> > offence, I will use it if required. At the same time I was
>> > experimenting with possible representation and come up with smth like
>> > this:
>> >
>> > patternProperties:
>> > "^SW[1-6]$":
>> > type: object
>> > $ref: /schemas/regulator/regulator.yaml#
>> > unevaluatedProperties: false
>> >
>> > required:
>> > - regulator-name
>> > - regulator-enable-ramp-delay
>> > - regulator-min-microvolt
>> > - regulator-max-microvolt
>> >
>> > "^V(CAM|CSI|DAC|DIG|FUSE|HVIO|SDIO|PLL|RF1|RF2|RFREF)$":
>> > type: object
>> > $ref: /schemas/regulator/regulator.yaml#
>> > unevaluatedProperties: false
>> >
>> > required:
>> > - regulator-name
>> > - regulator-enable-ramp-delay
>> > - regulator-min-microvolt
>> > - regulator-max-microvolt
>> >
>> > "^V(WLAN1|WLAN2|SIM|SIMCARD|VIB|USB|AUDIO)$":
>> > type: object
>> > $ref: /schemas/regulator/regulator.yaml#
>> > unevaluatedProperties: false
>> >
>> > required:
>> > - regulator-name
>> > - regulator-enable-ramp-delay
>> > - regulator-min-microvolt
>> > - regulator-max-microvolt
>> >
>> > Will this be acceptable? It passes checks
>>
>> I think we would rather have the long match string instead of
>> repeating the rest of it multiple times.
>
>Yes.
>
>105 chars:
>
> "^(SW[1-6]|V(CAM|CSI|DAC|DIG|FUSE|HVIO|SDIO|PLL|RF[12]|RFREF|WLAN[12]|SIM|SIMCARD|VIB|USB|AUDIO))$":
>
>There is the yamllint of 110 which does have to be followed.
>
Amazing! Thank you both for your suggestions.
>Rob
Powered by blists - more mailing lists