1 /* SPDX-License-Identifier: GPL-2.0 */
3 * AD7280A Lithium Ion Battery Monitoring System
5 * Copyright 2011 Analog Devices Inc.
8 #ifndef IIO_ADC_AD7280_H_
9 #define IIO_ADC_AD7280_H_
12 * TODO: struct ad7280_platform_data needs to go into include/linux/iio
15 #define AD7280A_ACQ_TIME_400ns 0
16 #define AD7280A_ACQ_TIME_800ns 1
17 #define AD7280A_ACQ_TIME_1200ns 2
18 #define AD7280A_ACQ_TIME_1600ns 3
20 #define AD7280A_CONV_AVG_DIS 0
21 #define AD7280A_CONV_AVG_2 1
22 #define AD7280A_CONV_AVG_4 2
23 #define AD7280A_CONV_AVG_8 3
25 #define AD7280A_ALERT_REMOVE_VIN5 BIT(2)
26 #define AD7280A_ALERT_REMOVE_VIN4_VIN5 BIT(3)
27 #define AD7280A_ALERT_REMOVE_AUX5 BIT(0)
28 #define AD7280A_ALERT_REMOVE_AUX4_AUX5 BIT(1)
30 struct ad7280_platform_data {
31 unsigned int acquisition_time;
32 unsigned int conversion_averaging;
33 unsigned int chain_last_alert_ignore;
34 bool thermistor_term_en;
37 #endif /* IIO_ADC_AD7280_H_ */