[Gta04-owner] Modem off

NeilBrown neilb at suse.de
Fri Nov 8 04:07:13 CET 2013

On Tue, 5 Nov 2013 15:02:34 +0100 Andreas Kemnade <andreas at kemnade.info>

> Hi,
> On Tue, 5 Nov 2013 08:51:26 +0100
> Radek Polak <psonek2 at seznam.cz> wrote:
> > On Monday, November 04, 2013 11:09:27 PM Andreas Kemnade wrote:
> > > Hi,
> > > 
> > > On Sat, 2013-09-21 at 08:19 +1000, NeilBrown wrote:
> > > > I've experimented with "rmmod ehci_hcd" just before suspend, and
> > > > "modprobe" on resume, but so far that has just caused a mess.
> > > > I've looked at the code, and it is rather complex.
> > > > It has also changed a lot in 3.10.  So I'm going to defer exploring this
> > > > more until I start on 3.10+ again, probably in a couple of weeks.
> > > 
> > > In 3.12 I get also around 15mA more current in suspend with modem off.
> > > than with modem on. (suspend does not work reliable with that kernel for
> > > me and I have 60mA/85mA current consumption)
> > > 
> > > In 3.7 with enabled modem
> > > doing "echo ehci-omap.0 >unbind" in
> > > /sys/bus/platform/drivers/ehci-omap
> > > also increases current. (I get 40mA then)
> > > doing "echo echi-omap.0 >bind"
> > > decreases it again to around 20mA.
> > > That is also strange.
> > > 
> btw: what is different in doing rmmod/modprobe and doing the unbind/bind?

There should be no difference.
Both 'modprobe' and 'bind' will run the 'probe' function of the driver.
Both 'rmmod' and 'unbind' will run the 'remove' function.

> > > Hmm, what a about doing modprobe/rmmod in
> > > modem-poweron.sh/modem-poweroff.sh?
> > 
> > What would it be good for?
> > 
> > I think Neil's idea was to rmmof USB in sleep. Incoming call modem wakes the 
> > devices up via interrupt, we load the USB driver and using CLCC we detect who 
> > is calling etc... I havent tried myself, but this seems doable. In qtmoko you 
> > can add "rmmod ehci_hcd" to before-suspend.sh and modprobe to after-resume.sh 
> > scripts to implement it.
> > 
> Hmm, the problem was the suspend current is higher when the modem is off. 
> And then Neil found out that removing ehci-hcd reduces that. So if rmmod ehci-hcd
> reduces suspend current when modem is off, then do the rmmod when the modem is turned off
> (so it is also not present when the device is suspended with modem off)

I decided it was time to do some more experiments.

I'm measuring current usage here by having my phone wake up every 5 minutes
and sampling the "charge_now" for the bq27000.
By dividing the change in charge by the change in time I get the average
The numbers are very stable with slight random fluctuations as you would

I booted my phone with my current 3.7 kernel and with no SIM card and with
the GSM program disabled so that the GSM chip isn't turned on.

Current was mostly 28mA, sometimes 26 or 30.

I loaded the ehci-hcd module (which was not loaded).
Current jumped to 36.6 and 38.6 (of 100  5 minutes samples both these
numbers appeared quite often) and very occasionally 34.5.

I removed the ehci-hcd module.  Current was 19.3 or 21.6

(so far this agrees with what I reported before though numbers a slightly
higher for some reason unrelated to USB).

I loaded ehci-hcd module again and current stayed at 19.3/21.6  (though I
only got about a dozen samples for this).

Then I hacked my kernel so that the USB driver didn't do anything with the
transceiver reset line (GPIO 174) and that line was held low the whole time.

Now I got 13mA and 15mA.  (though in a subsequent test I got around 94mA.  I
don't know what I got wrong there).

This was after rebooting and loading and unloading the module.

Finally I tried re-enabling "off mode" which allows the OMAP3 to go into a
much lower power state.

This seems to be very unstable with my current 3.7 kernel (it has always been
a bit unstable but I didn't think it was that bad)  i.e. it will often crash
or hang.

So I only have one reliable 5-minute test result, but is shows 10mA.

So it seem very likely that with a bit of work we can get the phone to use
around 10mA with the modem turned off.  Whether we can get close to that with
it turned on is not at all clear yet.

This is at least very clear evidence that the USB port together with the
transceiver account for a substantial portion of the power usage.

Figuring out why and fixing it is a somewhat different story....


-------------- 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/20131108/de022fdf/attachment.bin>

More information about the Gta04-owner mailing list