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]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux