GTA02 USB and battery current profile

Michael 'Mickey' Lauer mickey at openmoko.org
Sun Mar 9 16:39:46 CET 2008


On Sunday 09 March 2008 16:32:30 Michael 'Mickey' Lauer wrote:
> On Sunday 09 March 2008 16:07:32 Andy Green wrote:
> > > That would be done in userspace :-p
> > > Are you guys using HAL?
>
> No, we're working on something more lightweight (See
> http://www.freesmartphone.org/mediawiki/index.php/Implementations/OpenDevic
>eDaemon)
>
> > What we need before this is a plan for the dynamic host / gadget
> > switching in the kernel.  We can poll the USB ID to find if it is
> > grounded, floating, or with the "1A" charger... then what do we do if we
> > find the situation changed?
>
> Userland would be satisfied if we had a sysfs node with a description of
> the current scenario, e.g.
>
> "charger" (our 1A charger is connected)
> "gadget" (we are connected to a host that enumerated us)
> "host" (we are connected to a gadget)
>
> the device daemon can then load the proper module based on either user
> interaction or context (profile or preference).

Adding up on that... this assumes we still receive all USB plug events through 
the input node (as in GTA01) [to prevent polling].

:M:




More information about the openmoko-kernel mailing list