anish kumar | e60fea7 | 2012-09-21 17:10:00 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012, Anish Kumar <anish198519851985@gmail.com> |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 as |
| 5 | * published by the Free Software Foundation. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GENERIC_ADC_BATTERY_H |
| 9 | #define GENERIC_ADC_BATTERY_H |
| 10 | |
| 11 | /** |
| 12 | * struct gab_platform_data - platform_data for generic adc iio battery driver. |
| 13 | * @battery_info: recommended structure to specify static power supply |
| 14 | * parameters |
| 15 | * @cal_charge: calculate charge level. |
| 16 | * @gpio_charge_finished: gpio for the charger. |
| 17 | * @gpio_inverted: Should be 1 if the GPIO is active low otherwise 0 |
| 18 | * @jitter_delay: delay required after the interrupt to check battery |
| 19 | * status.Default set is 10ms. |
| 20 | */ |
| 21 | struct gab_platform_data { |
| 22 | struct power_supply_info battery_info; |
| 23 | int (*cal_charge)(long value); |
| 24 | int gpio_charge_finished; |
| 25 | bool gpio_inverted; |
| 26 | int jitter_delay; |
| 27 | }; |
| 28 | |
| 29 | #endif /* GENERIC_ADC_BATTERY_H */ |