s3c_adc_battery.h 932 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _S3C_ADC_BATTERY_H
  2. #define _S3C_ADC_BATTERY_H
  3. struct s3c_adc_bat_thresh {
  4. int volt; /* mV */
  5. int cur; /* mA */
  6. int level; /* percent */
  7. };
  8. struct s3c_adc_bat_pdata {
  9. int (*init)(void);
  10. void (*exit)(void);
  11. void (*enable_charger)(void);
  12. void (*disable_charger)(void);
  13. int gpio_charge_finished;
  14. int gpio_inverted;
  15. const struct s3c_adc_bat_thresh *lut_noac;
  16. unsigned int lut_noac_cnt;
  17. const struct s3c_adc_bat_thresh *lut_acin;
  18. unsigned int lut_acin_cnt;
  19. const unsigned int volt_channel;
  20. const unsigned int current_channel;
  21. const unsigned int backup_volt_channel;
  22. const unsigned int volt_samples;
  23. const unsigned int current_samples;
  24. const unsigned int backup_volt_samples;
  25. const unsigned int volt_mult;
  26. const unsigned int current_mult;
  27. const unsigned int backup_volt_mult;
  28. const unsigned int internal_impedance;
  29. const unsigned int backup_volt_max;
  30. const unsigned int backup_volt_min;
  31. };
  32. #endif