mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Rickard Andersson <rickard.andersson@axis.com>,
	hvilleneuve@dimonoff.com, dlechner@baylibre.com,
	nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@axis.com
Subject: Re: [PATCH v2 3/3] iio: adc: ti-ads7924: Use reset controller for hardware reset
Date: Sun, 6 Dec 2026 01:02:17 +0000	[thread overview]
Message-ID: <20261206010217.3d395987@jic23-hlaptop> (raw)
In-Reply-To: <axLyCzCf1s7aQvYC@ashevche-desk.local>

On Fri, 4 Dec 2026 19:02:03 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Fri, Dec 04, 2026 at 01:14:58PM +0100, Rickard Andersson wrote:
> > 
> > The reset GPIO may be provided by a controller that can sleep, such
> > as an I2C GPIO expander. ads7924_reset() toggles it with
> > gpiod_set_value(), which triggers WARN_ON(can_sleep) in gpiolib on
> > such systems.
> > 
> > Use the reset controller API instead because it can sleep.
> > 
> > Note that the hardware reset now requires CONFIG_RESET_GPIO. Without
> > it, the reset GPIO will be unused.  
> 
> Yeah, this rises the question about configuration and dependencies.
> We need to work out the common approach in IIO for this type of conversions.

Where we have a fallback to a software reset (like here) I'm not that
bothered. We tend to prefer hardware pin if available as it can for
some devices work when comms are lost, but in general hardware and
software triggered resets are near equivalents.

In other cases where it is the only way to reset then we probably have
to have the driver depend on it being available.

Jonathan



> 


  reply	other threads:[~2026-12-06  1:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 12:14 [PATCH v2 0/3] [PATCH v2 0/3] iio: adc: ti-ads7924: Fix " Rickard Andersson
2026-12-04 12:14 ` [PATCH v2 1/3] iio: adc: ti-ads7924: Wait after " Rickard Andersson
2026-12-04 17:00   ` Andy Shevchenko
2026-12-04 12:14 ` [PATCH v2 2/3] iio: adc: ti-ads7924: Use msleep() for reset pulse Rickard Andersson
2026-12-04 12:14 ` [PATCH v2 3/3] iio: adc: ti-ads7924: Use reset controller for hardware reset Rickard Andersson
2026-12-04 17:02   ` Andy Shevchenko
2026-12-06  1:02     ` Jonathan Cameron [this message]
2026-12-06  1:05 ` [PATCH v2 0/3] [PATCH v2 0/3] iio: adc: ti-ads7924: Fix " 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=20261206010217.3d395987@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=hvilleneuve@dimonoff.com \
    --cc=kernel@axis.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=rickard.andersson@axis.com \
    /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

all inboxes | Powered by JetHome®