Message ID | 20250227162823.3585810-6-david@protonic.nl (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Add Linux Motion Control subsystem | expand |
On Thu, Feb 27, 2025 at 05:28:21PM +0100, David Jander wrote: > +title: Common properties for motion control devices > + > +maintainers: > + - David Jander <david@protonic.nl> > + > +description: | > + This document defines device tree properties common to several motion control > + devices. It doesn't constitute a device tree binding specification by itself but Wrap at coding style, so at 80. > + is meant to be referenced by device tree bindings. > + > + When referenced from motion device tree bindings the properties defined in this > + document are defined as follows. The motion device tree bindings are responsible > + for defining whether each property is required or optional. > + > +properties: > + motion,speed-conv-mul: Drop incorrect motion prefix. > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 1 > + description: | Do not need '|' unless you need to preserve formatting. Best regards, Krzysztof
On 27/02/2025 17:28, David Jander wrote: > +properties: > + motion,speed-conv-mul: > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 1 > + description: | > + Numerator of a fractional representation of a speed conversion factor. > + The speed conversion factor (represented by numerator and denominator) > + is multiplied with the internal speed unit to obtain the physical speed > + unit of the controller. For example, for a stepper motor controller, the > + physical speed unit is microsteps/second (Hz). > + > + motion,speed-conv-div: > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 1 And I guess: minimum: 1 Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/motion/common.yaml b/Documentation/devicetree/bindings/motion/common.yaml new file mode 100644 index 000000000000..e92b360a0698 --- /dev/null +++ b/Documentation/devicetree/bindings/motion/common.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/motion/common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common properties for motion control devices + +maintainers: + - David Jander <david@protonic.nl> + +description: | + This document defines device tree properties common to several motion control + devices. It doesn't constitute a device tree binding specification by itself but + is meant to be referenced by device tree bindings. + + When referenced from motion device tree bindings the properties defined in this + document are defined as follows. The motion device tree bindings are responsible + for defining whether each property is required or optional. + +properties: + motion,speed-conv-mul: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 1 + description: | + Numerator of a fractional representation of a speed conversion factor. + The speed conversion factor (represented by numerator and denominator) + is multiplied with the internal speed unit to obtain the physical speed + unit of the controller. For example, for a stepper motor controller, the + physical speed unit is microsteps/second (Hz). + + motion,speed-conv-div: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 1 + description: | + Denominator of fractional representation of a speed conversion factor. + + motion,acceleration-conv-mul: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 1 + description: | + Numerator of a fractional representation of an acceleration conversion + factor. + + motion,acceleration-conv-div: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 1 + description: | + Denominator of fractional representation of an acceleration conversion + factor. + +additionalProperties: true
Add device-tree binding documentation for common Linux Motion Control device properties. Signed-off-by: David Jander <david@protonic.nl> --- .../devicetree/bindings/motion/common.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/motion/common.yaml