]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: Add ti-ads1018 driver
authorKurt Borja <kuurtb@gmail.com>
Fri, 12 Dec 2025 04:25:44 +0000 (23:25 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 21 Dec 2025 18:48:50 +0000 (18:48 +0000)
commitbf0bba486b5bd5e2d6100ed7dd1e38e0304ba40f
treeac68ef44e11e732c3a2fd6257f80021911efff5b
parent43fabbb9249f4e609ba15533f49c3738344ed801
iio: adc: Add ti-ads1018 driver

Add ti-ads1018 driver for Texas Instruments ADS1018 and ADS1118 SPI
analog-to-digital converters.

This chips' MOSI pin is shared with a data-ready interrupt. Defining
this interrupt in devicetree is optional, therefore we only create an
IIO trigger if one is found.

Handling this interrupt requires some considerations. When enabling the
trigger the CS line is tied low (active), thus we need to hold
spi_bus_lock() too, to avoid state corruption. This is done inside the
set_trigger_state() callback, to let users use other triggers without
wasting a bus lock.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
MAINTAINERS
drivers/iio/adc/Kconfig
drivers/iio/adc/Makefile
drivers/iio/adc/ti-ads1018.c [new file with mode: 0644]