USB: otg: Add support for sending events to userspace
OTG specification insists no silent failures. Add framework
for sending OTG failures/notifications to userspace.
The following events are defined in usb_otg_event type.
OTG_EVENT_DEV_CONN_TMOUT: Device connection timeout or device
not responing.
OTG_EVENT_NO_RESP_FOR_HNP_ENABLE: Device is not responding to
B_HNP_ENABLE feature request.
OTG_EVENT_HUB_NOT_SUPPORTED: Host does not support HUB class
peripherals.
OTG_EVENT_DEV_NOT_SUPPORTED: Host does not support the attached
peripheral.
OTG_EVENT_HNP_FAILED: HNP failed due to not meeting protocol
timings.
OTG_EVENT_NO_RESP_FOR_SRP: No Response for B-device SRP request.
This patch adds a new method called send_event in otg_transceiver
structure. OTG driver is notified about the event via send_event
method. It is the responsibility of OTG driver to send the event
to userspace. Two possible methods could be sending uevents or
providing an ioctl interface.
Change-Id: I4e518be406909fc4a9641890a3131d897a2c8636
Signed-off-by:
Pavankumar Kondeti <pkondeti@codeaurora.org>
Loading
Please register or sign in to comment