[PATCH] qi: initialize PMU GPIOs

Werner Almesberger werner at openmoko.org
Sat Jan 24 17:10:37 CET 2009

Joerg Reisenweber wrote:
> Similarly when enabling GSM_ON power for calypso, sysfs driver should
> not rely 
> on any prev settings, but instead write gpio2dir, gpio2sel, gpio2pol 
> accordingly.

Naw, that would be a bit excessive. As long as we make sure that (in
the kernel) the initial states are good, there's no reason to suspect
anything will change behind our back. In fact, if it does, we probably
want to have this happen very visible ;-)

> Also to handle powerup in a sensible way, it seems to me sysfs driver should 
> use he following sequence:

Yes, this makes sense. The current sequence looks like a problem waiting
to happen. And who knows, maybe it is happening and people just see it
as random GSM breakage ?
> For power down via sysfs, it should be regarded there are two different ways 
> with different semantics to shut down a GSM-MT:
> *soft* (= send "AT at POWEROFF", wait for modem to deregister with network, 
> GSM_ON = low)
> *hard* (= set GSM_ON=low unconditionally and immediately)

I think we can leave the "clean shutdown" to user space. Let the kernel
only worry about making sure it's gone (i.e., GSM_ON low and maybe also
assert reset) when user space asks for it.

> AFAIK Paul is working on this sysfs patch right now, so no need for Werner or 
> Andy to duplicate this work right away :)

Great, thanks !

- Werner

More information about the openmoko-kernel mailing list