• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * AD7280A Lithium Ion Battery Monitoring System
3  *
4  * Copyright 2011 Analog Devices Inc.
5  *
6  * Licensed under the GPL-2.
7  */
8 
9 #ifndef IIO_ADC_AD7280_H_
10 #define IIO_ADC_AD7280_H_
11 
12 /*
13  * TODO: struct ad7280_platform_data needs to go into include/linux/iio
14  */
15 
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
20 
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
25 
26 #define AD7280A_ALERT_REMOVE_VIN5		BIT(2)
27 #define AD7280A_ALERT_REMOVE_VIN4_VIN5		BIT(3)
28 #define AD7280A_ALERT_REMOVE_AUX5		BIT(0)
29 #define AD7280A_ALERT_REMOVE_AUX4_AUX5		BIT(1)
30 
31 struct ad7280_platform_data {
32 	unsigned acquisition_time;
33 	unsigned conversion_averaging;
34 	unsigned chain_last_alert_ignore;
35 	bool thermistor_term_en;
36 };
37 
38 #endif /* IIO_ADC_AD7280_H_ */
39