generic-adc-battery.h 1003 B

1234567891011121314151617181920212223242526272829
  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. #ifndef GENERIC_ADC_BATTERY_H
  8. #define GENERIC_ADC_BATTERY_H
  9. /**
  10. * struct gab_platform_data - platform_data for generic adc iio battery driver.
  11. * @battery_info: recommended structure to specify static power supply
  12. * parameters
  13. * @cal_charge: calculate charge level.
  14. * @gpio_charge_finished: gpio for the charger.
  15. * @gpio_inverted: Should be 1 if the GPIO is active low otherwise 0
  16. * @jitter_delay: delay required after the interrupt to check battery
  17. * status.Default set is 10ms.
  18. */
  19. struct gab_platform_data {
  20. struct power_supply_info battery_info;
  21. int (*cal_charge)(long value);
  22. int gpio_charge_finished;
  23. bool gpio_inverted;
  24. int jitter_delay;
  25. };
  26. #endif /* GENERIC_ADC_BATTERY_H */