mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
Enable IDPM for bq24715 charge controller
Dynamic Power Management enables proper regulation of the input adapter current set in board.h. BUG=chrome-os-partner:24933 BRANCH=None TEST=Power a DUT with a bench supply. Verify the input current doesn't exceed the input current limit set in board.h while the system is under load and charging the battery. Change-Id: Ie68d92afe0ef89c691f460d120f8574cb17e2c4e Original-Change-Id: Ida6b05f1d89b21d7cf1553f5e9936360679f8149 Signed-off-by: Dave Parker <dparker@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/187517 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/187911
This commit is contained in:
committed by
chrome-internal-fetch
parent
1cdd0d9b31
commit
463e38b534
@@ -183,6 +183,9 @@ int charger_post_init(void)
|
||||
option |= OPT_FIX_IOUT_ALWAYS;
|
||||
option &= ~OPT_IOUT_MASK;
|
||||
|
||||
/* Enable dynamic power management */
|
||||
option |= OPT_IDPM_ENABLE;
|
||||
|
||||
rv = charger_set_option(option);
|
||||
if (rv)
|
||||
return rv;
|
||||
|
||||
@@ -62,9 +62,9 @@
|
||||
#define OPT_LDO_MODE_MASK (1 << 2)
|
||||
#define OPT_LDO_DISABLE (0 << 2)
|
||||
#define OPT_LDO_ENABLE (1 << 2)
|
||||
#define OPT_ODPM_MASK (1 << 1)
|
||||
#define OPT_ODPM_DISABLE (0 << 1)
|
||||
#define OPT_ODPM_ENABLE (1 << 1)
|
||||
#define OPT_IDPM_MASK (1 << 1)
|
||||
#define OPT_IDPM_DISABLE (0 << 1)
|
||||
#define OPT_IDPM_ENABLE (1 << 1)
|
||||
#define OPT_CHARGE_INHIBIT_MASK (1 << 0)
|
||||
#define OPT_CHARGE_ENABLE (0 << 0)
|
||||
#define OPT_CHARGE_DISABLE (1 << 0)
|
||||
|
||||
Reference in New Issue
Block a user