]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: adc: ad4130: only set GPIO_CTRL if pin is unused
authorCosmin Tanislav <demonsingur@gmail.com>
Wed, 7 Feb 2024 13:20:06 +0000 (15:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:24:58 +0000 (09:24 +0100)
commite7f744f6f420f116d6743d42d0bd2c25cf93f542
tree814c0c04297267851eaae5e6b365876e3ed4f8cc
parent0e0dab37750926d4fb0144edb1c1ea0612fea273
iio: adc: ad4130: only set GPIO_CTRL if pin is unused

[ Upstream commit 78367c32bebfe833cd30c855755d863a4ff3fdee ]

Currently, GPIO_CTRL bits are set even if the pins are used for
measurements.

GPIO_CTRL bits should only be set if the pin is not used for
other functionality.

Fix this by only setting the GPIO_CTRL bits if the pin has no
other function.

Fixes: 62094060cf3a ("iio: adc: ad4130: add AD4130 driver")
Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240207132007.253768-2-demonsingur@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/adc/ad4130.c