[Gta04-owner] Linux 3.2-rc3 on GTA04

NeilBrown neilb at suse.de
Wed Nov 30 08:08:37 CET 2011


On Wed, 30 Nov 2011 07:34:09 +0100 "Dr. H. Nikolaus Schaller"
<hns at goldelico.com> wrote:

> 
> Am 30.11.2011 um 01:48 schrieb NeilBrown:
> 
> > On Wed, 30 Nov 2011 00:17:04 +0000 Neil Jerram <neil at ossau.homelinux.net>
> > wrote:
> > 
> >> On 28.11.2011 23:58, Neil Jerram wrote:
> >> 
> >> A few other things to report...
> >> 
> >> 1. I don't think the phone is shutting down fully when I say "shutdown 
> >> -h now" and then remove the USB cable, whereas the hw-validation kernel 
> >> did.  Is it a known problem?  If not, is there something I can do to pin 
> >> it down more precisely?
> > 
> > Yes, I noticed that too.
> > 
> > The only strategy I know of to get more info is to read the code, try to
> > follow what is meant to happen, and put in "printk" statements to find out
> > what actually happens.
> > 
> > (... uses "git grep" a bit a looks around ....)
> > 
> > The key information is the "pm_power_off" variable.
> > Something needs to set this to make power_off happen.
> > In the hw-validation kernel, drivers/mfd/twl4030-power.c
> > sets it.  In the mainline kernel nothing does.
> 
> I think we also have added:
> 
> https://github.com/goldelico/gta04-kernel/commit/d8c5533f5695ec948dea89fba332144644584680#arch/arm/kernel/process.c

Ahh... I think that is "wrong".  i.e. it'll never go upstream.

"shutdown -h now" is not suppose to power off.  The "correct" command is
"shutdown -h -P now"  so we should probably get use to that.

I tend to use
   halt -f -p
or
   echo o > /proc/sysrq-trigger

I don't see the point in running lots of shutdown scripts - when I want to
power off, I want it of *now* :-)

An alternative is
  poweroff

which is probably easy to remember and will do the "right" thing.



> 
> > 
> > It seems that twl4030-power.c in mainline contains twl4030_remove_script
> > which is never used.  Maybe that is meant to do something.
> > Or maybe we just need to copy twl4030_poweroff from the hw kernel and use
> > that.  Need to read the twl4030 data sheets and figure out what the two
> > routines are doing.
> 
> If I remember correctly, these scripts can be empty (length 0). But if they
> are NULL, the twl4030 code that can initialize the pm_power_off variable
> is never called.     

... I'm going to have to read the code and the spec sheet now....

Ahh, so the 'scripts' are sequences power-management commands (turn
different regulators on/off) which can happen on different events
(power-button, RTC alarm, suspend-request etc).
We currently don't program them, so much of that functionality won't work yet.

drivers/mfd/twl-core.c will only initialise twl4030-power.c if the list is
not NULL.
In hw-validation, that initialisation sets up pm_power_off. In mainline it
doesn't.

So:
  - need to understand these sequences
  - need to find out how the different software-initiate state transitions
    are communicated to twl4030.

Lots more reading to do :-)

NeilBrown


> 
> Thanks for your great work on the mainline kernel!
> 
> Nikolaus
> _______________________________________________
> Gta04-owner mailing list
> Gta04-owner at goldelico.com
> http://lists.goldelico.com/mailman/listinfo/gta04-owner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20111130/c8d7e332/attachment.bin>


More information about the Gta04-owner mailing list