Commit 5424fdc
fwk: implement the battery extender feature
The purpose of this function is to automatically drop the battery max
charge voltage if the system is left plugged in to AC for a long time
to preserve battery life.
When the timer is exceeded the battery charge voltage should be reduced
to 4.35V/cell. Two additional days after the timer has exceeded, the
battery charge voltage shall be reduced to 4.3V/cell.
The timer should reset to 0 days any time the system is in S0/S0ix and
not attached to AC for 30 minutes or longer.
BRANCH=marigold
BUG=https://app.clickup.com/t/86eq06zen
TEST=when timer expired, the charge voltage will reduce to 97% and
96% battery maximum charge voltage
TEST=charge voltage will recover when the user unplugs the adapter
for 30 minutes when the system in S0/S0ix.
Signed-off-by: Josh-Tsai <josh_tsai@compal.com>1 parent 27049f0 commit 5424fdc
5 files changed
Lines changed: 367 additions & 0 deletions
File tree
- common
- include
- zephyr/program/framework
- include
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
494 | 500 | | |
495 | 501 | | |
496 | 502 | | |
| |||
1713 | 1719 | | |
1714 | 1720 | | |
1715 | 1721 | | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
1716 | 1731 | | |
1717 | 1732 | | |
1718 | 1733 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
434 | 447 | | |
435 | 448 | | |
436 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
538 | 563 | | |
0 commit comments