Merge tag 'pm-5.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6-microblaze.git] / drivers / staging / iio / adc / ad7280a.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * AD7280A Lithium Ion Battery Monitoring System
4  *
5  * Copyright 2011 Analog Devices Inc.
6  */
7
8 #ifndef IIO_ADC_AD7280_H_
9 #define IIO_ADC_AD7280_H_
10
11 /*
12  * TODO: struct ad7280_platform_data needs to go into include/linux/iio
13  */
14
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
19
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
24
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)
29
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;
35 };
36
37 #endif /* IIO_ADC_AD7280_H_ */