lp8727.h 900 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2011 National Semiconductor
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef _LP8727_H
  9. #define _LP8727_H
  10. enum lp8727_eoc_level {
  11. EOC_5P,
  12. EOC_10P,
  13. EOC_16P,
  14. EOC_20P,
  15. EOC_25P,
  16. EOC_33P,
  17. EOC_50P,
  18. };
  19. enum lp8727_ichg {
  20. ICHG_90mA,
  21. ICHG_100mA,
  22. ICHG_400mA,
  23. ICHG_450mA,
  24. ICHG_500mA,
  25. ICHG_600mA,
  26. ICHG_700mA,
  27. ICHG_800mA,
  28. ICHG_900mA,
  29. ICHG_1000mA,
  30. };
  31. struct lp8727_chg_param {
  32. /* end of charge level setting */
  33. enum lp8727_eoc_level eoc_level;
  34. /* charging current */
  35. enum lp8727_ichg ichg;
  36. };
  37. struct lp8727_platform_data {
  38. u8 (*get_batt_present)(void);
  39. u16 (*get_batt_level)(void);
  40. u8 (*get_batt_capacity)(void);
  41. u8 (*get_batt_temp)(void);
  42. struct lp8727_chg_param ac;
  43. struct lp8727_chg_param usb;
  44. };
  45. #endif