linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Marcelo Schmitt <marcelo.schmitt@analog.com>,
	linux-iio@vger.kernel.org,  devicetree@vger.kernel.org,
	linux-doc@vger.kernel.org,  linux-kernel@vger.kernel.org,
	jic23@kernel.org, nuno.sa@analog.com,  dlechner@baylibre.com,
	andy@kernel.org, Michael.Hennerich@analog.com,  robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, corbet@lwn.net,
	 marcelo.schmitt1@gmail.com
Subject: Re: [PATCH v3 2/3] iio: adc: Initial support for AD4134
Date: Wed, 03 Dec 2025 14:48:44 +0000	[thread overview]
Message-ID: <c45e24e5edb3ea668accb608f6cdffff62592c74.camel@gmail.com> (raw)
In-Reply-To: <aTA0LDYDzP8s__1V@smile.fi.intel.com>

On Wed, 2025-12-03 at 14:59 +0200, Andy Shevchenko wrote:
> On Wed, Dec 03, 2025 at 11:02:45AM +0000, Nuno Sá wrote:
> > On Tue, 2025-12-02 at 23:26 +0200, Andy Shevchenko wrote:
> > > On Tue, Dec 2, 2025 at 10:55 PM Marcelo Schmitt
> > > <marcelo.schmitt@analog.com> wrote:
> 
> Nuno, may you please remove unrelated context when replying?

It was not that much. That is why I did not bothered :)

...

> 
> > 
> > Hmm, can you share why we should have a reset controller for the above? 
> 
> My point here is to have a standard way of handling "reset" pin independently
> of what's beneath in the HW — GPIO or other means to assert/deassert it.

That makes sense.

> 
> > Unless I'm missing something, even with the aux device, you'll need the code to
> > optionally add it which (I think) will already force you to check the existence for
> > the pin (which would be a bit odd IMO).
> 
> If this is the case, it needs to be fixed, but reset framework provides
> _optional() API, that's what should be used for the cases where reset is
> optional. Let reset framework to handle that.

Ok, I think I was also misunderstanding you. So you mean that instead of doing 
devm_gpiod_get_optional() we should use one of the devm_reset_control_get_*() calls? 

Ok, I went to check the reset core implementation and with [1] I take back my comment. I can see now
that the framework will automatically handle creating the auxdevice. So while I still think most of
the times we'll still see reset-gpios in bindings, it makes sense to have this HW abstraction in the
code.

One thing to note is that the reset framework always enforces reset-gpios and we do have places
where reset pins have different ids (just because that's how the datasheet defines them).

...

> 
> > Having said the above, I would be up for some kind of helper in gpiolib.
> > I still see way too often people misinterpreting the meaning of
> > GPIOD_OUT_HIGH and that the value in gpiod_set_value_cansleep() means
> > assert/deassert.
> 
> Consider this as a helper :-)

Indeed!

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/reset/core.c#n1038

- Nuno Sá

  reply	other threads:[~2025-12-03 14:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 20:54 [PATCH v3 0/3] iio: adc: Add AD4134 minimum I/O support Marcelo Schmitt
2025-12-02 20:55 ` [PATCH v3 1/3] dt-bindings: iio: adc: Add AD4134 Marcelo Schmitt
2025-12-05  7:52   ` Tomas Melin
2025-12-05 12:50     ` Marcelo Schmitt
2025-12-07 13:13       ` Jonathan Cameron
2025-12-07 13:22   ` Jonathan Cameron
2025-12-02 20:55 ` [PATCH v3 2/3] iio: adc: Initial support for AD4134 Marcelo Schmitt
2025-12-02 21:26   ` Andy Shevchenko
2025-12-03 11:02     ` Nuno Sá
2025-12-03 12:59       ` Andy Shevchenko
2025-12-03 14:48         ` Nuno Sá [this message]
2025-12-03 14:56           ` Andy Shevchenko
2025-12-04 14:58     ` Marcelo Schmitt
2025-12-07 13:41   ` Jonathan Cameron
2025-12-02 20:55 ` [PATCH v3 3/3] Docs: iio: Add AD4134 Marcelo Schmitt
2025-12-03 11:57   ` Tomas Melin
2025-12-04 15:32     ` Marcelo Schmitt
2025-12-05  7:58       ` Tomas Melin
2025-12-05 12:32         ` Marcelo Schmitt
2025-12-07 13:28           ` 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=c45e24e5edb3ea668accb608f6cdffff62592c74.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=marcelo.schmitt@analog.com \
    --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;
as well as URLs for NNTP newsgroup(s).