devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Chris Morgan <macroalpha82@gmail.com>
Cc: linux-sunxi@lists.linux.dev, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-iio@vger.kernel.org,
	p.zabel@pengutronix.de, sboyd@kernel.org,
	mturquette@baylibre.com, samuel@sholland.org,
	jernej.skrabec@gmail.com, wens@csie.org, conor+dt@kernel.org,
	krzk+dt@kernel.org, robh@kernel.org,
	Chris Morgan <macromorgan@hotmail.com>
Subject: Re: [PATCH 2/3] dt-bindings: iio: adc: Add GPADC for Allwinner H616
Date: Wed, 17 Apr 2024 23:49:57 +0100	[thread overview]
Message-ID: <20240417234957.2fcd14bb@minigeek.lan> (raw)
In-Reply-To: <20240417170423.20640-3-macroalpha82@gmail.com>

On Wed, 17 Apr 2024 12:04:22 -0500
Chris Morgan <macroalpha82@gmail.com> wrote:

Hi,

> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add support for the GPADC for the Allwinner H616. It is identical to
> the existing ADC for the D1/T113s/R329/T507 SoCs.

The H616 is using the same die as the T507 and the H700, and since the
T507 is already mentioned in the commit message for the original
binding, I wonder if we actually need a new compatible?
I guess we follow the usual approach and provide this new
per-SoC compatible string, since the D1 and H616 SoCs are quite
different? Just wanted to point this out...

> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
>  .../bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml      | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml
> index 7ef46c90ebc8..da605a051b94 100644
> --- a/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml
> @@ -11,8 +11,13 @@ maintainers:
>  
>  properties:
>    compatible:
> -    enum:
> -      - allwinner,sun20i-d1-gpadc
> +    oneOf:
> +      - enum:
> +          - allwinner,sun20i-d1-gpadc
> +      - items:
> +          - enum:
> +              - allwinner,sun50i-h616-gpadc
> +          - const: allwinner,sun20i-d1-gpadc

I think a more compact way to write this would be:
	oneOf:
	  - const: allwinner,sun20i-d1-gpadc
	  - items:
	      - const: allwinner,sun50i-h616-gpadc
	      - const: allwinner,sun20i-d1-gpadc

In general: the description in the T507 manual looks the same as in the
D1 manual, just with the former having 4, and the latter 2 channels. If
I understand correctly, this difference is not modelled in the binding
(or the Linux driver, fwiw), so using the compatible fallback looks
good.

Cheers,
Andre

>  
>    "#io-channel-cells":
>      const: 1


  reply	other threads:[~2024-04-17 22:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 17:04 [PATCH 0/3] Add GPADC for Allwinner H616 Chris Morgan
2024-04-17 17:04 ` [PATCH 1/3] clk: sunxi-ng: h616: Add clock/reset for GPADC Chris Morgan
2024-04-17 20:26   ` Jernej Škrabec
2024-04-17 22:55   ` Andre Przywara
2024-05-28 16:02   ` Chen-Yu Tsai
2024-05-28 16:07     ` Krzysztof Kozlowski
2024-04-17 17:04 ` [PATCH 2/3] dt-bindings: iio: adc: Add GPADC for Allwinner H616 Chris Morgan
2024-04-17 22:49   ` Andre Przywara [this message]
2024-04-18 15:16     ` Rob Herring
2024-04-18 15:21       ` Chris Morgan
2024-04-18 15:17   ` Rob Herring
2024-04-20 10:10     ` Jonathan Cameron
2024-04-17 17:04 ` [PATCH 3/3] arm64: dts: allwinner: h616: Add GPADC device node Chris Morgan
2024-04-17 22:58   ` Andre Przywara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240417234957.2fcd14bb@minigeek.lan \
    --to=andre.przywara@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=macroalpha82@gmail.com \
    --cc=macromorgan@hotmail.com \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=sboyd@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).