diff options
author | Wai-Hong Tam <waihong@google.com> | 2018-11-02 14:49:46 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-07 20:27:00 -0800 |
commit | b498f108bd28c4bc2aec9749b3ef80263d916e85 (patch) | |
tree | 88a5fe9f4cd579a616a83bf33d9a91a629e82d54 /driver | |
parent | eed2e9cfdfc0ebd660f9a30b3e6cb6bad7167a5c (diff) | |
download | chrome-ec-b498f108bd28c4bc2aec9749b3ef80263d916e85.tar.gz |
usb_mux: Clear HPD IRQ if hpd_update() is a virtual driver
The hpd_update() function and the USB mux driver can be different.
The logic to clear HPD IRQ is executed only if hpd_update() is a
virtual driver.
BRANCH=none
BUG=b:118898133
TEST=make buildall -j
TEST=Checked the followed CL which tested the HPD IRQ get cleared.
Change-Id: Icae56e51b0fabe8a5a02ae671840df6193ba6d03
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1316369
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/usb_mux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/usb_mux.c b/driver/usb_mux.c index 97c76d1828..f1b687e24a 100644 --- a/driver/usb_mux.c +++ b/driver/usb_mux.c @@ -243,7 +243,7 @@ static int hc_usb_pd_mux_info(struct host_cmd_handler_args *args) #ifdef CONFIG_USB_MUX_VIRTUAL /* Clear HPD IRQ event since we're about to inform host of it. */ if ((r->flags & USB_PD_MUX_HPD_IRQ) && - mux->driver == &virtual_usb_mux_driver) + mux->hpd_update == &virtual_hpd_update) mux->hpd_update(port, 0, 0); #endif |