summaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2016-07-08 22:09:05 +0200
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-08-25 12:13:06 +0300
commit0c0e287d454a2dbfaea4159ed45f7b146010f88b (patch)
treeac8d364b570c2461837c80421e7e03289a5e7ac6 /drivers/usb/phy
parentdc55c67e9c95e89ef5e384fb1f70520a5383c9dd (diff)
downloadop-kernel-dev-0c0e287d454a2dbfaea4159ed45f7b146010f88b.zip
op-kernel-dev-0c0e287d454a2dbfaea4159ed45f7b146010f88b.tar.gz
usb: gadget: pxa27x: add phy notifier event handler
In the legacy behavior, and USB phy, upon detection a VBus signal, was calling usb_gadget_vbus_(dis)connect(). This model doesn't work if the phy is generic and doesn't have an adherence to the gadget API. Instead of relying on the phy to call the gadget API, hook up the phy notifier to report the VBus event, and upon it call the usb gadget API ourselves. This brings a new ordering problem, as before even if the usb_get_phy() was failing because the UDC was probed before the phy, the phy would call the gadget anyway, making the VBus connection event forwarded to the gadget. Now we rely on the notifier, we have to ensure the xxx_get_phy() does indeed work. In order to cope with this, it is assumed that : - for legacy platform_data machine, as the ordering cannot be ensured, the phy must call usb_gadget_vbus_(dis)connect, such as phy-gpio-vbus-usb.c - for new devicetree platforms, we'll rely on the probe deferral, and the phy can be gadget API agnostic. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/phy')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud