2019-11-15 21:57:20 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
|
|
* AD7091RX Analog to Digital converter driver
|
|
|
|
*
|
|
|
|
* Copyright 2014-2019 Analog Devices Inc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DRIVERS_IIO_ADC_AD7091R_BASE_H__
|
|
|
|
#define __DRIVERS_IIO_ADC_AD7091R_BASE_H__
|
|
|
|
|
2023-12-20 04:26:27 +08:00
|
|
|
#define AD7091R_REG_CONF_INT_VREF BIT(0)
|
|
|
|
|
2023-12-20 04:26:01 +08:00
|
|
|
/* AD7091R_REG_CH_LIMIT */
|
|
|
|
#define AD7091R_HIGH_LIMIT 0xFFF
|
|
|
|
#define AD7091R_LOW_LIMIT 0x0
|
|
|
|
|
2019-11-15 21:57:20 +08:00
|
|
|
struct device;
|
|
|
|
struct ad7091r_state;
|
|
|
|
|
|
|
|
struct ad7091r_chip_info {
|
|
|
|
unsigned int num_channels;
|
|
|
|
const struct iio_chan_spec *channels;
|
2019-11-15 21:57:21 +08:00
|
|
|
unsigned int vref_mV;
|
2019-11-15 21:57:20 +08:00
|
|
|
};
|
|
|
|
|
2023-12-20 04:26:01 +08:00
|
|
|
extern const struct iio_event_spec ad7091r_events[3];
|
|
|
|
|
2019-11-15 21:57:20 +08:00
|
|
|
extern const struct regmap_config ad7091r_regmap_config;
|
|
|
|
|
|
|
|
int ad7091r_probe(struct device *dev, const char *name,
|
|
|
|
const struct ad7091r_chip_info *chip_info,
|
|
|
|
struct regmap *map, int irq);
|
|
|
|
|
|
|
|
#endif /* __DRIVERS_IIO_ADC_AD7091R_BASE_H__ */
|