On 22/11/2022 09:11, Tony Lindgren wrote: > * Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> [221122 07:26]: >> On 22/11/2022 05:43, Tony Lindgren wrote: >>> * Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> [221121 16:05]: >>>> On 21/11/2022 15:48, Tony Lindgren wrote: >>>>> * Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> [221121 14:30]: >>>>>> On Mon, Nov 21, 2022 at 01:55:24PM +0200, Tony Lindgren wrote: >>>>>>> Let's allow node numbering in decimal format too. >>>>>>> >>>>>>> Simple human-readable increments/IDs are usually decimal, hex is only for >>>>>>> addresses as noted by Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>. >>>>>>> >>>>>>> Cc: Thierry Reding <thierry.reding@xxxxxxxxx> >>>>>>> Cc: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> >>>>>>> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> >>>>>>> Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx> >>>>>>> --- >>>>>>> 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 >>>>>>> --- 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]|1[0-5]))*$" >>>>>> >>>>>> I wonder why you don't make this: >>>>>> >>>>>> + pattern: "^pwm(@.*|-[0-9a-f]*)$" >>>> >>>> Yes, the '*' should be within (). >>> >>> Sorry I guess I don't follow. So for what type of naming is the second '*' >>> actually needed here, or is it needed at all? >>> >>> We only want to match the following: >>> >>> pwm@1234 >>> >>> pwm-0 >>> ... >>> pwm-f >>> >>> And now also: >>> >>> pwm-0 >>> ... >>> pwm-15 >>> >>> Is there yet another format I'm missing? >>> >>>>> Hmm but I think this would also pass for node names like pwm-a-foo? >>>>> >>>> >>>> No, how? >>> >>> Because of the second extra '*' there :) >> >> It cannot multiple dashes... Yeah, it should be - it cannot match multiple dashes... > > Sorry I'm still confused.. Care to specify what match do you want to > use here and why? Pattern: -[0-9a-f]* cannot match -1-2-3 because it does not cover the dash. Best regards, Krzysztof