xref: /openbmc/linux/drivers/iio/adc/ad7091r-base.h (revision 83146efc)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * AD7091RX Analog to Digital converter driver
4  *
5  * Copyright 2014-2019 Analog Devices Inc.
6  */
7 
8 #ifndef __DRIVERS_IIO_ADC_AD7091R_BASE_H__
9 #define __DRIVERS_IIO_ADC_AD7091R_BASE_H__
10 
11 #define AD7091R_REG_CONF_INT_VREF	BIT(0)
12 
13 /* AD7091R_REG_CH_LIMIT */
14 #define AD7091R_HIGH_LIMIT		0xFFF
15 #define AD7091R_LOW_LIMIT		0x0
16 
17 struct device;
18 struct ad7091r_state;
19 
20 struct ad7091r_chip_info {
21 	unsigned int num_channels;
22 	const struct iio_chan_spec *channels;
23 	unsigned int vref_mV;
24 };
25 
26 extern const struct iio_event_spec ad7091r_events[3];
27 
28 extern const struct regmap_config ad7091r_regmap_config;
29 
30 int ad7091r_probe(struct device *dev, const char *name,
31 		const struct ad7091r_chip_info *chip_info,
32 		struct regmap *map, int irq);
33 
34 #endif /* __DRIVERS_IIO_ADC_AD7091R_BASE_H__ */
35