lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230217232327.GA2243296-robh@kernel.org>
Date:   Fri, 17 Feb 2023 17:23:27 -0600
From:   Rob Herring <robh@...nel.org>
To:     Angelo Compagnucci <angelo.compagnucci@...il.com>
Cc:     Angelo Compagnucci <angelo@...rulasolutions.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-pwm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] dt-bindings: leds: servo-pwm: Add new bindings
 for servo-pwm

On Fri, Feb 17, 2023 at 03:57:30PM +0100, Angelo Compagnucci wrote:
> This binding describes the binding for controlling servo motors through
> pwm.
> 
> Signed-off-by: Angelo Compagnucci <angelo@...rulasolutions.com>
> ---
>  .../devicetree/bindings/misc/servo-pwm.yaml   | 59 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 60 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..faa8d4734817
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/servo-pwm.yaml
> @@ -0,0 +1,59 @@
> +# 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@...rulasolutions.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
> +
> +patternProperties:
> +  properties:
> +    pwms:
> +      maxItems: 1
> +
> +    pwm-names: true

Drop. '-names' is for when there is more than 1.
> +
> +    degrees:

Kind of vague: servo-degrees

> +      description:
> +        How many degrees the motor can move.
> +      $ref: /schemas/types.yaml#/definitions/uint32

0-2^32 are valid degrees?

> +
> +    duty-min:
> +      description:
> +        Duty cycle for position the motor at 0 degrees.

Units are ms? percent? Use standard unit suffix.

> +      $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:
> +  - |
> +
> +    servo: servo@0 {
> +      compatible = "servo-pwm";
> +      pwms = <&pwm 0 20000000 0>;
> +      degrees = <180>;
> +      duty-min = <500000>;
> +      duty-max = <2500000>;
> +    };
> +
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 356daea0861d..8f41daee62fc 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -8742,6 +8742,7 @@ M:	"Angelo Compagnucci" <angelo@...rulasolutions.com>
>  L:	linux-pwm@...r.kernel.org
>  S:	Maintained
>  F:	Documentation/ABI/testing/sysfs-driver-servo-pwm
> +F:	Documentation/devicetree/bindings/misc/servo-pwm.yaml
>  F:	drivers/misc/servo-pwm.c
>  
>  GENERIC RESISTIVE TOUCHSCREEN ADC DRIVER
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ