From b20f3f9e8e537ee25bfb86940903cba4b5abbde6 Mon Sep 17 00:00:00 2001 From: Kiran Raparthy Date: Mon, 24 Nov 2014 22:54:59 +0530 Subject: usb: phy: Handle per-PHY event for connnect and disconnect events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: Android Kernel Team Cc: John Stultz Cc: Sumit Semwal Cc: Arve Hjønnevåg Cc: Benoit Goby Cc: Todd Poynor Signed-off-by: Kiran Raparthy Signed-off-by: Felipe Balbi --- drivers/usb/phy/phy-gpio-vbus-usb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/usb/phy/phy-gpio-vbus-usb.c') diff --git a/drivers/usb/phy/phy-gpio-vbus-usb.c b/drivers/usb/phy/phy-gpio-vbus-usb.c index 9fcf19b..5451172 100644 --- a/drivers/usb/phy/phy-gpio-vbus-usb.c +++ b/drivers/usb/phy/phy-gpio-vbus-usb.c @@ -134,6 +134,7 @@ static void gpio_vbus_work(struct work_struct *work) atomic_notifier_call_chain(&gpio_vbus->phy.notifier, status, gpio_vbus->phy.otg->gadget); + usb_phy_set_event(&gpio_vbus->phy, USB_EVENT_ENUMERATED); } else { /* optionally disable D+ pullup */ if (gpio_is_valid(gpio)) @@ -148,6 +149,7 @@ static void gpio_vbus_work(struct work_struct *work) atomic_notifier_call_chain(&gpio_vbus->phy.notifier, status, gpio_vbus->phy.otg->gadget); + usb_phy_set_event(&gpio_vbus->phy, USB_EVENT_NONE); } } -- cgit v1.1