lp8727.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * LP8727 Micro/Mini USB IC with integrated charger
  3. *
  4. * Copyright (C) 2011 Texas Instruments
  5. * Copyright (C) 2011 National Semiconductor
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #ifndef _LP8727_H
  12. #define _LP8727_H
  13. enum lp8727_eoc_level {
  14. EOC_5P,
  15. EOC_10P,
  16. EOC_16P,
  17. EOC_20P,
  18. EOC_25P,
  19. EOC_33P,
  20. EOC_50P,
  21. };
  22. enum lp8727_ichg {
  23. ICHG_90mA,
  24. ICHG_100mA,
  25. ICHG_400mA,
  26. ICHG_450mA,
  27. ICHG_500mA,
  28. ICHG_600mA,
  29. ICHG_700mA,
  30. ICHG_800mA,
  31. ICHG_900mA,
  32. ICHG_1000mA,
  33. };
  34. /**
  35. * struct lp8727_chg_param
  36. * @eoc_level : end of charge level setting
  37. * @ichg : charging current
  38. */
  39. struct lp8727_chg_param {
  40. enum lp8727_eoc_level eoc_level;
  41. enum lp8727_ichg ichg;
  42. };
  43. /**
  44. * struct lp8727_platform_data
  45. * @get_batt_present : check battery status - exists or not
  46. * @get_batt_level : get battery voltage (mV)
  47. * @get_batt_capacity : get battery capacity (%)
  48. * @get_batt_temp : get battery temperature
  49. * @ac, @usb : charging parameters each charger type
  50. */
  51. struct lp8727_platform_data {
  52. u8 (*get_batt_present)(void);
  53. u16 (*get_batt_level)(void);
  54. u8 (*get_batt_capacity)(void);
  55. u8 (*get_batt_temp)(void);
  56. struct lp8727_chg_param ac;
  57. struct lp8727_chg_param usb;
  58. };
  59. #endif