Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. --- ds2784_battery_orig.c 2010-11-19 08:32:14.000000000 -0800
  2. +++ ds2784_battery.c 2010-11-21 16:28:15.959946901 -0800
  3. @@ -789,6 +789,19 @@
  4. /* shut off charger when full:
  5. * - CHGTF flag is set
  6. */
  7. +
  8. + /* Changed this code if-statement back to stock because this
  9. + * parameter is now user settable by changing the actual
  10. + * register value inside the battery chip EEPROM.
  11. + * --RP
  12. + */
  13. +
  14. + if ((di->status.status_reg & 0x80) &&
  15. + (di->status.percentage == 100)) {
  16. + di->status.battery_full = 1;
  17. + charge_mode = CHARGE_BATT_DISABLE;
  18. + }
  19. +
  20. /* We don't move from full to not-full until
  21. * we drop below 95%, to avoid confusing the
  22. * user while we're maintaining a full charge
  23. @@ -806,19 +819,6 @@
  24. di->status.battery_full = 0;
  25. }
  26.  
  27. - /* Changed this code if-statement back to stock because this
  28. - * parameter is now user settable by changing the actual
  29. - * register value inside the battery chip EEPROM.
  30. - * --RP
  31. - */
  32. -
  33. - if (di->status.status_reg & 0x80) {
  34. - di->status.battery_full = 1;
  35. - charge_mode = CHARGE_BATT_DISABLE;
  36. - }
  37. - else
  38. - di->status.battery_full = 0;
  39. -
  40. if (temp >= TEMP_HOT) {
  41. if (temp >= TEMP_CRITICAL)
  42. charge_mode = CHARGE_BATT_DISABLE;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement