Proper way to detect host/device mode?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi list,

I'm working on a driver for a charger chip that also supports boost
mode (supply power on VBUS in order to charge other devices). However,
I'm not really sure what's the proper way to detect that we're in host
mode or device mode in order to switch boost mode on.

I saw some charger drivers register a notifier with the usb_phy and
check for USB_EVENT_ID event. According to OTG specifications, if the ID
pin is grounded the initial role should be host mode. But, not all USB
PHY drivers throw this event. In fact, I only found one driver that does
that: omap2430.c.

Is there a more robust/generic way?

Thanks,
laurentiu
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux