diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2016-08-06 18:02:17 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-08-10 20:07:32 -0700 |
commit | d54387c18e20f5973ae62fdc7f8a95872b52f4f5 (patch) | |
tree | c9e552984b2e25a68d3f7bf7ee840582c3f2011a /include | |
parent | 8230e5b356a60831ecc47cd25696d0a1b880c552 (diff) | |
download | chrome-ec-d54387c18e20f5973ae62fdc7f8a95872b52f4f5.tar.gz |
kevin / gru: Notify host of HPD IRQ status
If an HPD IRQ event is seen, make note of it and keep the status set
until informing the host.
BUG=chrome-os-partner:55925
BRANCH=None
TEST=Manual on kevin, trigger HPD event, verify that event bit is set in
reply to first host command and not subsequent host commands.
Change-Id: I0900a683dcb344d5d4d03a1fa6e3d8de913597b2
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/366990
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Chris Zhong <zyw@rock-chips.com>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ec_commands.h | 1 | ||||
-rw-r--r-- | include/usb_mux.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 463bec7d9a..fd3b1b3df4 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -3803,6 +3803,7 @@ struct ec_params_usb_pd_mux_info { #define USB_PD_MUX_USB_ENABLED (1 << 0) #define USB_PD_MUX_DP_ENABLED (1 << 1) #define USB_PD_MUX_POLARITY_INVERTED (1 << 2) +#define USB_PD_MUX_HPD_IRQ (1 << 3) struct ec_response_usb_pd_mux_info { uint8_t flags; /* USB_PD_MUX_*-encoded USB mux state */ diff --git a/include/usb_mux.h b/include/usb_mux.h index daad2792de..c9bd76ba21 100644 --- a/include/usb_mux.h +++ b/include/usb_mux.h @@ -81,6 +81,7 @@ struct usb_mux { /* * USB Type-C DP alt mode support. Notify Type-C controller * there is DP dongle hot-plug. + * TODO: Move this function to usb_mux_driver struct. */ void (*hpd_update)(int port, int hpd_lvl, int hpd_irq); }; @@ -91,6 +92,9 @@ extern const struct usb_mux_driver ps8740_usb_mux_driver; extern const struct usb_mux_driver tcpm_usb_mux_driver; extern const struct usb_mux_driver virtual_usb_mux_driver; +/* Supported hpd_update functions */ +void virtual_hpd_update(int port, int hpd_lvl, int hpd_irq); + /* USB muxes present in system, ordered by PD port #, defined at board-level */ extern struct usb_mux usb_muxes[]; |