[Gta04-owner] Linux 3.7 for gta04.

NeilBrown neilb at suse.de
Thu Feb 14 00:39:14 CET 2013


On Wed, 13 Feb 2013 23:38:17 +0100 Lukas Märdian <luk at slyon.de> wrote:

> Am 11.12.2012 05:52, schrieb NeilBrown:
> > Now that 3.7 is out, my 'mainline' branch in
> >   git://neil.brown.name/gta04
> > 
> > has a 3.7 based kernel that seems to work on the gta04.
> > 
> > I say "seems to" because I don't seem to charge the battery and there are
> > possibly other things that don't work - I've only done limited testing.
> > 
> > I've included the "f2fs" filesystem in this release as I think it is
> > something worth experimenting with on uSD cards.  I plan to move my root
> > filesystem to f2fs once I'm happy that 3.7 is stable.
> > 
> > I don't recommend using this as the base for a distro as it isn't tested much
> > and I plan do do some development work on.  When I think it is stable and
> > decide to leave it alone for a while and create a 3.7-gta04 branch to hold it.
> > 
> > I might push to to github too, but neil.brown.name now has much better
> > network connectivity so you should have no problems using it directly.
> > 
> > Bug reports, success report, patches etc etc always welcome.
> 
> Hi,
> 
> I started playing with 3.7 recently.
> But now I've got a problem: after trying to suspend my GTA04 (echo mem >
> /sys/power/state) it resumes directly afterwards.
> 
> At first I thought it would be the GPS (as it was on older kernels), but
> this shouldn't be a problem anymore on 3.7.. But I'm not sure how to
> prove this, as when I open /dev/ttyO1 GPS is powered on automatically.
> Is there a way to check (and/or force) the GPS power state?

The kernel driver which manages the GPS state is rather noisy still.
When it pulls the power-toggle down it prints
   GPS down
when it pulls it back up it prints
   GPS up
A little later it prints
   GPS idle

meaning that it has waited 10msec, so the GPS should have noticed the 'up'
transition.

This sequence should toggle the power state (on->off or off->on).

Whenever the GPS sends a character while it 'should' be off, the driver will
print a single "!".  No newline, so you might get several of these on a line.

When anything opens /dev/ttyO1, it prints:
   GPS SET to 1
When it is closed of the last time, or when the system suspends even if the
device is open, it prints
   GPS SET to 0

So if the last GPS SET message  is GPS SET to 0, and there are no '!'
messages, then you know that the GPS is off and should be off.


> 
> Or is there in general any way in Linux how to determine which interrupt
> triggered the resume, like a list of the last interrupts in order of
> occurrence?

Not really.  You sometimes get a "last active wakeup source" message, like

[ 1156.672058] last active wakeup source: twl4030_pwrbutton

It is certainly worth checking for that.  You might need a CONFIG option to enable it.

I would compile with

CONFIG_PM_DEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y
CONFIG_PM_SLEEP_DEBUG=y

and see if that reveals anything.

NeilBrown
-------------- 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/20130214/a910ccef/attachment.bin>


More information about the Gta04-owner mailing list