18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * AD7091RX Analog to Digital converter driver 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright 2014-2019 Analog Devices Inc. 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef __DRIVERS_IIO_ADC_AD7091R_BASE_H__ 98c2ecf20Sopenharmony_ci#define __DRIVERS_IIO_ADC_AD7091R_BASE_H__ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#define AD7091R_REG_CONF_INT_VREF BIT(0) 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci/* AD7091R_REG_CH_LIMIT */ 148c2ecf20Sopenharmony_ci#define AD7091R_HIGH_LIMIT 0xFFF 158c2ecf20Sopenharmony_ci#define AD7091R_LOW_LIMIT 0x0 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_cistruct device; 188c2ecf20Sopenharmony_cistruct ad7091r_state; 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_cistruct ad7091r_chip_info { 218c2ecf20Sopenharmony_ci unsigned int num_channels; 228c2ecf20Sopenharmony_ci const struct iio_chan_spec *channels; 238c2ecf20Sopenharmony_ci unsigned int vref_mV; 248c2ecf20Sopenharmony_ci}; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciextern const struct iio_event_spec ad7091r_events[3]; 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciextern const struct regmap_config ad7091r_regmap_config; 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciint ad7091r_probe(struct device *dev, const char *name, 318c2ecf20Sopenharmony_ci const struct ad7091r_chip_info *chip_info, 328c2ecf20Sopenharmony_ci struct regmap *map, int irq); 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#endif /* __DRIVERS_IIO_ADC_AD7091R_BASE_H__ */ 35