On Wed, Jul 27, 2011 at 09:41:23AM -0700, jacob pan wrote: > On Wed, 27 Jul 2011 16:02:37 +0300 > Felipe Balbi <balbi@xxxxxx> wrote: > > > On Wed, Jul 27, 2011 at 05:58:26AM -0700, jacob pan wrote: > > > On Wed, 27 Jul 2011 14:29:05 +0200 > > > Michal Nazarewicz <mina86@xxxxxxxxxx> wrote: > > > > > > > On Wed, 27 Jul 2011 14:17:28 +0200, jacob pan > > > > <jacob.jun.pan@xxxxxxxxx> wrote: > > > > > my goal is to inform userspace the connection status of otg port > > > > > such that user can make a decision on which gadget role he > > > > > wants to use for the device. It seems these ffs_data_xxx > > > > > functions cannot definitively tell the connection state. I > > > > > guess i may have to add uevents to the UDC driver or OTG > > > > > transcriver driver. But it would not be a generic solution as > > > > > functionfs. > > > > if all you want to do is notify cable connection, just notify VBUS > > from the transceiver. If VBUS is on, your cable is connected to a > > host PC. If ID IRQ is triggered (instead of VBUS) then you're > > supposed to be host. > > > yes, i can track vbus and session valid to emit notification. looks > like it has to be in the device specific transceiver driver. really > appreciate for the advise. unfortunately we still don't have a generic PHY layer, that needs to be done. Once that's done we can have generic notifications ;-) -- balbi
Attachment:
signature.asc
Description: Digital signature