Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57138C433FE for ; Tue, 22 Nov 2022 08:11:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232372AbiKVILR (ORCPT ); Tue, 22 Nov 2022 03:11:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231934AbiKVILQ (ORCPT ); Tue, 22 Nov 2022 03:11:16 -0500 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9CE3C3F04B; Tue, 22 Nov 2022 00:11:15 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 399978061; Tue, 22 Nov 2022 08:01:01 +0000 (UTC) Date: Tue, 22 Nov 2022 10:11:13 +0200 From: Tony Lindgren To: Krzysztof Kozlowski Cc: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, Thierry Reding , Nishanth Menon , Vignesh Raghavendra Subject: Re: [PATCH v2 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format Message-ID: References: <20221121115525.36362-1-tony@atomide.com> <20221121144000.7weeyfbbulltfxmd@pengutronix.de> <8c37d6a6-497c-f761-1e27-1ef5b3e64250@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8c37d6a6-497c-f761-1e27-1ef5b3e64250@linaro.org> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org * Krzysztof Kozlowski [221122 07:26]: > On 22/11/2022 05:43, Tony Lindgren wrote: > > * Krzysztof Kozlowski [221121 16:05]: > >> On 21/11/2022 15:48, Tony Lindgren wrote: > >>> * Uwe Kleine-König [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 . > >>>>> > >>>>> Cc: Thierry Reding > >>>>> Cc: Uwe Kleine-König > >>>>> Suggested-by: Krzysztof Kozlowski > >>>>> Signed-off-by: Tony Lindgren > >>>>> --- > >>>>> 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... Sorry I'm still confused.. Care to specify what match do you want to use here and why? Regards, Tony