diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2016-07-08 22:09:05 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-25 12:13:06 +0300 |
commit | 0c0e287d454a2dbfaea4159ed45f7b146010f88b (patch) | |
tree | ac8d364b570c2461837c80421e7e03289a5e7ac6 /drivers/usb/phy | |
parent | dc55c67e9c95e89ef5e384fb1f70520a5383c9dd (diff) |
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