* [PATCH] dt-bindings: pwm: Avoid selecting schema on node name match
@ 2021-12-07 12:48 Thierry Reding
2021-12-08 18:48 ` Rob Herring
0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2021-12-07 12:48 UTC (permalink / raw)
To: Thierry Reding, Rob Herring; +Cc: linux-pwm, devicetree
From: Thierry Reding <treding@nvidia.com>
Currently any node whose name starts with the "pwm-" prefix will match
this schema and in turn required the "#pwm-cells" property. Avoid this
by marking the schema with select: false, therefore only activating the
schema when directly included from a PWM controller schema file.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Rob,
I've seen this used in some other schema files, but wanted to
double-check with you if this is the correct solution for this problem.
Thanks,
Thierry
Documentation/devicetree/bindings/pwm/pwm.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/pwm/pwm.yaml b/Documentation/devicetree/bindings/pwm/pwm.yaml
index 2effe6c0de6b..3c01f85029e5 100644
--- a/Documentation/devicetree/bindings/pwm/pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/pwm.yaml
@@ -9,6 +9,8 @@ title: PWM controllers (providers)
maintainers:
- Thierry Reding <thierry.reding@gmail.com>
+select: false
+
properties:
$nodename:
pattern: "^pwm(@.*|-[0-9a-f])*$"
--
2.33.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: pwm: Avoid selecting schema on node name match
2021-12-07 12:48 [PATCH] dt-bindings: pwm: Avoid selecting schema on node name match Thierry Reding
@ 2021-12-08 18:48 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2021-12-08 18:48 UTC (permalink / raw)
To: Thierry Reding; +Cc: linux-pwm, devicetree
On Tue, Dec 07, 2021 at 01:48:55PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Currently any node whose name starts with the "pwm-" prefix will match
> this schema and in turn required the "#pwm-cells" property. Avoid this
> by marking the schema with select: false, therefore only activating the
> schema when directly included from a PWM controller schema file.
Pinctrl nodes? I'd rather change pin node names.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Rob,
>
> I've seen this used in some other schema files, but wanted to
> double-check with you if this is the correct solution for this problem.
I suppose this is fine. This schema is just about pointless as each
producer has to define #pwm-cells anyways.
Acked-by: Rob Herring <robh@kernel.org>
>
> Thanks,
> Thierry
>
> Documentation/devicetree/bindings/pwm/pwm.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pwm/pwm.yaml b/Documentation/devicetree/bindings/pwm/pwm.yaml
> index 2effe6c0de6b..3c01f85029e5 100644
> --- a/Documentation/devicetree/bindings/pwm/pwm.yaml
> +++ b/Documentation/devicetree/bindings/pwm/pwm.yaml
> @@ -9,6 +9,8 @@ title: PWM controllers (providers)
> maintainers:
> - Thierry Reding <thierry.reding@gmail.com>
>
> +select: false
> +
> properties:
> $nodename:
> pattern: "^pwm(@.*|-[0-9a-f])*$"
> --
> 2.33.1
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-08 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 12:48 [PATCH] dt-bindings: pwm: Avoid selecting schema on node name match Thierry Reding
2021-12-08 18:48 ` Rob Herring
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.