diff options
author | Kiran Raparthy <kiran.kumar@linaro.org> | 2014-11-24 22:54:59 +0530 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-25 08:47:05 -0600 |
commit | b20f3f9e8e537ee25bfb86940903cba4b5abbde6 (patch) | |
tree | e5ff093ca23c06881f6d469e9e0a76fd78c1bd96 /drivers/usb/phy/phy-mv-usb.c | |
parent | f415fbd17f0438913339fd043779f306ee3587b0 (diff) | |
download | op-kernel-dev-b20f3f9e8e537ee25bfb86940903cba4b5abbde6.zip op-kernel-dev-b20f3f9e8e537ee25bfb86940903cba4b5abbde6.tar.gz |
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-mv-usb.c')
-rw-r--r-- | drivers/usb/phy/phy-mv-usb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c index 81d934f..b234d46 100644 --- a/drivers/usb/phy/phy-mv-usb.c +++ b/drivers/usb/phy/phy-mv-usb.c @@ -441,10 +441,12 @@ run: mv_otg_start_periphrals(mvotg, 0); mv_otg_reset(mvotg); mv_otg_disable(mvotg); + usb_phy_set_event(&mvotg->phy, USB_EVENT_NONE); break; case OTG_STATE_B_PERIPHERAL: mv_otg_enable(mvotg); mv_otg_start_periphrals(mvotg, 1); + usb_phy_set_event(&mvotg->phy, USB_EVENT_ENUMERATED); break; case OTG_STATE_A_IDLE: otg->default_a = 1; |