[Letux-kernel] measuring current

Andreas Kemnade andreas at kemnade.info
Mon Feb 13 12:38:36 CET 2017


as I wanted to have some facts about current consumption I wrote this

It requires a directory /measure and is intended to be run by
kernel parameter init=/init-measure-current.sh
The normal init process will be started afterwards.
It loads modules piece by piece and measures current after waiting some
time. I boot without usb cable then after booting is finished, I have
the result in the directory /measure
This are the result on the gta04a5 after battery removal/reinsertion
On my partly-broken gta04a4 I have around 170mA in the first

no modules: cur: 59262 delta: 59262
+w2sg0004 cur: 63903 delta: 4641
+charger,phy cur: 65331 delta: 1428
+musb,g_ether cur: 69258 delta: 3927
+ifup cur: 58191 delta: -11067
+fb cur: 101745 delta: 43554
+backlight cur: 179392 delta: 77647
+ehci-omap cur: 209916 delta: 30524
+wwan-on-off cur: 209202 delta: -714
+hso+unblock cur: 206167 delta: -3035

There is some auto-runtime-supend going on, so the first values are a
bit flaky. BUt at least pm seems to work for the musb/phy stuff.
It does not add to the total current

What is interesting: the delta for ehci-omap:
Why do we need 30mA just for waiting for some D+/D- pullup?

rfkill unblock seems not to work there yet, probably still a forgotten
fb delta is around zero when the fb tiler patches are in (and there is
no fb afterwards).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20170213/ef003bfa/attachment.asc>

More information about the Letux-kernel mailing list