[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230528162813.6a7263e5@jic23-huawei>
Date: Sun, 28 May 2023 16:28:13 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Maxim Kiselev <bigunclemax@...il.com>
Cc: linux-iio@...r.kernel.org, Lars-Peter Clausen <lars@...afoo.de>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Conor Dooley <conor@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Philipp Zabel <p.zabel@...gutronix.de>,
Andre Przywara <andre.przywara@....com>,
Heiko Stuebner <heiko.stuebner@...ll.eu>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Cosmin Tanislav <demonsingur@...il.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Alexander Sverdlin <alexander.sverdlin@...il.com>,
Ramona Bolboaca <ramona.bolboaca@...log.com>,
William Breathitt Gray <william.gray@...aro.org>,
ChiYuan Huang <cy_huang@...htek.com>,
Ibrahim Tilki <Ibrahim.Tilki@...log.com>,
Caleb Connolly <caleb.connolly@...aro.org>,
Arnd Bergmann <arnd@...db.de>,
Mike Looijmans <mike.looijmans@...ic.nl>,
ChiaEn Wu <chiaen_wu@...htek.com>,
Haibo Chen <haibo.chen@....com>,
Hugo Villeneuve <hvilleneuve@...onoff.com>,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-sunxi@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org
Subject: Re: [RFC PATCH v1 2/4] dt-bindings: iio: adc: Add Allwinner
D1/T113s/R329 SoCs GPADC
On Wed, 24 May 2023 11:27:31 +0300
Maxim Kiselev <bigunclemax@...il.com> wrote:
> Allwinner's D1, T113s and R329 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.
>
> Signed-off-by: Maxim Kiselev <bigunclemax@...il.com>
> ---
> .../iio/adc/allwinner,sun20i-d1-gpadc.yaml | 52 +++++++++++++++++++
> 1 file changed, 52 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml
>
> diff --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..a79b874750dd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%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: 0
That's odd for a device with more than one channel. How do you reference
which channel you want to consume?
> +
> + clocks:
> + maxItems: 1
> +
> + compatible:
> + enum:
> + - allwinner,sun20i-d1-gpadc
> + - allwinner,sun8i-t113-gpadc
> + - allwinner,sun50i-r329-gpadc
> +
> + interrupts:
> + maxItems: 1
> +
> + reg:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> +required:
> + - "#io-channel-cells"
> + - clocks
> + - compatible
> + - interrupts
> + - reg
> + - resets
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + gpadc: adc@...9000 {
> + compatible = "allwinner,sun20i-d1-gpadc";
> + reg = <0x2009000 0x1000>;
> + clocks = <&ccu CLK_BUS_GPADC>;
> + resets = <&ccu RST_BUS_GPADC>;
> + interrupts = <SOC_PERIPHERAL_IRQ(57) IRQ_TYPE_LEVEL_HIGH>;
I guess the bot probably got this, but to use these macros you need some includes.
> + #io-channel-cells = <0>;
> + };
> +
> +...
Powered by blists - more mailing lists