Commit 1abec6ac authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

staging:iio:ad7793: Use common Sigma Delta library

Convert the ad7793 driver to make use of the new common code for devices from
the Analog Devices Sigma Delta family.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 32e0e7e0
...@@ -111,8 +111,7 @@ config AD7780 ...@@ -111,8 +111,7 @@ config AD7780
config AD7793 config AD7793
tristate "Analog Devices AD7792 AD7793 ADC driver" tristate "Analog Devices AD7792 AD7793 ADC driver"
depends on SPI depends on SPI
select IIO_BUFFER select AD_SIGMA_DELTA
select IIO_TRIGGERED_BUFFER
help help
Say yes here to build support for Analog Devices Say yes here to build support for Analog Devices
AD7792 and AD7793 SPI analog to digital converters (ADC). AD7792 and AD7793 SPI analog to digital converters (ADC).
......
This diff is collapsed.
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
/* Mode Register Bit Designations (AD7793_REG_MODE) */ /* Mode Register Bit Designations (AD7793_REG_MODE) */
#define AD7793_MODE_SEL(x) (((x) & 0x7) << 13) /* Operation Mode Select */ #define AD7793_MODE_SEL(x) (((x) & 0x7) << 13) /* Operation Mode Select */
#define AD7793_MODE_SEL_MASK (0x7 << 13) /* Operation Mode Select mask */
#define AD7793_MODE_CLKSRC(x) (((x) & 0x3) << 6) /* ADC Clock Source Select */ #define AD7793_MODE_CLKSRC(x) (((x) & 0x3) << 6) /* ADC Clock Source Select */
#define AD7793_MODE_RATE(x) ((x) & 0xF) /* Filter Update Rate Select */ #define AD7793_MODE_RATE(x) ((x) & 0xF) /* Filter Update Rate Select */
...@@ -70,6 +71,7 @@ ...@@ -70,6 +71,7 @@
#define AD7793_CONF_REFSEL (1 << 7) /* INT/EXT Reference Select */ #define AD7793_CONF_REFSEL (1 << 7) /* INT/EXT Reference Select */
#define AD7793_CONF_BUF (1 << 4) /* Buffered Mode Enable */ #define AD7793_CONF_BUF (1 << 4) /* Buffered Mode Enable */
#define AD7793_CONF_CHAN(x) ((x) & 0x7) /* Channel select */ #define AD7793_CONF_CHAN(x) ((x) & 0x7) /* Channel select */
#define AD7793_CONF_CHAN_MASK 0x7 /* Channel select mask */
#define AD7793_CH_AIN1P_AIN1M 0 /* AIN1(+) - AIN1(-) */ #define AD7793_CH_AIN1P_AIN1M 0 /* AIN1(+) - AIN1(-) */
#define AD7793_CH_AIN2P_AIN2M 1 /* AIN2(+) - AIN2(-) */ #define AD7793_CH_AIN2P_AIN2M 1 /* AIN2(+) - AIN2(-) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment