summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/Makefile
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2017-03-28 18:34:48 +0200
committerJonathan Cameron <jic23@kernel.org>2017-04-14 16:09:06 +0200
commita9e9c7153e96ee7f2777b3d5d99a23bf74dcaa21 (patch)
tree035fb04e12cd4ea81883a7cbdf291f17e268613f /drivers/iio/adc/Makefile
parentiio:meter:ade7759: Removing use of deprecated macros (S_IRUGO, S_IWUSR, S_IXUGO) (diff)
downloadlinux-a9e9c7153e96ee7f2777b3d5d99a23bf74dcaa21.tar.xz
linux-a9e9c7153e96ee7f2777b3d5d99a23bf74dcaa21.zip
iio: adc: add max1117/max1118/max1119 ADC driver
This adds max1117/max1118/max1119 8-bit, dual-channel ADC driver. This new driver uses the zero length spi_transfers with the cs_change flag set and/or the non-zero delay_usecs. 1. The zero length transfer with the spi_transfer.cs_change set is required in order to select CH1. The chip select line must be brought high and low again without transfer. 2. The zero length transfer with the spi_transfer.delay_usecs > 0 is required for waiting the conversion to be complete. The conversion begins with the falling edge of the chip select. During the conversion process, SCLK is ignored. These two usages are unusual. But the spi controller drivers that use a default implementation of transfer_one_message() are likely to work. (I've tested this adc driver with spi-omap2-mcspi and spi-xilinx) On the other hand, some spi controller drivers that have their own transfer_one_message() may not work. But at least for the zero length transfer with delay_usecs > 0, I'm proposing a new testcase for the spi-loopback-test that can test whether the delay_usecs setting has taken effect. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Cc: Rob Herring <robh+dt@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/adc/Makefile')
-rw-r--r--drivers/iio/adc/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile
index 78a7fd84cc59..56e5fabece4c 100644
--- a/drivers/iio/adc/Makefile
+++ b/drivers/iio/adc/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_LTC2485) += ltc2485.o
obj-$(CONFIG_LTC2497) += ltc2497.o
obj-$(CONFIG_MAX1027) += max1027.o
obj-$(CONFIG_MAX11100) += max11100.o
+obj-$(CONFIG_MAX1118) += max1118.o
obj-$(CONFIG_MAX1363) += max1363.o
obj-$(CONFIG_MAX9611) += max9611.o
obj-$(CONFIG_MCP320X) += mcp320x.o