Re: [PATCH] dt-bindings: pwm: ti,pwm-omap-dmtimer: Update binding for yaml

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

 



On 18/11/2022 13:54, Tony Lindgren wrote:
> Update for yaml and remove the old txt binding.
> 
> Cc: Nishanth Menon <nm@xxxxxx>
> Cc: Vignesh Raghavendra <vigneshr@xxxxxx>
> Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>

Thank you for your patch. There is something to discuss/improve.

> -Example:
> -	pwm9: dmtimer-pwm@9 {
> -		compatible = "ti,omap-dmtimer-pwm";
> -		ti,timers = <&timer9>;
> -		#pwm-cells = <3>;
> -	};
> diff --git a/Documentation/devicetree/bindings/pwm/ti,pwm-omap-dmtimer.yaml b/Documentation/devicetree/bindings/pwm/ti,pwm-omap-dmtimer.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/ti,pwm-omap-dmtimer.yaml

Use filename matching the compatible, so ti,omap-dmtimer-pwm.yaml

> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/ti,pwm-omap-dmtimer.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TI dual mode timer PWM controller
> +
> +maintainers:
> +  - Tony Lindgren <tony@xxxxxxxxxxx>
> +
> +description:
> +  TI dual mode timer instances have an IO pin for PWM capability
> +
> +allOf:
> +  - $ref: pwm.yaml#
> +
> +properties:
> +  $nodename:
> +    pattern: "^pwm-([1-9]|1[0-2])$"

Drop the nodename, device schemas do not need to enforce it.

> +
> +  compatible:
> +    const: ti,omap-dmtimer-pwm
> +
> +  "#pwm-cells":
> +    const: 3
> +
> +  ti,timers:
> +    description: phandle to the timer instance used for PWM
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  ti,prescaler:
> +    description: legacy clock prescaled for timer
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
> +    deprecated: true

This was not deprecated before and your commit msg does not mention it.

> +
> +  ti,clock-source:
> +    description: legacy clock for timer, use assigned-clocks instead
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [ 0, 1, 2 ]

You miss here explanation of constants.

> +    deprecated: true

This was not deprecated before and your commit msg does not mention it.

> +
> +required:
> +  - compatible
> +  - ti,timers
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    pwm9: pwm-9 {

Node name: pwm

> +      compatible = "ti,omap-dmtimer-pwm";
> +      ti,timers = <&timer9>;
> +      #pwm-cells = <3>;
> +    };

Best regards,
Krzysztof




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux