Re: Proper way to detect host/device mode?

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

 



Hi Felipe,

On Thu, May 07, 2015 at 08:31:53AM -0500, Felipe Balbi wrote:
> 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.

Thanks, I'll use USB_EVENT_ID event then.

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