diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-04-03 10:47:48 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-05-01 03:44:19 +0000 |
commit | 6dce2424d99de40763a039eb099efcd5b0a52cb2 (patch) | |
tree | d54d49f41cb50889c7c00886c3bdfb45877d56d9 /board | |
parent | 62080646fe4312de930e4c4d766106438eae5efc (diff) | |
download | chrome-ec-6dce2424d99de40763a039eb099efcd5b0a52cb2.tar.gz |
charge_manager: modify PD power HC to give more info on current
Change the EC_CMD_USB_PD_POWER_INFO host command to report the input
current limit and the max current theoretically possible given the
charger. The input current limit field is useful for logging purposes
and the max current field is useful to give to powerd to determine
if we have a low power charger connected.
The max current is determined by checking if the charge supplier is
allowed to ramp. If the charge supplier is allowed to ramp and has
not completed ramping yet, then max current is the max current that
we are allowed to ramp up to. Once the ramp has completed, then max
current is the stable charging current. If the charge supplier is not
allowed to ramp, then max current is simply the max current as
registered with charge_manager. The point here is to keep the max as
high as possible until we know for sure it is lower to avoid showing
the user the low power notification until we know for sure.
This CL also adds a new charger type, USB_CHG_TYPE_UNKNOWN. For a short
period after a charger is plugged in, the supplier type may change and
PD negotiation is still in process, and therefore we tell the host we
have an unknown charger type. This allows powerd to show the charging
icon, but delay determining if this is a low power charger until we
know for sure.
BUG=chrome-os-partner:38548
BRANCH=samus
TEST=tested with zinger, a DCP, an SDP, and a proprietary charger.
tested that low power notification never pops up with zinger, even
if you purposely wedge charge circuit with "charger voltage 7000" on
EC console. tested that the other chargers all pop up low power
notification once the supplier changes from UNKNOWN to the real
supplier. used "ectool --name=cros_pd usbpdpower" to check current
values.
Change-Id: If8a9a1799504cc2a13238f4e6ec917d25d972b22
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/265066
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/samus_pd/board.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h index ea5a7ef290..5e48b5e53a 100644 --- a/board/samus_pd/board.h +++ b/board/samus_pd/board.h @@ -53,6 +53,7 @@ #define CONFIG_USB_PD_CUSTOM_VDM #define CONFIG_USB_PD_DUAL_ROLE #define CONFIG_USB_PD_FLASH_ERASE_CHECK +#define CONFIG_USB_PD_HOST_EVENT_ON_POWER_CHANGE #define CONFIG_USB_PD_INTERNAL_COMP #define CONFIG_USB_PD_LOGGING #define CONFIG_USB_PD_LOG_SIZE 512 |