linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] usb: phy: hold wakeupsource on usb phy events.
@ 2014-11-19 10:43 Kiran Kumar Raparthy
  2014-11-19 10:43 ` [PATCH 1/3] usb: phy: introduce usb_phy_set_event interface Kiran Kumar Raparthy
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Kiran Kumar Raparthy @ 2014-11-19 10:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: balbi, john.stultz, sumit.semwal, Kiran Kumar Raparthy

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 3552 bytes --]

This patch set aims to hold wakeupsource per-PHY on usb connect/disconnect
events.

First patch introduces usb_phy_set_event which just sets
event to phy event.
In second patch, phy drivers call usb_phy_set_event for each phy event.
In third patch, wakeupsource is held when usb is enumerated in
peripheral mode and wakeupsource held temporarily on disconnect
event(to allow other parts of the system react to disconnect event).

latest patch-set:
* use USB_PHY_DEFAULT_WAKEUP_SRC_TIMEOUT instead of TEMPORARY_HOLD_TIME

v6:
* Break the patch into three sub patches
  patch 1: Introduce usb_phy_set_event
  patch 2: Call usb_phy_set_event from phy drivers
  patch 3: Hold wakeupsource for connect events and
            temporarily hold wakeupsource for disconnect events.
* Include usb_phy_wsource_init and usb_phy_wource_trash functionality
  in usb_add_phy and usb_remove_phy respectively.

v5:
* with the new approach,i was able to chnage only 5 phy drivers
  as mentioned below to use the wakeupsource funtionality.

drivers/phy/phy-omap-control.c
drivers/usb/phy/phy-ab8500-usb.c
drivers/usb/phy/phy-tahvo.c
drivers/usb/phy/phy-mv-usb.c
drivers/usb/phy/phy-gpio-vbus-usb.c

* Notification method not used any more.
* introduced usb_phy_set_event in phy.c to hold wakeupsource
* introduced usb_phy_wsource_init/usb_phy_wsource_trash in phy.c to
  initialize/relese per-PHY wakeupsource.These interfaces called from
  probe/remove functions of phy drivers.
* usb_phy_set_event called from phy drivers where usb enumeration
  event is handled.
* usb_phy_set_event expects usb_phy handle where as phy-omap-control.c
  provides its own type(omap_control_phy), so directly called __pm_stay_awake
  and  __pm_awake_event from phy-omap-control.c instead of calling
  usb_phy_set_event.

v4:
* Temporarily hold wakeupsource patch integrated into main patch.
* As per feedback,dropped "enabled" module parameter.
* Introduced otgws_otg_usb3_notifications function to handle event
  notifications from usb3 phy.
* Handled wakeupsource initialization,spinlock,registration of notifier block
  per-PHY.
* Updated usb_phy structure.

v3:
* As per the feedback,no global phy pointer used.
* called the one-liner wakeupsource handling calls
  directly instead of indirect functions implemented in v2.
* Removed indirect function get_phy_hook and used usb_get_phy
  to get the phy handle..

v2:
* wakeupsource handling implemeted per-PHY
* Implemented wakeupsource handling calls in phy
* included Todd's refactoring logic.

v1:
* changed to "disabled by default" from "enable by default".
* Kconfig help text modified
* Included better commit text
* otgws_nb moved to otg_wakeupsource_init function
* Introduced get_phy_hook to handle otgws_xceiv per-PHY

Initial RFC:
* Included build fix from Benoit Goby and Arve Hjønnevåg
* Removed lock->held field in driver as this mechanism is
  provided in wakeupsource driver.
* wakelock(wl) terminology replaced with wakeup_source(ws).

Todd Poynor (3):
  usb: phy: introduce usb_phy_set_event interface
  usb: phy: Handle per-PHY event for connect and disconnect events
  usb: phy: hold wakeupsource when USB is enumerated in peripheral mode

 drivers/usb/phy/phy-ab8500-usb.c    | 15 +++++++++++++++
 drivers/usb/phy/phy-gpio-vbus-usb.c |  2 ++
 drivers/usb/phy/phy-mv-usb.c        |  2 ++
 drivers/usb/phy/phy-tahvo.c         |  2 ++
 drivers/usb/phy/phy.c               | 37 +++++++++++++++++++++++++++++++++++++
 include/linux/usb/phy.h             | 10 ++++++++++
 6 files changed, 68 insertions(+)

-- 
1.8.2.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-20 23:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-19 10:43 [PATCH 0/3] usb: phy: hold wakeupsource on usb phy events Kiran Kumar Raparthy
2014-11-19 10:43 ` [PATCH 1/3] usb: phy: introduce usb_phy_set_event interface Kiran Kumar Raparthy
2014-11-19 16:36   ` Todd Poynor
2014-11-20 19:54     ` Felipe Balbi
2014-11-20 23:31       ` Kiran Raparthy
2014-11-19 10:43 ` [PATCH 2/3] usb: phy: Handle per-PHY event for connect and disconnect events Kiran Kumar Raparthy
2014-11-19 10:44 ` [PATCH 3/3] usb: phy: hold wakeupsource when USB is enumerated in peripheral mode Kiran Kumar Raparthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).