Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / drivers / staging / iio / adc / ad7280a.h
blob20400b0045e5819600e8553fa42057b932ad7a2d
1 /*
2 * AD7280A Lithium Ion Battery Monitoring System
4 * Copyright 2011 Analog Devices Inc.
6 * Licensed under the GPL-2.
7 */
9 #ifndef IIO_ADC_AD7280_H_
10 #define IIO_ADC_AD7280_H_
13 * TODO: struct ad7280_platform_data needs to go into include/linux/iio
16 #define AD7280A_ACQ_TIME_400ns 0
17 #define AD7280A_ACQ_TIME_800ns 1
18 #define AD7280A_ACQ_TIME_1200ns 2
19 #define AD7280A_ACQ_TIME_1600ns 3
21 #define AD7280A_CONV_AVG_DIS 0
22 #define AD7280A_CONV_AVG_2 1
23 #define AD7280A_CONV_AVG_4 2
24 #define AD7280A_CONV_AVG_8 3
26 #define AD7280A_ALERT_REMOVE_VIN5 (1 << 2)
27 #define AD7280A_ALERT_REMOVE_VIN4_VIN5 (2 << 2)
28 #define AD7280A_ALERT_REMOVE_AUX5 (1 << 0)
29 #define AD7280A_ALERT_REMOVE_AUX4_AUX5 (2 << 0)
31 struct ad7280_platform_data {
32 unsigned acquisition_time;
33 unsigned conversion_averaging;
34 unsigned chain_last_alert_ignore;
35 bool thermistor_term_en;
38 #endif /* IIO_ADC_AD7280_H_ */