mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 00:40:03 +00:00
![Paul Cercueil](/assets/img/avatar_default.png)
The scale can now be obtained with the "in_voltage_scale" file. By default, the scale returned corresponds to the internal VREF of 2.5V. It is possible to use an external VREF (through the REFIN/REFOUT pin of the chip), by passing a regulator to the driver. The scale will then be calculated according to the voltage reported by the regulator. Signed-off-by: Paul Cercueil <paul.cercueil@analog.com> Co-developed-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
26 lines
626 B
C
26 lines
626 B
C
/* 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__
|
|
|
|
struct device;
|
|
struct ad7091r_state;
|
|
|
|
struct ad7091r_chip_info {
|
|
unsigned int num_channels;
|
|
const struct iio_chan_spec *channels;
|
|
unsigned int vref_mV;
|
|
};
|
|
|
|
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__ */
|