diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2011-03-24 19:37:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-05 12:04:55 -0700 |
commit | d6f087ec9c7ba029419762273a685460c93c8454 (patch) | |
tree | d52e906844fa0b6e0d876a913b3a2b7217ed2278 /drivers/staging/iio/adc/ad7780.h | |
parent | 8a789f8c306b5e3fe6ef71bb5412055075d8c87f (diff) |
staging: IIO: ADC: New driver for the AD7780 / AD7781 24-bit Sigma-Delta ADC
Changes since v1:
IIO: ADC: AD7780: Apply review feedback
Abort probe() with error in case platform_data is not present.
Add comment explaining power down reset (PDRST) GPIO handling
and dual function DOUT/RDY interrupt usage.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/adc/ad7780.h')
-rw-r--r-- | drivers/staging/iio/adc/ad7780.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/staging/iio/adc/ad7780.h b/drivers/staging/iio/adc/ad7780.h new file mode 100644 index 000000000000..67e511c3d6f0 --- /dev/null +++ b/drivers/staging/iio/adc/ad7780.h @@ -0,0 +1,30 @@ +/* + * AD7780/AD7781 SPI ADC driver + * + * Copyright 2011 Analog Devices Inc. + * + * Licensed under the GPL-2. + */ +#ifndef IIO_ADC_AD7780_H_ +#define IIO_ADC_AD7780_H_ + +/* + * TODO: struct ad7780_platform_data needs to go into include/linux/iio + */ + +/* NOTE: + * The AD7780 doesn't feature a dedicated SPI chip select, in addition it + * features a dual use data out ready DOUT/RDY output. + * In order to avoid contentions on the SPI bus, it's therefore necessary + * to use spi bus locking combined with a dedicated GPIO to control the + * power down reset signal of the AD7780. + * + * The DOUT/RDY output must also be wired to an interrupt capable GPIO. + */ + +struct ad7780_platform_data { + u16 vref_mv; + int gpio_pdrst; +}; + +#endif /* IIO_ADC_AD7780_H_ */ |