linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] pwm: pwm-gpio: Add DT bindings
@ 2020-12-05 21:46 Nicola Di Lieto
  2020-12-09  7:29 ` Uwe Kleine-König
  2020-12-10  3:28 ` Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Nicola Di Lieto @ 2020-12-05 21:46 UTC (permalink / raw)
  To: linux-kernel, devicetree
  Cc: Thierry Reding, Uwe Kleine-König, Lee Jones, Rob Herring

Added Documentation/devicetree/bindings/pwm/pwm-gpio.yaml

Signed-off-by: Nicola Di Lieto <nicola.dilieto@gmail.com>
---
 .../devicetree/bindings/pwm/pwm-gpio.yaml          | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/pwm-gpio.yaml

diff --git a/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml b/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
new file mode 100644
index 000000000000..2e021ac6ff4a
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/pwm-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic software PWM for modulating GPIOs
+
+maintainers:
+  - Nicola Di Lieto <nicola.dilieto@gmail.com>
+
+properties:
+  "#pwm-cells":
+    description: |
+      It must be 2. See pwm.yaml in this directory for a
+      description of the cells format.
+    const: 2
+
+  compatible:
+    const: pwm-gpio
+
+  gpios:
+    description:
+      GPIO to be modulated
+    maxItems: 1
+
+required:
+  - "#pwm-cells"
+  - compatible
+  - gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    pwm0 {
+        #pwm-cells = <2>;
+        compatible = "pwm-gpio";
+        gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+    };
-- 
2.11.0


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

* Re: [PATCH 2/2] pwm: pwm-gpio: Add DT bindings
  2020-12-05 21:46 [PATCH 2/2] pwm: pwm-gpio: Add DT bindings Nicola Di Lieto
@ 2020-12-09  7:29 ` Uwe Kleine-König
  2020-12-10  3:28 ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2020-12-09  7:29 UTC (permalink / raw)
  To: Nicola Di Lieto
  Cc: linux-kernel, devicetree, Thierry Reding, Lee Jones, Rob Herring

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

On Sat, Dec 05, 2020 at 10:46:16PM +0100, Nicola Di Lieto wrote:
> Added Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
> 
> Signed-off-by: Nicola Di Lieto <nicola.dilieto@gmail.com>
> ---
> .../devicetree/bindings/pwm/pwm-gpio.yaml          | 42 ++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
> 
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml b/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
> new file mode 100644
> index 000000000000..2e021ac6ff4a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
> @@ -0,0 +1,42 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/pwm-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic software PWM for modulating GPIOs
> +
> +maintainers:
> +  - Nicola Di Lieto <nicola.dilieto@gmail.com>
> +
> +properties:
> +  "#pwm-cells":
> +    description: |
> +      It must be 2. See pwm.yaml in this directory for a
> +      description of the cells format.

I think nowadays we prefer 3 here.

> +    const: 2
> +
> +  compatible:
> +    const: pwm-gpio
> +
> +  gpios:
> +    description:
> +      GPIO to be modulated
> +    maxItems: 1
> +

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] 4+ messages in thread

* Re: [PATCH 2/2] pwm: pwm-gpio: Add DT bindings
  2020-12-05 21:46 [PATCH 2/2] pwm: pwm-gpio: Add DT bindings Nicola Di Lieto
  2020-12-09  7:29 ` Uwe Kleine-König
@ 2020-12-10  3:28 ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-12-10  3:28 UTC (permalink / raw)
  To: Nicola Di Lieto
  Cc: Uwe Kleine-König, Rob Herring, Lee Jones, Thierry Reding,
	devicetree, linux-kernel

On Sat, 05 Dec 2020 22:46:16 +0100, Nicola Di Lieto wrote:
> Added Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
> 
> Signed-off-by: Nicola Di Lieto <nicola.dilieto@gmail.com>
> ---
>  .../devicetree/bindings/pwm/pwm-gpio.yaml          | 42 ++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* [PATCH 2/2] pwm: pwm-gpio: Add DT bindings
@ 2020-12-05 21:48 Nicola Di Lieto
  0 siblings, 0 replies; 4+ messages in thread
From: Nicola Di Lieto @ 2020-12-05 21:48 UTC (permalink / raw)
  To: linux-kernel

Added Documentation/devicetree/bindings/pwm/pwm-gpio.yaml

Signed-off-by: Nicola Di Lieto <nicola.dilieto@gmail.com>
---
 .../devicetree/bindings/pwm/pwm-gpio.yaml          | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/pwm-gpio.yaml

diff --git a/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml b/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
new file mode 100644
index 000000000000..2e021ac6ff4a
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/pwm-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic software PWM for modulating GPIOs
+
+maintainers:
+  - Nicola Di Lieto <nicola.dilieto@gmail.com>
+
+properties:
+  "#pwm-cells":
+    description: |
+      It must be 2. See pwm.yaml in this directory for a
+      description of the cells format.
+    const: 2
+
+  compatible:
+    const: pwm-gpio
+
+  gpios:
+    description:
+      GPIO to be modulated
+    maxItems: 1
+
+required:
+  - "#pwm-cells"
+  - compatible
+  - gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    pwm0 {
+        #pwm-cells = <2>;
+        compatible = "pwm-gpio";
+        gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+    };
-- 
2.11.0


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

end of thread, other threads:[~2020-12-10  3:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 21:46 [PATCH 2/2] pwm: pwm-gpio: Add DT bindings Nicola Di Lieto
2020-12-09  7:29 ` Uwe Kleine-König
2020-12-10  3:28 ` Rob Herring
2020-12-05 21:48 Nicola Di Lieto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).