On Thu, May 07, 2015 at 03:38:50PM +0300, Laurentiu Palcu wrote:
> 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?

that should be the correct event to listen to, at least as of now.
USB Charging in Linux hasn't seen a lot of love lately, I'm afraid.

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to