[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYKtd_83eiJZ7hsR@smile.fi.intel.com>
Date: Wed, 4 Feb 2026 04:22:47 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: rodrigo.alencar@...log.com
Cc: linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org,
Michael Hennerich <Michael.Hennerich@...log.com>,
Lars-Peter Clausen <lars@...afoo.de>,
Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Subject: Re: [PATCH v3 8/9] iio: amplifiers: ad8366: consume enable gpio
On Tue, Feb 03, 2026 at 11:24:14AM +0000, Rodrigo Alencar via B4 Relay wrote:
> Some parts may consume enable GPIO to enable serial mode
> (HMC1119's and HMC792A P/S pin) or powerup the device
> (e.g. ADA4961's PWUP pin). Also, add a comment explaining
> that even though chips like HMC271A has a reset gpio, this
> driver previously considered the reset pin for parts that
> don't actually have a reset gpio, so it might have been
> used to enable/power the device.
...
> + /*
> + * Previously, this driver considered the reset gpio for some devices
GPIO
> + * that don't actually have a reset pin, which could have been wired
> + * up to the enable pin instead, so some users might be relying on this
> + * to turn the chip on rather than reset it.
> + */
> reset_gpio = devm_gpiod_get_optional(&spi->dev, "reset", GPIOD_OUT_HIGH);
> if (IS_ERR(reset_gpio))
> return dev_err_probe(&spi->dev, PTR_ERR(reset_gpio),
> "Failed to get reset GPIO\n");
Yeah, this needs to be addressed somewhere in drivers/gpio/gpiolib-of.c.
Because OUT_HIGH for the reset doesn't sound right if the polarity is active high.
> + enable_gpio = devm_gpiod_get_optional(&spi->dev, "enable", GPIOD_OUT_HIGH);
> + if (IS_ERR(enable_gpio))
> + return dev_err_probe(&spi->dev, PTR_ERR(enable_gpio),
> + "Failed to get enable GPIO\n");
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists