diff options
author | Kiran Raparthy <kiran.kumar@linaro.org> | 2014-11-24 18:24:59 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-25 15:47:05 +0100 |
commit | b20f3f9e8e537ee25bfb86940903cba4b5abbde6 (patch) | |
tree | e5ff093ca23c06881f6d469e9e0a76fd78c1bd96 /drivers/usb/phy/phy-tahvo.c | |
parent | usb: dwc2: remove early return on clock query (diff) | |
download | linux-b20f3f9e8e537ee25bfb86940903cba4b5abbde6.tar.xz linux-b20f3f9e8e537ee25bfb86940903cba4b5abbde6.zip |
usb: phy: Handle per-PHY event for connnect and disconnect events
When usb is connected and enumerated in device mode or when
usb is disconnected, call usb_phy_set_event() from phy drivers
to handle per-PHY event.
[ toddpoynor@google.com : Original patch in Android ]
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: Android Kernel Team <kernel-team@android.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Benoit Goby <benoit@android.com>
Cc: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Kiran Raparthy <kiran.kumar@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-tahvo.c')
-rw-r--r-- | drivers/usb/phy/phy-tahvo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c index 9cabc1a20d1c..d391c79a542a 100644 --- a/drivers/usb/phy/phy-tahvo.c +++ b/drivers/usb/phy/phy-tahvo.c @@ -87,6 +87,7 @@ static void check_vbus_state(struct tahvo_usb *tu) if (tu->phy.otg->gadget) usb_gadget_vbus_connect(tu->phy.otg->gadget); tu->phy.otg->state = OTG_STATE_B_PERIPHERAL; + usb_phy_set_event(&tu->phy, USB_EVENT_ENUMERATED); break; case OTG_STATE_A_IDLE: /* @@ -105,6 +106,7 @@ static void check_vbus_state(struct tahvo_usb *tu) if (tu->phy.otg->gadget) usb_gadget_vbus_disconnect(tu->phy.otg->gadget); tu->phy.otg->state = OTG_STATE_B_IDLE; + usb_phy_set_event(&tu->phy, USB_EVENT_NONE); break; case OTG_STATE_A_HOST: tu->phy.otg->state = OTG_STATE_A_IDLE; |