Devicetree
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
Cc: "Ariana Lazar" <ariana.lazar@microchip.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: iio: adc: add support for PAC1711
Date: Sun, 2 Aug 2026 00:13:54 +0100	[thread overview]
Message-ID: <20260802001354.6aab1136@jic23-huawei> (raw)
In-Reply-To: <a869acd6-9c77-4495-a581-232ca88ac9e2@baylibre.com>




> > +  microchip,gpio1-mode:
> > +    $ref: /schemas/types.yaml#/definitions/string
> > +    description:
> > +      Defines the function of the pin. This is a multifunction gpio digital I/O
> > +      pin which can be configured as alert1 interrupt, GPIO digital input, GPIO
> > +      digital output or slow. When functioning as SLOW pin pulling the pin high
> > +      overrides the programmed sample rate and results in a sample rate of 8 sps
> > +      (Slow mode).
> > +    enum: [alert1, gpio1_input, gpio1_output, slow]
> > +    default: gpio1_input  
> 
> Maybe I missed something in the previous discussions, but this
> seems a bit too restrictive and also a bit redundant.
> 
> interrupt-names already tells us if A0 or A1 is used for /ALERT.

Agreed - so for that make the properties mutually exclusive.

> 
> And why should we restrict GPIO usage to only input or output?
> (Binding should have gpio-controller and #gpio-cells properties
> for that too.)

Yeah. Seems that would just be gpio or allow the presence of a gpio
consumer indicate that.

> 
> It also isn't clear to me how the slow pin would be useful when
> we can also program the sample mode to the same rate over I2C.
> So maybe we should defer adding a binding for that until we have
> an application that actually requires it.
> 
> And this is missing the possibility that the pins can be used
> as a conversion trigger as well. Likely that would use a
> trigger-sources binding, but as that isn't common, I would defer
> adding that until we have a use case.
> 
> So I would just leave these properties out.

Makes sense to me. This definitely falls into the corner case
for bindings where we don't yet know what the right thing to do 
is so we don't provide full bindings from the start.

Mention this is intentionally not here as part of the patch description.

  reply	other threads:[~2026-08-01 23:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 12:03 [PATCH v2 0/2] add support for Microchip PAC1711 Power Monitor Ariana Lazar
2026-07-28 12:03 ` [PATCH v2 1/2] dt-bindings: iio: adc: add support for PAC1711 Ariana Lazar
2026-07-28 12:14   ` sashiko-bot
2026-08-01 17:30   ` David Lechner
2026-08-01 23:13     ` Jonathan Cameron [this message]
2026-07-28 12:03 ` [PATCH v2 2/2] " Ariana Lazar
2026-07-28 12:18   ` sashiko-bot
2026-07-29 12:23   ` Uwe Kleine-König
2026-08-01 18:17   ` David Lechner
2026-08-01 23:38   ` Jonathan Cameron
2026-08-01 23:08 ` [PATCH v2 0/2] add support for Microchip PAC1711 Power Monitor Jonathan Cameron
2026-08-01 23:21 ` Jonathan Cameron

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=20260802001354.6aab1136@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy@kernel.org \
    --cc=ariana.lazar@microchip.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.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