* Re: [PATCH v3 3/3] dt-bindings: misc: servo-pwm: Add new bindings for servo-pwm
2023-02-17 16:10 ` [PATCH v3 3/3] dt-bindings: misc: servo-pwm: Add new bindings for servo-pwm Angelo Compagnucci
@ 2023-02-17 17:29 ` Rob Herring
2023-02-18 10:16 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2023-02-17 17:29 UTC (permalink / raw)
To: Angelo Compagnucci
Cc: Rob Herring, linux-pwm, devicetree, Angelo Compagnucci,
linux-kernel, Krzysztof Kozlowski
On Fri, 17 Feb 2023 17:10:37 +0100, Angelo Compagnucci wrote:
> This binding describes the binding for controlling servo motors through
> pwm.
>
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> ---
> v2:
> * Converted old txt to yaml
> v3:
> * Fixed errors rised by make dt_binding_check
>
> .../devicetree/bindings/misc/servo-pwm.yaml | 57 +++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 58 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/misc/servo-pwm.yaml
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/misc/servo-pwm.example.dts:19.24-25.11: Warning (unit_address_vs_reg): /example-0/servo@0: node has a unit name, but no reg or ranges property
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230217161038.3130053-3-angelo@amarulasolutions.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3 3/3] dt-bindings: misc: servo-pwm: Add new bindings for servo-pwm
2023-02-17 16:10 ` [PATCH v3 3/3] dt-bindings: misc: servo-pwm: Add new bindings for servo-pwm Angelo Compagnucci
2023-02-17 17:29 ` Rob Herring
@ 2023-02-18 10:16 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-18 10:16 UTC (permalink / raw)
To: Angelo Compagnucci
Cc: Angelo Compagnucci, Rob Herring, Krzysztof Kozlowski,
open list:GENERIC PWM SERVO DRIVER,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
On 17/02/2023 17:10, Angelo Compagnucci wrote:
> This binding describes the binding for controlling servo motors through
> pwm.
>
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> ---
> v2:
> * Converted old txt to yaml
> v3:
> * Fixed errors rised by make dt_binding_check
Still fails the tests.
Does not look like you tested the bindings. Please run `make
dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).
>
> .../devicetree/bindings/misc/servo-pwm.yaml | 57 +++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 58 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/misc/servo-pwm.yaml
>
> diff --git a/Documentation/devicetree/bindings/misc/servo-pwm.yaml b/Documentation/devicetree/bindings/misc/servo-pwm.yaml
> new file mode 100644
> index 000000000000..73e81b939daf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/servo-pwm.yaml
> @@ -0,0 +1,57 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/misc/servo-pwm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Servo motor connected to PWM
> +
> +maintainers:
> + - Angelo Compagnucci <angelo@amarulasolutions.com>
> +
> +description:
> + Each servo is represented as a servo-pwm device.
> + The 20ms period is the accepted standard and so most of the motors
> + support it, while the positioning min/max duty cycle or the motor
> + degrees aperture vary lot between manufacturers.
> + The most common type of servo (SG90) has 180 degrees of movement
> + and moves between 0.5ms and 2.5ms duty cycle.
> +
> +properties:
> + compatible:
> + const: servo-pwm
> +
> + pwms:
> + maxItems: 1
> +
> + pwm-names: true
You got later feedback from Rob for v2, so this needs changes.
> +
> + degrees:
> + description:
> + How many degrees the motor can move.
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + duty-min:
> + description:
> + Duty cycle for position the motor at 0 degrees.
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + duty-max:
> + description:
> + Duty cycle for positioning the motor at "degrees" angle.
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> +
Drop blank line.
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread