2023-05-30 14:57:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 0/7] dt-bindings: restrict node name suffixes

Hi,

Tree-wide cleanup of DTS node name suffixes "-N", e.g. "pwm-5", so we allow
only decimal numbers. In few cases narrow the pattern to also disallow
multiple suffixes, e.g. "pwm-5-5".

No dependencies, can be applied by individual subsystems.

Cc: Tony Lindgren <[email protected]>
Cc: Oleksij Rempel <[email protected]>

Link: https://lore.kernel.org/all/[email protected]/

Best regards,
Krzysztof

Krzysztof Kozlowski (7):
dt-bindings: phy: intel,combo-phy: restrict node name suffixes
dt-bindings: pwm: restrict node name suffixes
dt-bindings: rtc: restrict node name suffixes
dt-bindings: slimbus: restrict node name suffixes
spi: dt-bindings: restrict node name suffixes
dt-bindings: timestamp: restrict node name suffixes
dt-bindings: watchdog: restrict node name suffixes

Documentation/devicetree/bindings/phy/intel,combo-phy.yaml | 2 +-
Documentation/devicetree/bindings/pwm/pwm.yaml | 2 +-
Documentation/devicetree/bindings/rtc/rtc.yaml | 2 +-
Documentation/devicetree/bindings/slimbus/slimbus.yaml | 2 +-
Documentation/devicetree/bindings/spi/spi-controller.yaml | 2 +-
.../bindings/timestamp/hardware-timestamps-common.yaml | 2 +-
Documentation/devicetree/bindings/watchdog/watchdog.yaml | 4 ++--
7 files changed, 8 insertions(+), 8 deletions(-)

--
2.34.1



2023-05-30 14:58:33

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 2/7] dt-bindings: pwm: restrict node name suffixes

Make the pattern matching node names a bit stricter to improve DTS
consistency. The pattern is restricted to:
1. Only one unit address or one -N suffix,
2. -N suffixes to decimal numbers.

Suggested-by: Rob Herring <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

Cc: Tony Lindgren <[email protected]>
Cc: Oleksij Rempel <[email protected]>
---
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
index 3c01f85029e5..abd9fa873354 100644
--- 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-9]|[1-9][0-9]+))?$"

"#pwm-cells":
description:
--
2.34.1


2023-05-30 14:58:43

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 1/7] dt-bindings: phy: intel,combo-phy: restrict node name suffixes

Make the pattern matching node names a bit stricter to improve DTS
consistency. The pattern is restricted to:
1. Only one unit address or one -N suffix,
2. -N suffixes to decimal numbers.

Suggested-by: Rob Herring <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

Cc: Tony Lindgren <[email protected]>
Cc: Oleksij Rempel <[email protected]>
---
Documentation/devicetree/bindings/phy/intel,combo-phy.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/phy/intel,combo-phy.yaml b/Documentation/devicetree/bindings/phy/intel,combo-phy.yaml
index 5d54b0a0e873..7dd6a4d94b48 100644
--- a/Documentation/devicetree/bindings/phy/intel,combo-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/intel,combo-phy.yaml
@@ -15,7 +15,7 @@ description: |

properties:
$nodename:
- pattern: "combophy(@.*|-[0-9a-f])*$"
+ pattern: "combophy(@.*|-([0-9]|[1-9][0-9]+))?$"

compatible:
items:
--
2.34.1


2023-05-30 14:59:15

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 5/7] spi: dt-bindings: restrict node name suffixes

Make the pattern matching node names a bit stricter to improve DTS
consistency. The pattern is restricted to:
1. Only one unit address or one -N suffix,
2. -N suffixes to decimal numbers.

Suggested-by: Rob Herring <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

Cc: Tony Lindgren <[email protected]>
Cc: Oleksij Rempel <[email protected]>
---
Documentation/devicetree/bindings/spi/spi-controller.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml
index 90945f59b7e8..524f6fe8c27b 100644
--- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
@@ -17,7 +17,7 @@ description: |

properties:
$nodename:
- pattern: "^spi(@.*|-[0-9a-f])*$"
+ pattern: "^spi(@.*|-([0-9]|[1-9][0-9]+))?$"

"#address-cells":
enum: [0, 1]
--
2.34.1


2023-05-30 15:37:24

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 0/7] dt-bindings: restrict node name suffixes

Hello,

On Tue, May 30, 2023 at 04:48:44PM +0200, Krzysztof Kozlowski wrote:
> Hi,
>
> Tree-wide cleanup of DTS node name suffixes "-N", e.g. "pwm-5", so we allow
> only decimal numbers. In few cases narrow the pattern to also disallow
> multiple suffixes, e.g. "pwm-5-5".
>
> No dependencies, can be applied by individual subsystems.

Acked-by: Uwe Kleine-K?nig <[email protected]>

Thanks
Uwe

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


Attachments:
(No filename) (585.00 B)
signature.asc (499.00 B)
Download all attachments

2023-05-30 17:16:21

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH 0/7] dt-bindings: restrict node name suffixes

On Tue, May 30, 2023 at 04:48:44PM +0200, Krzysztof Kozlowski wrote:
> Hi,
>
> Tree-wide cleanup of DTS node name suffixes "-N", e.g. "pwm-5", so we allow
> only decimal numbers. In few cases narrow the pattern to also disallow
> multiple suffixes, e.g. "pwm-5-5".

I figure there'll be quite a bit of stuff to fix up afterwards?
Reviewed-by: Conor Dooley <[email protected]>

Thanks,
Conor.

>
> No dependencies, can be applied by individual subsystems.
>
> Cc: Tony Lindgren <[email protected]>
> Cc: Oleksij Rempel <[email protected]>
>
> Link: https://lore.kernel.org/all/[email protected]/
>
> Best regards,
> Krzysztof
>
> Krzysztof Kozlowski (7):
> dt-bindings: phy: intel,combo-phy: restrict node name suffixes
> dt-bindings: pwm: restrict node name suffixes
> dt-bindings: rtc: restrict node name suffixes
> dt-bindings: slimbus: restrict node name suffixes
> spi: dt-bindings: restrict node name suffixes
> dt-bindings: timestamp: restrict node name suffixes
> dt-bindings: watchdog: restrict node name suffixes
>
> Documentation/devicetree/bindings/phy/intel,combo-phy.yaml | 2 +-
> Documentation/devicetree/bindings/pwm/pwm.yaml | 2 +-
> Documentation/devicetree/bindings/rtc/rtc.yaml | 2 +-
> Documentation/devicetree/bindings/slimbus/slimbus.yaml | 2 +-
> Documentation/devicetree/bindings/spi/spi-controller.yaml | 2 +-
> .../bindings/timestamp/hardware-timestamps-common.yaml | 2 +-
> Documentation/devicetree/bindings/watchdog/watchdog.yaml | 4 ++--
> 7 files changed, 8 insertions(+), 8 deletions(-)
>
> --
> 2.34.1
>


Attachments:
(No filename) (1.67 kB)
signature.asc (235.00 B)
Download all attachments

2023-05-30 18:44:10

by Mark Brown

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/7] dt-bindings: restrict node name suffixes

On Tue, 30 May 2023 16:48:44 +0200, Krzysztof Kozlowski wrote:
> Tree-wide cleanup of DTS node name suffixes "-N", e.g. "pwm-5", so we allow
> only decimal numbers. In few cases narrow the pattern to also disallow
> multiple suffixes, e.g. "pwm-5-5".
>
> No dependencies, can be applied by individual subsystems.
>
> Cc: Tony Lindgren <[email protected]>
> Cc: Oleksij Rempel <[email protected]>
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[5/7] spi: dt-bindings: restrict node name suffixes
commit: c4fb6880edc15866a530c7b8f2698ae65f80cfab

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


2023-05-31 04:29:25

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 5/7] spi: dt-bindings: restrict node name suffixes

* Krzysztof Kozlowski <[email protected]> [230530 14:49]:
> Make the pattern matching node names a bit stricter to improve DTS
> consistency. The pattern is restricted to:
> 1. Only one unit address or one -N suffix,
> 2. -N suffixes to decimal numbers.

Reviewed-by: Tony Lindgren <[email protected]>

2023-05-31 04:30:06

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 1/7] dt-bindings: phy: intel,combo-phy: restrict node name suffixes

* Krzysztof Kozlowski <[email protected]> [230530 14:49]:
> Make the pattern matching node names a bit stricter to improve DTS
> consistency. The pattern is restricted to:
> 1. Only one unit address or one -N suffix,
> 2. -N suffixes to decimal numbers.

Reviewed-by: Tony Lindgren <[email protected]>

2023-05-31 04:41:46

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 2/7] dt-bindings: pwm: restrict node name suffixes

* Krzysztof Kozlowski <[email protected]> [230530 14:49]:
> Make the pattern matching node names a bit stricter to improve DTS
> consistency. The pattern is restricted to:
> 1. Only one unit address or one -N suffix,
> 2. -N suffixes to decimal numbers.
>
> Suggested-by: Rob Herring <[email protected]>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Reviewed-by: Tony Lindgren <[email protected]>

2023-05-31 07:14:40

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 0/7] dt-bindings: restrict node name suffixes

On 30/05/2023 19:11, Conor Dooley wrote:
> On Tue, May 30, 2023 at 04:48:44PM +0200, Krzysztof Kozlowski wrote:
>> Hi,
>>
>> Tree-wide cleanup of DTS node name suffixes "-N", e.g. "pwm-5", so we allow
>> only decimal numbers. In few cases narrow the pattern to also disallow
>> multiple suffixes, e.g. "pwm-5-5".
>
> I figure there'll be quite a bit of stuff to fix up afterwards?
> Reviewed-by: Conor Dooley <[email protected]>

Quick grep shown zero fixes needed.

Best regards,
Krzysztof


2023-06-07 07:52:44

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/7] dt-bindings: pwm: restrict node name suffixes

On 07/06/2023 09:36, Uwe Kleine-König wrote:
> On Tue, May 30, 2023 at 04:48:46PM +0200, Krzysztof Kozlowski wrote:
>> Make the pattern matching node names a bit stricter to improve DTS
>> consistency. The pattern is restricted to:
>> 1. Only one unit address or one -N suffix,
>> 2. -N suffixes to decimal numbers.
>>
>> Suggested-by: Rob Herring <[email protected]>
>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
>>
>> ---
>>
>> Cc: Tony Lindgren <[email protected]>
>> Cc: Oleksij Rempel <[email protected]>
>> ---
>> 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
>> index 3c01f85029e5..abd9fa873354 100644
>> --- 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-9]|[1-9][0-9]+))?$"
>
> With this patch we forbid now the following patterns:
>
> pwm-[0-9a-f][@-].*
> pwm-0[0-9a-f]+
> pwm-[a-f]([@-].*)?

Yes, this was discussed last time:
https://lore.kernel.org/all/[email protected]/

>
> Checking for such names:
>
> $ git grep -oP '\bpwm-([0-9a-f][@-].*|0[0-9a-f]+|[0-9]*[a-f][0-9a-f]*)(*pla:\s*\{)' arch/*/boot/dts
> arch/arm/boot/dts/meson8.dtsi:pwm-f-ao
> arch/arm/boot/dts/meson8.dtsi:pwm-e
> arch/arm/boot/dts/meson8b.dtsi:pwm-d
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-a
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-b-x7
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-b-x19
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-c-c
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-c-x5
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-c-x8
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-d-x3
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-d-x6
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-e
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-f-z
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-f-a
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-f-x
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-f-h
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-a-e

Are you sure these are pwms, not pins?

>
> These are all pinmux-settings and no pwm nodes, so the change is fine.
> (But arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi isn't properly
> sorted alphabetically.)

Exactly...

>
> Reviewed-by: Uwe Kleine-König <[email protected]>


Best regards,
Krzysztof


2023-06-07 07:52:52

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 2/7] dt-bindings: pwm: restrict node name suffixes

On Tue, May 30, 2023 at 04:48:46PM +0200, Krzysztof Kozlowski wrote:
> Make the pattern matching node names a bit stricter to improve DTS
> consistency. The pattern is restricted to:
> 1. Only one unit address or one -N suffix,
> 2. -N suffixes to decimal numbers.
>
> Suggested-by: Rob Herring <[email protected]>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

>
> ---
>
> Cc: Tony Lindgren <[email protected]>
> Cc: Oleksij Rempel <[email protected]>
> ---
> 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
> index 3c01f85029e5..abd9fa873354 100644
> --- 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-9]|[1-9][0-9]+))?$"

With this patch we forbid now the following patterns:

pwm-[0-9a-f][@-].*
pwm-0[0-9a-f]+
pwm-[a-f]([@-].*)?

Checking for such names:

$ git grep -oP '\bpwm-([0-9a-f][@-].*|0[0-9a-f]+|[0-9]*[a-f][0-9a-f]*)(*pla:\s*\{)' arch/*/boot/dts
arch/arm/boot/dts/meson8.dtsi:pwm-f-ao
arch/arm/boot/dts/meson8.dtsi:pwm-e
arch/arm/boot/dts/meson8b.dtsi:pwm-d
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-a
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-b-x7
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-b-x19
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-c-c
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-c-x5
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-c-x8
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-d-x3
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-d-x6
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-e
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-f-z
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-f-a
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-f-x
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-f-h
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:pwm-a-e

These are all pinmux-settings and no pwm nodes, so the change is fine.
(But arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi isn't properly
sorted alphabetically.)

Reviewed-by: Uwe Kleine-K?nig <[email protected]>

Best regards and Thanks
Uwe

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


Attachments:
(No filename) (2.62 kB)
signature.asc (499.00 B)
Download all attachments

2023-06-09 15:12:43

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 2/7] dt-bindings: pwm: restrict node name suffixes


On Tue, 30 May 2023 16:48:46 +0200, Krzysztof Kozlowski wrote:
> Make the pattern matching node names a bit stricter to improve DTS
> consistency. The pattern is restricted to:
> 1. Only one unit address or one -N suffix,
> 2. -N suffixes to decimal numbers.
>
> Suggested-by: Rob Herring <[email protected]>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> ---
>
> Cc: Tony Lindgren <[email protected]>
> Cc: Oleksij Rempel <[email protected]>
> ---
> Documentation/devicetree/bindings/pwm/pwm.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Acked-by: Rob Herring <[email protected]>


2023-06-09 15:14:48

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/7] dt-bindings: phy: intel,combo-phy: restrict node name suffixes


On Tue, 30 May 2023 16:48:45 +0200, Krzysztof Kozlowski wrote:
> Make the pattern matching node names a bit stricter to improve DTS
> consistency. The pattern is restricted to:
> 1. Only one unit address or one -N suffix,
> 2. -N suffixes to decimal numbers.
>
> Suggested-by: Rob Herring <[email protected]>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> ---
>
> Cc: Tony Lindgren <[email protected]>
> Cc: Oleksij Rempel <[email protected]>
> ---
> Documentation/devicetree/bindings/phy/intel,combo-phy.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Acked-by: Rob Herring <[email protected]>


2023-06-21 17:42:24

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH 1/7] dt-bindings: phy: intel,combo-phy: restrict node name suffixes

On 30-05-23, 16:48, Krzysztof Kozlowski wrote:
> Make the pattern matching node names a bit stricter to improve DTS
> consistency. The pattern is restricted to:
> 1. Only one unit address or one -N suffix,
> 2. -N suffixes to decimal numbers.

Applied, thanks

--
~Vinod

2023-06-23 15:04:12

by Thierry Reding

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/7] dt-bindings: restrict node name suffixes


On Tue, 30 May 2023 16:48:44 +0200, Krzysztof Kozlowski wrote:
> Tree-wide cleanup of DTS node name suffixes "-N", e.g. "pwm-5", so we allow
> only decimal numbers. In few cases narrow the pattern to also disallow
> multiple suffixes, e.g. "pwm-5-5".
>
> No dependencies, can be applied by individual subsystems.
>
> Cc: Tony Lindgren <[email protected]>
> Cc: Oleksij Rempel <[email protected]>
>
> [...]

Applied, thanks!

[2/7] dt-bindings: pwm: restrict node name suffixes
commit: 05b743db9d8cc4e51b3eb77889d24ab9aa2bf169

Best regards,
--
Thierry Reding <[email protected]>