Re: [PATCH v2 3/3] iio: adc: ti-ads7924: Use reset controller for hardware reset

From: Jonathan Cameron

Date: Sat Dec 05 2026 - 20:02:31 EST


On Fri, 4 Dec 2026 19:02:03 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> 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



>