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
17struct device;
18struct ad7091r_state;
19
20struct ad7091r_chip_info {
21	unsigned int num_channels;
22	const struct iio_chan_spec *channels;
23	unsigned int vref_mV;
24};
25
26extern const struct iio_event_spec ad7091r_events[3];
27
28extern const struct regmap_config ad7091r_regmap_config;
29
30int 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