[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250228-wonderful-python-of-resistance-d5b662@krzk-bin>
Date: Fri, 28 Feb 2025 08:12:45 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: David Jander <david@...tonic.nl>
Cc: linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
Jonathan Corbet <corbet@....net>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, devicetree@...r.kernel.org,
linux-doc@...r.kernel.org, Nuno Sa <nuno.sa@...log.com>,
Jonathan Cameron <jic23@...nel.org>, Oleksij Rempel <o.rempel@...gutronix.de>
Subject: Re: [RFC PATCH 7/7] dt-bindings: motion: Add motion-simple-pwm
bindings
On Thu, Feb 27, 2025 at 05:28:23PM +0100, David Jander wrote:
> Add device-tree bindings for simple Linux Motion Control devices that
> are based on 1 or 2 PWM outputs.
>
> Signed-off-by: David Jander <david@...tonic.nl>
> ---
> .../bindings/motion/motion-simple-pwm.yaml | 55 +++++++++++++++++++
> 1 file changed, 55 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/motion/motion-simple-pwm.yaml
>
> diff --git a/Documentation/devicetree/bindings/motion/motion-simple-pwm.yaml b/Documentation/devicetree/bindings/motion/motion-simple-pwm.yaml
> new file mode 100644
> index 000000000000..409e3aef6f3f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/motion/motion-simple-pwm.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/motion/motion-simple-pwm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Simple PWM based motor controller
> +
> +maintainers:
> + - David Jander <david@...tonic>
> +
> +description: |
Do not need '|' unless you need to preserve formatting.
> + Simple motor control device based on 1 or 2 PWM outputs
Your schema does not allow 1. Test it.
> +
> +properties:
> + compatible:
> + enum:
> + - motion-simple-pwm
> +
> + pwms:
> + maxItems: 2
List and describe items instead.
> +
> + pwm-names:
> + maxItems: 2
List items instead.
> +
> + motion,pwm-inverted:
> + $ref: /schemas/types.yaml#/definitions/flag
And PWM flag does not work?
Anyway, there is no "motion" company.
> + description:
> + If present, this flag indicates that the PWM signal should be inverted.
> + The duty-cycle will be scaled from 100% down to 0% instead 0% to 100%.
> +
> +required:
> + - compatible
> + - pwms
> +
> +allOf:
> + - $ref: /schemas/motion/common.yaml#
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + // This example shows how to use the TI DRV8873 or similar motor controllers
> + // with this driver
> + motion-simple-pwm0 {
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
e.g. motor {
Best regards,
Krzysztof
Powered by blists - more mailing lists