ad7780.h 753 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * AD7780/AD7781 SPI ADC driver
  3. *
  4. * Copyright 2011 Analog Devices Inc.
  5. *
  6. * Licensed under the GPL-2.
  7. */
  8. #ifndef IIO_ADC_AD7780_H_
  9. #define IIO_ADC_AD7780_H_
  10. /*
  11. * TODO: struct ad7780_platform_data needs to go into include/linux/iio
  12. */
  13. /* NOTE:
  14. * The AD7780 doesn't feature a dedicated SPI chip select, in addition it
  15. * features a dual use data out ready DOUT/RDY output.
  16. * In order to avoid contentions on the SPI bus, it's therefore necessary
  17. * to use spi bus locking combined with a dedicated GPIO to control the
  18. * power down reset signal of the AD7780.
  19. *
  20. * The DOUT/RDY output must also be wired to an interrupt capable GPIO.
  21. */
  22. struct ad7780_platform_data {
  23. u16 vref_mv;
  24. int gpio_pdrst;
  25. };
  26. #endif /* IIO_ADC_AD7780_H_ */