diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-10-27 18:09:28 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-31 19:22:00 +0000 |
commit | e6a2d4c0440aefda9a77f449230e7f710db426a5 (patch) | |
tree | 0f01a1b0b9b3c3ed87e0d8b5c45922aae9f81c05 /include/ec_commands.h | |
parent | ce9ae08b6889e7d7032ba66821e4c73dae20fb78 (diff) | |
download | chrome-ec-e6a2d4c0440aefda9a77f449230e7f710db426a5.tar.gz |
samus_pd: add more host events and host cmd to get event status
Add support for more host events and add a host command for the host
to use to get which host events have fired. The EC only uses one
real host command to notify the AP whenever the PD MCU needs attention
so the EC_CMD_PD_HOST_EVENT_STATUS host command can be used to
differentiate the possible triggers for the host event.
Current events include: PD remote device needs update, type-C power info
changed, and PD identity response received.
Added host event for power info change, which fires whenever a charger
or device is plugged into a type-C port.
BUG=chrome-os-partner:32650
BRANCH=samus
TEST=tested on samus by connected various peripherals to type-C ports
and verifying on EC console that a host event is sent.
Change-Id: Ibfc2cafe5826a0ab41aee96a68fdb561c0a2b4ab
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225841
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r-- | include/ec_commands.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 07bf6a5a43..df392d7d62 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2699,6 +2699,17 @@ struct ec_response_pd_status { uint32_t curr_lim_ma; /* input current limit */ } __packed; +/* AP to PD MCU host event status command, cleared on read */ +#define EC_CMD_PD_HOST_EVENT_STATUS 0x104 + +/* PD MCU host event status bits */ +#define PD_EVENT_UPDATE_DEVICE (1 << 0) +#define PD_EVENT_POWER_CHANGE (1 << 1) +#define PD_EVENT_IDENTITY_RECEIVED (1 << 2) +struct ec_response_host_event_status { + uint32_t status; /* PD MCU host event status */ +} __packed; + /* Set USB type-C port role and muxes */ #define EC_CMD_USB_PD_CONTROL 0x101 |