On Thu, 22 Jul 2010 19:40:44 +0300, Felipe Balbi <m...@felipebalbi.com> wrote:
> On 07/22/2010 06:16 PM, Kan-Ru Chen wrote:
> > Just curious about how to do this in a more automatic way.
> > 
> > I think setup a daemon to monitor the musb_hdrc mode and try to alter
> > it's state via sysfs interface will work, but it may be error prone and
> > not always desirable solution.
> > 
> > Can we query the id pin state periodically in the kernel and change to
> > corresponding role?
> 
> the transceiver has an interrupt for id pin changes. You can use that
> instead of polling.

Thanks, I see.

The twl4030_usb transceiver did get the id pin chanegs

    <7>twl4030_usb twl4030_usb: HW_CONDITIONS 0x50/80; link 1
    <7>twl4030_usb twl4030_usb: HW_CONDITIONS 0x54/84; link 3

So the problem is when OTG enter a_host mode then disconnected, it
becomes idle. Plug the peripheral device back would not trigger new
session unless I do "echo otg > /sys/devices/platform/musb_hdrc/mode"
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to