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:
ChromeOS Developer
2014-02-21 09:28:50 -08:00
committed by chrome-internal-fetch
parent 1cdd0d9b31
commit 463e38b534
2 changed files with 6 additions and 3 deletions

View File

@@ -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;

View File

@@ -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)