diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-11-28 14:11:30 -0800 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2017-12-08 17:14:30 +0000 |
commit | 93fd8fa40fbe80bd825ad7d28b4f2c85c0b751be (patch) | |
tree | 0964562028f7d8a8da88650f18e27029688ef259 /src/ec/google/chromeec/ec.h | |
parent | 40d0bfa212d5516c68d3ad044334f7d2cc6b4445 (diff) |
chromeec: Add command to override charger limit
This patch adds EC_CMD_OVERRIDE_DEDICATED_CHARGER_LIMIT, which
overrides the max input current and voltage when a barrel jack
adapter supplies power.
BUG=b:64442692
BRANCH=none
TEST=Boot Fizz. Use chgsup console command to verify the max
current and voltage are set as expected.
Change-Id: I8c6fc54e519ce13e3db82ee2cecaa96c6eb42d8a
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://review.coreboot.org/22624
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/ec/google/chromeec/ec.h')
-rw-r--r-- | src/ec/google/chromeec/ec.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index 0b6f880909..e1bf6c8e76 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -91,6 +91,16 @@ int google_chromeec_set_usb_pd_role(u8 port, enum usb_pd_control_role role); int google_chromeec_get_usb_pd_power_info(enum usb_chg_type *type, u32 *max_watts); +/* + * Set max current and voltage of a dedicated charger. + * + * @param current_lim Max current in mA + * @param voltage_lim Max voltage in mV + * @return non-zero for error, otherwise 0. + */ +int google_chromeec_override_dedicated_charger_limit(u16 current_lim, + u16 voltage_lim); + /* internal structure to send a command to the EC and wait for response. */ struct chromeec_command { uint16_t cmd_code; /* command code in, status out */ |