lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260119-iio-ad8366-update-v1-3-8044e23e964a@analog.com>
Date: Mon, 19 Jan 2026 14:36:57 +0000
From: Rodrigo Alencar via B4 Relay <devnull+rodrigo.alencar.analog.com@...nel.org>
To: linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org, 
 devicetree@...r.kernel.org
Cc: 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>, 
 Rodrigo Alencar <rodrigo.alencar@...log.com>
Subject: [PATCH 3/7] iio: amplifiers: ad8366: consume enable gpio for
 applicable parts

From: Rodrigo Alencar <rodrigo.alencar@...log.com>

Some parts may consume enable GPIO to set serial mode (PS pin) or
powerup the device (e.g. ADA4961's PWUP pin).

Co-developed-by: Michael Hennerich <michael.hennerich@...log.com>
Signed-off-by: Michael Hennerich <michael.hennerich@...log.com>
Signed-off-by: Rodrigo Alencar <rodrigo.alencar@...log.com>
---
 drivers/iio/amplifiers/ad8366.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/iio/amplifiers/ad8366.c b/drivers/iio/amplifiers/ad8366.c
index d06ac786501c..63bb9f0179eb 100644
--- a/drivers/iio/amplifiers/ad8366.c
+++ b/drivers/iio/amplifiers/ad8366.c
@@ -43,6 +43,7 @@ struct ad8366_state {
 	struct regulator	*reg;
 	struct mutex            lock; /* protect sensor state */
 	struct gpio_desc	*reset_gpio;
+	struct gpio_desc	*enable_gpio;
 	unsigned char		ch[2];
 	enum ad8366_type	type;
 	const struct ad8366_info *info;
@@ -281,6 +282,13 @@ static int ad8366_probe(struct spi_device *spi)
 			ret = PTR_ERR(st->reset_gpio);
 			goto error_disable_reg;
 		}
+
+		st->enable_gpio = devm_gpiod_get_optional(&spi->dev, "enable", GPIOD_OUT_HIGH);
+		if (IS_ERR(st->enable_gpio)) {
+			ret = PTR_ERR(st->enable_gpio);
+			goto error_disable_reg;
+		}
+
 		indio_dev->channels = ada4961_channels;
 		indio_dev->num_channels = ARRAY_SIZE(ada4961_channels);
 		break;

-- 
2.43.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ