Re: Proper way to detect host/device mode?

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

 



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


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

  Powered by Linux