kernel_samsung_a53x/drivers/iio
Nuno Sa ed953b5b5d iio: adc: ad9467: fix reset gpio handling
[ Upstream commit 76f028539cf360f750efd8cde560edda298e4c6b ]

The reset gpio was being handled with inverted polarity. This means that
as far as gpiolib is concerned we were actually leaving the pin asserted
(in theory, this would mean reset). However, inverting the polarity in
devicetree made things work. Fix it by doing it the proper way and how
gpiolib expects it to be done.

While at it, moved the handling to it's own function and dropped
'reset_gpio' from the 'struct ad9467_state' as we only need it during
probe. On top of that, refactored things so that we now request the gpio
asserted (i.e in reset) and then de-assert it. Also note that we now use
gpiod_set_value_cansleep() instead of gpiod_direction_output() as we
already request the pin as output.

Fixes: ad6797120238 ("iio: adc: ad9467: add support AD9467 ADC")
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-1-a4a33bc4d70e@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:12:49 +01:00
..
accel Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adc iio: adc: ad9467: fix reset gpio handling 2024-11-18 12:12:49 +01:00
addac Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
afe Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amplifiers Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
buffer Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
chemical Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
common iio: common: ms_sensors: ms_sensors_i2c: fix humidity conversion time table 2024-11-18 12:12:00 +01:00
dac Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dummy Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
frequency Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gyro Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
health Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
humidity Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imu iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw 2024-11-18 12:12:00 +01:00
light Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
magnetometer Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
multiplexer Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
orientation Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
position Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
potentiometer Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
potentiostat Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pressure iio: pressure: ms5611: ms5611_prom_is_valid false negative bug 2024-11-08 11:25:49 +01:00
proximity Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
resolver Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
temperature Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trigger Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iio_core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iio_core_trigger.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-buffer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-configfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-event.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-sw-device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-sw-trigger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-trigger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-triggered-event.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inkern.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
TODO Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00