Commit bf0bba48 authored by Kurt Borja's avatar Kurt Borja Committed by Jonathan Cameron
Browse files

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: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarKurt Borja <kuurtb@gmail.com>
Reviewed-by: default avatarDavid Lechner <dlechner@baylibre.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 43fabbb9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26022,6 +26022,7 @@ M: Kurt Borja <kuurtb@gmail.com>
L:	linux-iio@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/iio/adc/ti,ads1018.yaml
F:	drivers/iio/adc/ti-ads1018.c
TI ADS7924 ADC DRIVER
M:	Hugo Villeneuve <hvilleneuve@dimonoff.com>
+12 −0
Original line number Diff line number Diff line
@@ -1676,6 +1676,18 @@ config TI_ADS1015
	  This driver can also be built as a module. If so, the module will be
	  called ti-ads1015.

config TI_ADS1018
       tristate "Texas Instruments ADS1018 ADC"
       depends on SPI
       select IIO_BUFFER
       select IIO_TRIGGERED_BUFFER
       help
         If you say yes here you get support for Texas Instruments ADS1018 and
         ADS1118 ADC chips.

         This driver can also be built as a module. If so, the module will be
         called ti-ads1018.

config TI_ADS1100
	tristate "Texas Instruments ADS1100 and ADS1000 ADC"
	depends on I2C
+1 −0
Original line number Diff line number Diff line
@@ -146,6 +146,7 @@ obj-$(CONFIG_TI_ADC12138) += ti-adc12138.o
obj-$(CONFIG_TI_ADC128S052) += ti-adc128s052.o
obj-$(CONFIG_TI_ADC161S626) += ti-adc161s626.o
obj-$(CONFIG_TI_ADS1015) += ti-ads1015.o
obj-$(CONFIG_TI_ADS1018) += ti-ads1018.o
obj-$(CONFIG_TI_ADS1100) += ti-ads1100.o
obj-$(CONFIG_TI_ADS1119) += ti-ads1119.o
obj-$(CONFIG_TI_ADS124S08) += ti-ads124s08.o
+740 −0

File added.

Preview size limit exceeded, changes collapsed.