[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201001260733.01628.david-b@pacbell.net>
Date: Tue, 26 Jan 2010 07:33:01 -0800
From: David Brownell <david-b@...bell.net>
To: felipe.balbi@...ia.com
Cc: "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Anton Vorontsov <avorontsov@...mvista.com>,
Grazvydas Ignotas <notasas@...il.com>,
Madhusudhan Chikkature <madhu.cr@...com>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
"Greg Kroah-Hartman" <gregkh@...e.de>
Subject: Re: [RFC/PATCH 1/5] usb: otg: add notifier support
On Tuesday 26 January 2010, Felipe Balbi wrote:
> just remember of another problem which I couldn't solve yet:
>
> if you boot the board with the usb cable already attached, then we miss
> the first notification because when the notifier is called, usb
> controller driver isn't probed yet.
That's part of why the OTG transceiver driver has methods
used by host and peripheral drivers to register themselves.
Standard init sequence there is to do nothing until both
drivers are fully initialized ... last step being to
register the drivers with the transceiver. That way the
transceiver can know when its peer drivers are ready.
Example: VBUS present from a host. If the board runs
in OTG mode, as soon as both drivers are registered then
the B-Default state machine would start running ... and
that involves (see the OTG state machine!) issuing a VBBUS
event.
Same thing can be done with the power events. As soon
as an event listener is registered, it could be fed any
events it missed. (Just one approach; one must sort
out any other interdependencies too. In this case, it
can make sense to consume 100mA current right away, and
then adjust the draw later if needed.)
- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists