Re: [PATCH v2 2/3] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC
flat view
From: Krzysztof Kozlowski <hidden>
Date: 2023-06-02 08:38:34
Also in:
linux-devicetree, linux-iio, linux-riscv, linux-sunxi, lkml
On 02/06/2023 00:30, Maksim Kiselev wrote:
From: Maxim Kiselev <redacted> Allwinner's D1/T113s/R329/T507 SoCs have a new general purpose ADC. This ADC is the same for all of this SoCs. The only difference is the number of available channels.
Except that it wasn't tested...
quoted hunk ↗ jump to hunk
Signed-off-by: Maxim Kiselev <redacted> --- .../iio/adc/allwinner,sun20i-d1-gpadc.yaml | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yamldiff --git a/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml new file mode 100644 index 000000000000..94f15bb48231 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml@@ -0,0 +1,79 @@ +# SPDX-License-Identifier: GPL-2.0
dual license Please run scripts/checkpatch.pl and fix reported warnings. Some warnings can be ignored, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear.
quoted hunk ↗ jump to hunk
+%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/allwinner,sun20i-d1-gpadc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner D1 General Purpose ADC + +properties: + "#io-channel-cells": + const: 1 + + clocks: + maxItems: 1 + + compatible: + enum: + - allwinner,sun20i-d1-gpadc
compatible is first property
quoted hunk ↗ jump to hunk
+ + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - "#io-channel-cells" + - clocks + - compatible + - interrupts + - reg + - resets
required: block goes after all properties.
quoted hunk ↗ jump to hunk
+ +patternProperties: + "^channel@([0-15])$": + $ref: adc.yaml + type: object + description: |
Do not need '|' unless you need to preserve formatting.
quoted hunk ↗ jump to hunk
+ Represents the internal channels of the ADC. + + properties: + reg:
+ description: |
Do not need '|' unless you need to preserve formatting.
+ The channel number. + Up to 16 channels, numbered from 0 to 15.
Don't repeat constraints in free form text.
quoted hunk ↗ jump to hunk
+ items: + minimum: 0 + maximum: 15 + + required: + - reg + + additionalProperties: false
Hm? So you do not allow anything from adc.yaml related? Are you sure this is your intention?
quoted hunk ↗ jump to hunk
+ +additionalProperties: false + +examples: + - | + gpadc: adc@2009000 { + compatible = "allwinner,sun20i-d1-gpadc"; + reg = <0x2009000 0x1000>; + clocks = <&ccu 80>; + resets = <&ccu 32>; + interrupts = <0 57 4>;
Use proper defines
quoted hunk ↗ jump to hunk
+ #io-channel-cells = <1>; + + channel@0 { + reg = <0>;
Broken indentation. Use 4 spaces for example indentation.
quoted hunk ↗ jump to hunk
+ }; + + channel@1 { + reg = <1>; + }; + }; + +...
Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel