All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
@ 2022-11-22 12:32 ` Tony Lindgren
  0 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2022-11-22 12:32 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, linux-arm-kernel, linux-omap, linux-pwm,
	Thierry Reding, Krzysztof Kozlowski, Uwe Kleine-König,
	Nishanth Menon, Vignesh Raghavendra

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@linaro.org>.

Let's use an improved match suggested by Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
<u.kleine-koenig@pengutronix.de>.

Cc: linux-pwm@vger.kernel.org
Cc: Thierry Reding <thierry.reding@gmail.com>
Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---

Changes since v2:

- Use pattern suggested by Krzysztof and Uwe

Changes since v1:

- New patch added to deal with pwm-omap-dmtimer binding

---
 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]+)?$"
 
   "#pwm-cells":
     description:
-- 
2.38.1

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
@ 2022-11-22 12:32 ` Tony Lindgren
  0 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2022-11-22 12:32 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, linux-arm-kernel, linux-omap, linux-pwm,
	Thierry Reding, Krzysztof Kozlowski, Uwe Kleine-König,
	Nishanth Menon, Vignesh Raghavendra

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@linaro.org>.

Let's use an improved match suggested by Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
<u.kleine-koenig@pengutronix.de>.

Cc: linux-pwm@vger.kernel.org
Cc: Thierry Reding <thierry.reding@gmail.com>
Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---

Changes since v2:

- Use pattern suggested by Krzysztof and Uwe

Changes since v1:

- New patch added to deal with pwm-omap-dmtimer binding

---
 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]+)?$"
 
   "#pwm-cells":
     description:
-- 
2.38.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v3 2/2] dt-bindings: pwm: ti,pwm-omap-dmtimer: Update binding for yaml
  2022-11-22 12:32 ` Tony Lindgren
@ 2022-11-22 12:32   ` Tony Lindgren
  -1 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2022-11-22 12:32 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, linux-arm-kernel, linux-omap, linux-pwm,
	Nishanth Menon, Thierry Reding, Uwe Kleine-König,
	Vignesh Raghavendra, Krzysztof Kozlowski

Update for yaml and remove the old txt binding.

As we can replace most of the custom timer API with standard Linux
frameworks such as clock framework, let's tag the properties for
ti,prescaler and ti,clock-source as deprecated.

Cc: linux-pwm@vger.kernel.org
Cc: Nishanth Menon <nm@ti.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---

Changes since v2:

- Reviewed-by collected from Krzysztof, no changes

Changes since v1:

- Fix issues noticed by Krzysztof

---
 .../bindings/pwm/pwm-omap-dmtimer.txt         | 22 -------
 .../bindings/pwm/ti,omap-dmtimer-pwm.yaml     | 59 +++++++++++++++++++
 2 files changed, 59 insertions(+), 22 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml

diff --git a/Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt b/Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt
deleted file mode 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-* OMAP PWM for dual-mode timers
-
-Required properties:
-- compatible: Shall contain "ti,omap-dmtimer-pwm".
-- ti,timers: phandle to PWM capable OMAP timer. See timer/ti,timer-dm.yaml for info
-  about these timers.
-- #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of
-  the cells format.
-
-Optional properties:
-- ti,prescaler: Should be a value between 0 and 7, see the timers datasheet
-- ti,clock-source: Set dmtimer parent clock, values between 0 and 2:
-  - 0x00 - high-frequency system clock (timer_sys_ck)
-  - 0x01 - 32-kHz always-on clock (timer_32k_ck)
-  - 0x02 - external clock (timer_ext_ck, OMAP2 only)
-
-Example:
-	pwm9: dmtimer-pwm@9 {
-		compatible = "ti,omap-dmtimer-pwm";
-		ti,timers = <&timer9>;
-		#pwm-cells = <3>;
-	};
diff --git a/Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml b/Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml
new file mode 100644
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/ti,omap-dmtimer-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI dual mode timer PWM controller
+
+maintainers:
+  - Tony Lindgren <tony@atomide.com>
+
+description:
+  TI dual mode timer instances have an IO pin for PWM capability
+
+allOf:
+  - $ref: pwm.yaml#
+
+properties:
+  compatible:
+    const: ti,omap-dmtimer-pwm
+
+  "#pwm-cells":
+    const: 3
+
+  ti,timers:
+    description: Timer instance phandle for the PWM
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  ti,prescaler:
+    description: |
+      Legacy clock prescaler for timer. The timer counter is prescaled
+      with 2^n where n is the prescaler.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+    deprecated: true
+
+  ti,clock-source:
+    description: |
+      Legacy clock for timer, please use assigned-clocks instead.
+      0x00 - high-frequency system clock (timer_sys_ck)
+      0x01 - 32-kHz always-on clock (timer_32k_ck)
+      0x02 - external clock (timer_ext_ck, OMAP2 only)
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 0, 1, 2 ]
+    deprecated: true
+
+required:
+  - compatible
+  - ti,timers
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    pwm9: pwm {
+      compatible = "ti,omap-dmtimer-pwm";
+      ti,timers = <&timer9>;
+      #pwm-cells = <3>;
+    };
-- 
2.38.1

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v3 2/2] dt-bindings: pwm: ti,pwm-omap-dmtimer: Update binding for yaml
@ 2022-11-22 12:32   ` Tony Lindgren
  0 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2022-11-22 12:32 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, linux-arm-kernel, linux-omap, linux-pwm,
	Nishanth Menon, Thierry Reding, Uwe Kleine-König,
	Vignesh Raghavendra, Krzysztof Kozlowski

Update for yaml and remove the old txt binding.

As we can replace most of the custom timer API with standard Linux
frameworks such as clock framework, let's tag the properties for
ti,prescaler and ti,clock-source as deprecated.

Cc: linux-pwm@vger.kernel.org
Cc: Nishanth Menon <nm@ti.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---

Changes since v2:

- Reviewed-by collected from Krzysztof, no changes

Changes since v1:

- Fix issues noticed by Krzysztof

---
 .../bindings/pwm/pwm-omap-dmtimer.txt         | 22 -------
 .../bindings/pwm/ti,omap-dmtimer-pwm.yaml     | 59 +++++++++++++++++++
 2 files changed, 59 insertions(+), 22 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml

diff --git a/Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt b/Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt
deleted file mode 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-* OMAP PWM for dual-mode timers
-
-Required properties:
-- compatible: Shall contain "ti,omap-dmtimer-pwm".
-- ti,timers: phandle to PWM capable OMAP timer. See timer/ti,timer-dm.yaml for info
-  about these timers.
-- #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of
-  the cells format.
-
-Optional properties:
-- ti,prescaler: Should be a value between 0 and 7, see the timers datasheet
-- ti,clock-source: Set dmtimer parent clock, values between 0 and 2:
-  - 0x00 - high-frequency system clock (timer_sys_ck)
-  - 0x01 - 32-kHz always-on clock (timer_32k_ck)
-  - 0x02 - external clock (timer_ext_ck, OMAP2 only)
-
-Example:
-	pwm9: dmtimer-pwm@9 {
-		compatible = "ti,omap-dmtimer-pwm";
-		ti,timers = <&timer9>;
-		#pwm-cells = <3>;
-	};
diff --git a/Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml b/Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml
new file mode 100644
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/ti,omap-dmtimer-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI dual mode timer PWM controller
+
+maintainers:
+  - Tony Lindgren <tony@atomide.com>
+
+description:
+  TI dual mode timer instances have an IO pin for PWM capability
+
+allOf:
+  - $ref: pwm.yaml#
+
+properties:
+  compatible:
+    const: ti,omap-dmtimer-pwm
+
+  "#pwm-cells":
+    const: 3
+
+  ti,timers:
+    description: Timer instance phandle for the PWM
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  ti,prescaler:
+    description: |
+      Legacy clock prescaler for timer. The timer counter is prescaled
+      with 2^n where n is the prescaler.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+    deprecated: true
+
+  ti,clock-source:
+    description: |
+      Legacy clock for timer, please use assigned-clocks instead.
+      0x00 - high-frequency system clock (timer_sys_ck)
+      0x01 - 32-kHz always-on clock (timer_32k_ck)
+      0x02 - external clock (timer_ext_ck, OMAP2 only)
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 0, 1, 2 ]
+    deprecated: true
+
+required:
+  - compatible
+  - ti,timers
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    pwm9: pwm {
+      compatible = "ti,omap-dmtimer-pwm";
+      ti,timers = <&timer9>;
+      #pwm-cells = <3>;
+    };
-- 
2.38.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
  2022-11-22 12:32 ` Tony Lindgren
@ 2022-11-22 12:49   ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-22 12:49 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, linux-arm-kernel, linux-omap, linux-pwm,
	Thierry Reding, Uwe Kleine-König, Nishanth Menon,
	Vignesh Raghavendra

On 22/11/2022 13:32, 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@linaro.org>.
> 
> Let's use an improved match suggested by Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de>.
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
@ 2022-11-22 12:49   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-22 12:49 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, linux-arm-kernel, linux-omap, linux-pwm,
	Thierry Reding, Uwe Kleine-König, Nishanth Menon,
	Vignesh Raghavendra

On 22/11/2022 13:32, 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@linaro.org>.
> 
> Let's use an improved match suggested by Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de>.
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
  2022-11-22 12:32 ` Tony Lindgren
@ 2022-11-22 13:38   ` Uwe Kleine-König
  -1 siblings, 0 replies; 22+ messages in thread
From: Uwe Kleine-König @ 2022-11-22 13:38 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Rob Herring, Krzysztof Kozlowski, devicetree, linux-arm-kernel,
	linux-omap, linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Nishanth Menon, Vignesh Raghavendra

[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]

On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> 
> Let's use an improved match suggested by Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de>.
> 
> Cc: linux-pwm@vger.kernel.org
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Which tree should this merged through? The obvious candidates are pwm,
dt and omap.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
@ 2022-11-22 13:38   ` Uwe Kleine-König
  0 siblings, 0 replies; 22+ messages in thread
From: Uwe Kleine-König @ 2022-11-22 13:38 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Rob Herring, Krzysztof Kozlowski, devicetree, linux-arm-kernel,
	linux-omap, linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Nishanth Menon, Vignesh Raghavendra


[-- Attachment #1.1: Type: text/plain, Size: 1062 bytes --]

On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> 
> Let's use an improved match suggested by Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de>.
> 
> Cc: linux-pwm@vger.kernel.org
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Which tree should this merged through? The obvious candidates are pwm,
dt and omap.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
  2022-11-22 13:38   ` Uwe Kleine-König
@ 2022-11-22 13:41     ` Tony Lindgren
  -1 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2022-11-22 13:41 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Rob Herring, Krzysztof Kozlowski, devicetree, linux-arm-kernel,
	linux-omap, linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Nishanth Menon, Vignesh Raghavendra

* Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [221122 13:28]:
> On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> > 
> > Let's use an improved match suggested by Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> > <u.kleine-koenig@pengutronix.de>.
> > 
> > Cc: linux-pwm@vger.kernel.org
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Which tree should this merged through? The obvious candidates are pwm,
> dt and omap.

The dt folks usually queue the binding patches separately.

Regards,

Tony

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
@ 2022-11-22 13:41     ` Tony Lindgren
  0 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2022-11-22 13:41 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Rob Herring, Krzysztof Kozlowski, devicetree, linux-arm-kernel,
	linux-omap, linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Nishanth Menon, Vignesh Raghavendra

* Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [221122 13:28]:
> On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> > 
> > Let's use an improved match suggested by Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> > <u.kleine-koenig@pengutronix.de>.
> > 
> > Cc: linux-pwm@vger.kernel.org
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Which tree should this merged through? The obvious candidates are pwm,
> dt and omap.

The dt folks usually queue the binding patches separately.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
  2022-11-22 13:41     ` Tony Lindgren
@ 2022-11-22 20:26       ` Uwe Kleine-König
  -1 siblings, 0 replies; 22+ messages in thread
From: Uwe Kleine-König @ 2022-11-22 20:26 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Rob Herring, Krzysztof Kozlowski, devicetree, linux-arm-kernel,
	linux-omap, linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Nishanth Menon, Vignesh Raghavendra

[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]

Hello Tony,

On Tue, Nov 22, 2022 at 03:41:58PM +0200, Tony Lindgren wrote:
> * Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [221122 13:28]:
> > On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> > > 
> > > Let's use an improved match suggested by Krzysztof Kozlowski
> > > <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> > > <u.kleine-koenig@pengutronix.de>.
> > > 
> > > Cc: linux-pwm@vger.kernel.org
> > > Cc: Thierry Reding <thierry.reding@gmail.com>
> > > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > 
> > Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > Which tree should this merged through? The obvious candidates are pwm,
> > dt and omap.
> 
> The dt folks usually queue the binding patches separately.

fine, so I marked your series in the PWM patchwork as "handled-elsewhere".

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
@ 2022-11-22 20:26       ` Uwe Kleine-König
  0 siblings, 0 replies; 22+ messages in thread
From: Uwe Kleine-König @ 2022-11-22 20:26 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Rob Herring, Krzysztof Kozlowski, devicetree, linux-arm-kernel,
	linux-omap, linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Nishanth Menon, Vignesh Raghavendra


[-- Attachment #1.1: Type: text/plain, Size: 1436 bytes --]

Hello Tony,

On Tue, Nov 22, 2022 at 03:41:58PM +0200, Tony Lindgren wrote:
> * Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [221122 13:28]:
> > On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> > > 
> > > Let's use an improved match suggested by Krzysztof Kozlowski
> > > <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> > > <u.kleine-koenig@pengutronix.de>.
> > > 
> > > Cc: linux-pwm@vger.kernel.org
> > > Cc: Thierry Reding <thierry.reding@gmail.com>
> > > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > 
> > Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > Which tree should this merged through? The obvious candidates are pwm,
> > dt and omap.
> 
> The dt folks usually queue the binding patches separately.

fine, so I marked your series in the PWM patchwork as "handled-elsewhere".

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
  2022-11-22 13:41     ` Tony Lindgren
@ 2022-11-23  2:38       ` Rob Herring
  -1 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2022-11-23  2:38 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Uwe Kleine-König, Krzysztof Kozlowski, devicetree,
	linux-arm-kernel, linux-omap, linux-pwm, Thierry Reding,
	Krzysztof Kozlowski, Nishanth Menon, Vignesh Raghavendra

On Tue, Nov 22, 2022 at 03:41:58PM +0200, Tony Lindgren wrote:
> * Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [221122 13:28]:
> > On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> > > 
> > > Let's use an improved match suggested by Krzysztof Kozlowski
> > > <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> > > <u.kleine-koenig@pengutronix.de>.
> > > 
> > > Cc: linux-pwm@vger.kernel.org
> > > Cc: Thierry Reding <thierry.reding@gmail.com>
> > > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > 
> > Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > Which tree should this merged through? The obvious candidates are pwm,
> > dt and omap.
> 
> The dt folks usually queue the binding patches separately.

The default is they go thru the subsystem trees, and I mainly pickup 
what has not after some time (and is standalone binding change).

Rob

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
@ 2022-11-23  2:38       ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2022-11-23  2:38 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Uwe Kleine-König, Krzysztof Kozlowski, devicetree,
	linux-arm-kernel, linux-omap, linux-pwm, Thierry Reding,
	Krzysztof Kozlowski, Nishanth Menon, Vignesh Raghavendra

On Tue, Nov 22, 2022 at 03:41:58PM +0200, Tony Lindgren wrote:
> * Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [221122 13:28]:
> > On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> > > 
> > > Let's use an improved match suggested by Krzysztof Kozlowski
> > > <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> > > <u.kleine-koenig@pengutronix.de>.
> > > 
> > > Cc: linux-pwm@vger.kernel.org
> > > Cc: Thierry Reding <thierry.reding@gmail.com>
> > > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > 
> > Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > Which tree should this merged through? The obvious candidates are pwm,
> > dt and omap.
> 
> The dt folks usually queue the binding patches separately.

The default is they go thru the subsystem trees, and I mainly pickup 
what has not after some time (and is standalone binding change).

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
  2022-11-22 12:32 ` Tony Lindgren
@ 2022-11-23  2:41   ` Rob Herring
  -1 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2022-11-23  2:41 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Krzysztof Kozlowski, devicetree, linux-arm-kernel, linux-omap,
	linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Uwe Kleine-König, Nishanth Menon, Vignesh Raghavendra

On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> 
> Let's use an improved match suggested by Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de>.
> 
> Cc: linux-pwm@vger.kernel.org
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> 
> Changes since v2:
> 
> - Use pattern suggested by Krzysztof and Uwe
> 
> Changes since v1:
> 
> - New patch added to deal with pwm-omap-dmtimer binding
> 
> ---
>  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]+)?$"

So now pwm-10 could be either?

I'm fine with decimal, but can we do that everywhere we do this -N 
naming?

>  
>    "#pwm-cells":
>      description:
> -- 
> 2.38.1
> 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
@ 2022-11-23  2:41   ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2022-11-23  2:41 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Krzysztof Kozlowski, devicetree, linux-arm-kernel, linux-omap,
	linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Uwe Kleine-König, Nishanth Menon, Vignesh Raghavendra

On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> 
> Let's use an improved match suggested by Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de>.
> 
> Cc: linux-pwm@vger.kernel.org
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> 
> Changes since v2:
> 
> - Use pattern suggested by Krzysztof and Uwe
> 
> Changes since v1:
> 
> - New patch added to deal with pwm-omap-dmtimer binding
> 
> ---
>  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]+)?$"

So now pwm-10 could be either?

I'm fine with decimal, but can we do that everywhere we do this -N 
naming?

>  
>    "#pwm-cells":
>      description:
> -- 
> 2.38.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
  2022-11-23  2:41   ` Rob Herring
@ 2022-11-23  6:58     ` Tony Lindgren
  -1 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2022-11-23  6:58 UTC (permalink / raw)
  To: Rob Herring
  Cc: Krzysztof Kozlowski, devicetree, linux-arm-kernel, linux-omap,
	linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Uwe Kleine-König, Nishanth Menon, Vignesh Raghavendra

* Rob Herring <robh@kernel.org> [221123 02:31]:
> On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> > 
> > Let's use an improved match suggested by Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> > <u.kleine-koenig@pengutronix.de>.
> > 
> > Cc: linux-pwm@vger.kernel.org
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> > 
> > Changes since v2:
> > 
> > - Use pattern suggested by Krzysztof and Uwe
> > 
> > Changes since v1:
> > 
> > - New patch added to deal with pwm-omap-dmtimer binding
> > 
> > ---
> >  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]+)?$"
> 
> So now pwm-10 could be either?

Yes.

> I'm fine with decimal, but can we do that everywhere we do this -N 
> naming?

Do you mean the '[0-9a-f]' users that don't use '[0-9af]+'?

These can be found with:

$ find Documentation/devicetree/bindings/ -name \*.yaml | \
	xargs grep pattern: | grep '\[0-9a-f\]' | grep -v '\[0-9a-f\]+'

Not sure if some of these need to intentionally limit the node numbering
to 15.

If you have some other criteria in mind, let me know :)

That sounds like a separate patch though.

Regards,

Tony

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
@ 2022-11-23  6:58     ` Tony Lindgren
  0 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2022-11-23  6:58 UTC (permalink / raw)
  To: Rob Herring
  Cc: Krzysztof Kozlowski, devicetree, linux-arm-kernel, linux-omap,
	linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Uwe Kleine-König, Nishanth Menon, Vignesh Raghavendra

* Rob Herring <robh@kernel.org> [221123 02:31]:
> On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> > 
> > Let's use an improved match suggested by Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> > <u.kleine-koenig@pengutronix.de>.
> > 
> > Cc: linux-pwm@vger.kernel.org
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> > 
> > Changes since v2:
> > 
> > - Use pattern suggested by Krzysztof and Uwe
> > 
> > Changes since v1:
> > 
> > - New patch added to deal with pwm-omap-dmtimer binding
> > 
> > ---
> >  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]+)?$"
> 
> So now pwm-10 could be either?

Yes.

> I'm fine with decimal, but can we do that everywhere we do this -N 
> naming?

Do you mean the '[0-9a-f]' users that don't use '[0-9af]+'?

These can be found with:

$ find Documentation/devicetree/bindings/ -name \*.yaml | \
	xargs grep pattern: | grep '\[0-9a-f\]' | grep -v '\[0-9a-f\]+'

Not sure if some of these need to intentionally limit the node numbering
to 15.

If you have some other criteria in mind, let me know :)

That sounds like a separate patch though.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
  2022-11-23  6:58     ` Tony Lindgren
@ 2022-11-27 18:22       ` Rob Herring
  -1 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2022-11-27 18:22 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Krzysztof Kozlowski, devicetree, linux-arm-kernel, linux-omap,
	linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Uwe Kleine-König, Nishanth Menon, Vignesh Raghavendra

On Wed, Nov 23, 2022 at 08:58:54AM +0200, Tony Lindgren wrote:
> * Rob Herring <robh@kernel.org> [221123 02:31]:
> > On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> > > 
> > > Let's use an improved match suggested by Krzysztof Kozlowski
> > > <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> > > <u.kleine-koenig@pengutronix.de>.
> > > 
> > > Cc: linux-pwm@vger.kernel.org
> > > Cc: Thierry Reding <thierry.reding@gmail.com>
> > > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > > ---
> > > 
> > > Changes since v2:
> > > 
> > > - Use pattern suggested by Krzysztof and Uwe
> > > 
> > > Changes since v1:
> > > 
> > > - New patch added to deal with pwm-omap-dmtimer binding
> > > 
> > > ---
> > >  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]+)?$"
> > 
> > So now pwm-10 could be either?
> 
> Yes.
> 
> > I'm fine with decimal, but can we do that everywhere we do this -N 
> > naming?
> 
> Do you mean the '[0-9a-f]' users that don't use '[0-9af]+'?

No, I mean for all cases of <nodename>-N, can be we consistent. Either 
we use hex or we use decimal.
 
> 
> These can be found with:
> 
> $ find Documentation/devicetree/bindings/ -name \*.yaml | \
> 	xargs grep pattern: | grep '\[0-9a-f\]' | grep -v '\[0-9a-f\]+'

Not quite. It's just cases of '-N':

$ find Documentation/devicetree/bindings/ -name \*.yaml |         xargs grep pattern: | grep '\-\[0-9a-f\]' | grep -v '\[0-9a-f\]+'
Documentation/devicetree/bindings/phy/intel,combo-phy.yaml:    pattern: "combophy(@.*|-[0-9a-f])*$"
Documentation/devicetree/bindings/pwm/pwm.yaml:    pattern: "^pwm(@.*|-[0-9a-f])*$"
Documentation/devicetree/bindings/timestamp/hardware-timestamps-common.yaml:    pattern: "^timestamp(@.*|-[0-9a-f])?$"
Documentation/devicetree/bindings/watchdog/watchdog.yaml:    pattern: "^watchdog(@.*|-[0-9a-f])?$"
Documentation/devicetree/bindings/spi/spi-controller.yaml:    pattern: "^spi(@.*|-[0-9a-f])*$"
Documentation/devicetree/bindings/rtc/rtc.yaml:    pattern: "^rtc(@.*|-[0-9a-f])*$"


And there's probably some more in dtschema.

> 
> Not sure if some of these need to intentionally limit the node numbering
> to 15.

No, I think it was all just cases of 15 should be enough for anyone.

> 
> If you have some other criteria in mind, let me know :)

If the numbering is hex, then it is as you have it. (Though we can't 
enforce that.

If it is decimal, then the regex should be ([0-9]|[1-9][0-9]+). 

Rob

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
@ 2022-11-27 18:22       ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2022-11-27 18:22 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Krzysztof Kozlowski, devicetree, linux-arm-kernel, linux-omap,
	linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Uwe Kleine-König, Nishanth Menon, Vignesh Raghavendra

On Wed, Nov 23, 2022 at 08:58:54AM +0200, Tony Lindgren wrote:
> * Rob Herring <robh@kernel.org> [221123 02:31]:
> > On Tue, Nov 22, 2022 at 02:32: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@linaro.org>.
> > > 
> > > Let's use an improved match suggested by Krzysztof Kozlowski
> > > <krzysztof.kozlowski@linaro.org> and improved a bit by Uwe Kleine-König
> > > <u.kleine-koenig@pengutronix.de>.
> > > 
> > > Cc: linux-pwm@vger.kernel.org
> > > Cc: Thierry Reding <thierry.reding@gmail.com>
> > > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > > ---
> > > 
> > > Changes since v2:
> > > 
> > > - Use pattern suggested by Krzysztof and Uwe
> > > 
> > > Changes since v1:
> > > 
> > > - New patch added to deal with pwm-omap-dmtimer binding
> > > 
> > > ---
> > >  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]+)?$"
> > 
> > So now pwm-10 could be either?
> 
> Yes.
> 
> > I'm fine with decimal, but can we do that everywhere we do this -N 
> > naming?
> 
> Do you mean the '[0-9a-f]' users that don't use '[0-9af]+'?

No, I mean for all cases of <nodename>-N, can be we consistent. Either 
we use hex or we use decimal.
 
> 
> These can be found with:
> 
> $ find Documentation/devicetree/bindings/ -name \*.yaml | \
> 	xargs grep pattern: | grep '\[0-9a-f\]' | grep -v '\[0-9a-f\]+'

Not quite. It's just cases of '-N':

$ find Documentation/devicetree/bindings/ -name \*.yaml |         xargs grep pattern: | grep '\-\[0-9a-f\]' | grep -v '\[0-9a-f\]+'
Documentation/devicetree/bindings/phy/intel,combo-phy.yaml:    pattern: "combophy(@.*|-[0-9a-f])*$"
Documentation/devicetree/bindings/pwm/pwm.yaml:    pattern: "^pwm(@.*|-[0-9a-f])*$"
Documentation/devicetree/bindings/timestamp/hardware-timestamps-common.yaml:    pattern: "^timestamp(@.*|-[0-9a-f])?$"
Documentation/devicetree/bindings/watchdog/watchdog.yaml:    pattern: "^watchdog(@.*|-[0-9a-f])?$"
Documentation/devicetree/bindings/spi/spi-controller.yaml:    pattern: "^spi(@.*|-[0-9a-f])*$"
Documentation/devicetree/bindings/rtc/rtc.yaml:    pattern: "^rtc(@.*|-[0-9a-f])*$"


And there's probably some more in dtschema.

> 
> Not sure if some of these need to intentionally limit the node numbering
> to 15.

No, I think it was all just cases of 15 should be enough for anyone.

> 
> If you have some other criteria in mind, let me know :)

If the numbering is hex, then it is as you have it. (Though we can't 
enforce that.

If it is decimal, then the regex should be ([0-9]|[1-9][0-9]+). 

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
  2022-11-27 18:22       ` Rob Herring
@ 2023-01-13  7:06         ` Tony Lindgren
  -1 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2023-01-13  7:06 UTC (permalink / raw)
  To: Rob Herring
  Cc: Krzysztof Kozlowski, devicetree, linux-arm-kernel, linux-omap,
	linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Uwe Kleine-König, Nishanth Menon, Vignesh Raghavendra

Hi Rob,

* Rob Herring <robh@kernel.org> [221127 18:22]:
> On Wed, Nov 23, 2022 at 08:58:54AM +0200, Tony Lindgren wrote:
> > * Rob Herring <robh@kernel.org> [221123 02:31]:
> > > On Tue, Nov 22, 2022 at 02:32:24PM +0200, Tony Lindgren wrote:
> > > > --- 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]+)?$"
> > > 
> > > So now pwm-10 could be either?
> > 
> > Yes.
> > 
> > > I'm fine with decimal, but can we do that everywhere we do this -N 
> > > naming?
> > 
> > Do you mean the '[0-9a-f]' users that don't use '[0-9af]+'?
> 
> No, I mean for all cases of <nodename>-N, can be we consistent. Either 
> we use hex or we use decimal.
>  
> > 
> > These can be found with:
> > 
> > $ find Documentation/devicetree/bindings/ -name \*.yaml | \
> > 	xargs grep pattern: | grep '\[0-9a-f\]' | grep -v '\[0-9a-f\]+'
> 
> Not quite. It's just cases of '-N':
> 
> $ find Documentation/devicetree/bindings/ -name \*.yaml |         xargs grep pattern: | grep '\-\[0-9a-f\]' | grep -v '\[0-9a-f\]+'
> Documentation/devicetree/bindings/phy/intel,combo-phy.yaml:    pattern: "combophy(@.*|-[0-9a-f])*$"
> Documentation/devicetree/bindings/pwm/pwm.yaml:    pattern: "^pwm(@.*|-[0-9a-f])*$"
> Documentation/devicetree/bindings/timestamp/hardware-timestamps-common.yaml:    pattern: "^timestamp(@.*|-[0-9a-f])?$"
> Documentation/devicetree/bindings/watchdog/watchdog.yaml:    pattern: "^watchdog(@.*|-[0-9a-f])?$"
> Documentation/devicetree/bindings/spi/spi-controller.yaml:    pattern: "^spi(@.*|-[0-9a-f])*$"
> Documentation/devicetree/bindings/rtc/rtc.yaml:    pattern: "^rtc(@.*|-[0-9a-f])*$"
> 
> 
> And there's probably some more in dtschema.

Looking at this again, not exactly sure still what you want..

Can you please post some initial patch maybe, verbal patches are
a bit tricky :)

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format
@ 2023-01-13  7:06         ` Tony Lindgren
  0 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2023-01-13  7:06 UTC (permalink / raw)
  To: Rob Herring
  Cc: Krzysztof Kozlowski, devicetree, linux-arm-kernel, linux-omap,
	linux-pwm, Thierry Reding, Krzysztof Kozlowski,
	Uwe Kleine-König, Nishanth Menon, Vignesh Raghavendra

Hi Rob,

* Rob Herring <robh@kernel.org> [221127 18:22]:
> On Wed, Nov 23, 2022 at 08:58:54AM +0200, Tony Lindgren wrote:
> > * Rob Herring <robh@kernel.org> [221123 02:31]:
> > > On Tue, Nov 22, 2022 at 02:32:24PM +0200, Tony Lindgren wrote:
> > > > --- 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]+)?$"
> > > 
> > > So now pwm-10 could be either?
> > 
> > Yes.
> > 
> > > I'm fine with decimal, but can we do that everywhere we do this -N 
> > > naming?
> > 
> > Do you mean the '[0-9a-f]' users that don't use '[0-9af]+'?
> 
> No, I mean for all cases of <nodename>-N, can be we consistent. Either 
> we use hex or we use decimal.
>  
> > 
> > These can be found with:
> > 
> > $ find Documentation/devicetree/bindings/ -name \*.yaml | \
> > 	xargs grep pattern: | grep '\[0-9a-f\]' | grep -v '\[0-9a-f\]+'
> 
> Not quite. It's just cases of '-N':
> 
> $ find Documentation/devicetree/bindings/ -name \*.yaml |         xargs grep pattern: | grep '\-\[0-9a-f\]' | grep -v '\[0-9a-f\]+'
> Documentation/devicetree/bindings/phy/intel,combo-phy.yaml:    pattern: "combophy(@.*|-[0-9a-f])*$"
> Documentation/devicetree/bindings/pwm/pwm.yaml:    pattern: "^pwm(@.*|-[0-9a-f])*$"
> Documentation/devicetree/bindings/timestamp/hardware-timestamps-common.yaml:    pattern: "^timestamp(@.*|-[0-9a-f])?$"
> Documentation/devicetree/bindings/watchdog/watchdog.yaml:    pattern: "^watchdog(@.*|-[0-9a-f])?$"
> Documentation/devicetree/bindings/spi/spi-controller.yaml:    pattern: "^spi(@.*|-[0-9a-f])*$"
> Documentation/devicetree/bindings/rtc/rtc.yaml:    pattern: "^rtc(@.*|-[0-9a-f])*$"
> 
> 
> And there's probably some more in dtschema.

Looking at this again, not exactly sure still what you want..

Can you please post some initial patch maybe, verbal patches are
a bit tricky :)

Regards,

Tony

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2023-01-13  7:21 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-22 12:32 [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format Tony Lindgren
2022-11-22 12:32 ` Tony Lindgren
2022-11-22 12:32 ` [PATCH v3 2/2] dt-bindings: pwm: ti,pwm-omap-dmtimer: Update binding for yaml Tony Lindgren
2022-11-22 12:32   ` Tony Lindgren
2022-11-22 12:49 ` [PATCH v3 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format Krzysztof Kozlowski
2022-11-22 12:49   ` Krzysztof Kozlowski
2022-11-22 13:38 ` Uwe Kleine-König
2022-11-22 13:38   ` Uwe Kleine-König
2022-11-22 13:41   ` Tony Lindgren
2022-11-22 13:41     ` Tony Lindgren
2022-11-22 20:26     ` Uwe Kleine-König
2022-11-22 20:26       ` Uwe Kleine-König
2022-11-23  2:38     ` Rob Herring
2022-11-23  2:38       ` Rob Herring
2022-11-23  2:41 ` Rob Herring
2022-11-23  2:41   ` Rob Herring
2022-11-23  6:58   ` Tony Lindgren
2022-11-23  6:58     ` Tony Lindgren
2022-11-27 18:22     ` Rob Herring
2022-11-27 18:22       ` Rob Herring
2023-01-13  7:06       ` Tony Lindgren
2023-01-13  7:06         ` Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.