dt-bindings: mfd: convert mxs-lradc.txt to yaml format
Frank Li
maintainerPATCH 1/1 dt-bindings: mfd: convert mxs-lradc.txt to yaml format
Convert mxs-lradc.txt to yaml format.
Additional changes:
- Only keep one example.
- Change node name to adc.
- Add clocks and #io-channel-cells.
--- .../bindings/mfd/fsl,imx28-lradc.yaml | 85 +++++++++++++++++++ .../devicetree/bindings/mfd/mxs-lradc.txt | 45 ---------- 2 files changed, 85 insertions(+), 45 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/fsl,imx28-lradc.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.txt
Documentation/devicetree/bindings/mfd/fsl,imx28-lradc.yaml new file +85 -0
@@ -0,0 +1,85 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/fsl,imx28-lradc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MXS LRADC + +maintainers: + - Frank Li <[email protected]> + +properties: + compatible: + enum: + - fsl,imx23-lradc + - fsl,imx28-lradc + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 13 + + '#io-channel-cells': + const: 1 + + clocks: + maxItems: 1 + + fsl,lradc-touchscreen-wires: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [4, 5] + description: + Number of wires used to connect the touchscreen + to LRADC. Valid value is either 4 or 5. If this + property is not present, then the touchscreen is + disabled. 5 wires is valid for i.MX28 SoC only. + + fsl,ave-ctrl: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 4 + minimum: 1 + maximum: 32 + description: + number of samples per direction to calculate an average value. + + fsl,ave-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 2 + maximum: 2048 + description: + delay between consecutive samples. + It is used if 'fsl,ave-ctrl' > 1, counts at + 2 kHz and its default is 2 (= 1 ms) + + + fsl,settling: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 2047 + description: + delay between plate switch to next sample. + It counts at 2 kHz and its default is 10 (= 5 ms) + + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + adc@80050000 { + compatible = "fsl,imx23-lradc"; + reg = <0x80050000 0x2000>; + interrupts = <36 37 38 39 40 41 42 43 44>; + fsl,lradc-touchscreen-wires = <4>; + fsl,ave-ctrl = <4>; + fsl,ave-delay = <2>; + fsl,settling = <10>; + }; +
Documentation/devicetree/bindings/mfd/mxs-lradc.txt deleted +0 -45
45 lines not on this page · raw message
Signature · 1 line
2.34.1
Rob Herring (Arm)
maintainerQuoted 7 lines · Frank Li
Convert mxs-lradc.txt to yaml format.
Additional changes:
- Only keep one example.
- Change node name to adc.
- Add clocks and #io-channel-cells.
Quoted 8 lines
Signed-off-by Frank Li <[email protected]>--- .../bindings/mfd/fsl,imx28-lradc.yaml | 85 +++++++++++++++++++ .../devicetree/bindings/mfd/mxs-lradc.txt | 45 ---------- 2 files changed, 85 insertions(+), 45 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/fsl,imx28-lradc.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.txt
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/fsl,imx28-lradc.example.dtb: fake-interrupt-controller: #interrupt-cells: 9 is greater than the maximum of 8
from schema $id: http://devicetree.org/schemas/dt-core.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
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.