Re: [PATCH v6 1/2] dt-bindings: pwm: Add pwm-gpio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 02, 2024 at 10:33:08PM +0200, Linus Walleij wrote:
> From: Nicola Di Lieto <nicola.dilieto@xxxxxxxxx>
>
> Add bindings for PWM modulated by GPIO.
>

Shouldn't the bindings be added after the driver?

> Signed-off-by: Nicola Di Lieto <nicola.dilieto@xxxxxxxxx>
> Co-developed-by: Stefan Wahren <wahrenst@xxxxxxx>
> Signed-off-by: Stefan Wahren <wahrenst@xxxxxxx>
> Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> Reviewed-by: Dhruva Gole <d-gole@xxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> ---
>  .../devicetree/bindings/pwm/pwm-gpio.yaml          | 42 ++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml b/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
> new file mode 100644
> index 000000000000..1a1281e0fbd7
> --- /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:
> +  - Stefan Wahren <wahrenst@xxxxxxx>
> +
> +allOf:
> +  - $ref: pwm.yaml#
> +
> +properties:
> +  compatible:
> +    const: pwm-gpio
> +
> +  "#pwm-cells":
> +    const: 3
> +

What is the significance of the 3 here?

Sorry if that is obvious, but it isn't to me.

Cheers,
Kent.

> +  gpios:
> +    description:
> +      GPIO to be modulated
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - "#pwm-cells"
> +  - gpios
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    pwm {
> +        #pwm-cells = <3>;
> +        compatible = "pwm-gpio";
> +        gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
> +    };
>
> --
> 2.45.1
>




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux