All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	Jarkko Nikula <jarkko.nikula@bitmer.com>,
	Johan Hovold <johan@kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Marcel Partap <mpartap@gmx.net>,
	Merlijn Wajer <merlijn@wizzup.org>,
	Michael Scott <hashcode0f@gmail.com>, NeKit <nekit1000@gmail.com>,
	omerlle@gmail.com, Sebastian Reichel <sre@kernel.org>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	Rob Herring <robh@kernel.org>
Subject: Re: WIP Droid 4 voice calls, GNSS & PM with a TS 27.010 serdev driver
Date: Fri, 28 Dec 2018 14:28:05 -0800	[thread overview]
Message-ID: <20181228222805.GC6707@atomide.com> (raw)
In-Reply-To: <20181228204614.GA9431@amd>

Hi,

* Pavel Machek <pavel@ucw.cz> [181228 20:46]:
> I have ofone with direct AT access --
> https://github.com/pavelmachek/unicsy_demo/blob/master/ofone/at.py .

OK thanks, that shows some of the commands I was wondering about.

> Now, ttyUSB4 provides quite a rich interface, and you can actually
> select what if you want messages in text and PDU format, and if you
> want modem to auto-acknowledge messages for you.

So which AT command configures auto-ack of SMS? I don't need it,
just wondering what all these commands do.

> What kind of battery life do you get with all the optimalizations?
> IIRC I was getting 7h with ttyUSB4 in use...

With droid4-pending-mdm-v4.20 branch in the following state:

- UARTs idled
- LCD blanked (well no drivers yet droid4-sms-read.rb)
- MUSB and EHCI USB modules unloaded
- OHCI loaded with all the children in autosuspend via sysfs
- WLAN connected
- busybox acpid stopped (yup, it keeps polling something???)
- MDM6600 online with AT+CFUN=1 on /dev/motmdm1
- MDM6600 notifications disabled with AT+SCRN=0 on /motmdm1
- droid4-sms-read.rb running

I'm seeing droid 4 idle at 119mW according to my power supply.
So I guess theoretical battery life would currently be
(1785mWh * 3.8V) / 119mW = 57h. But in practise things are not
completely idle and monitoring sysfs POWER_SUPPLY_POWER_AVG
every 10 seconds I'm seeing something along these 10 samples:

POWER_SUPPLY_POWER_AVG=138938
POWER_SUPPLY_POWER_AVG=134571
POWER_SUPPLY_POWER_AVG=505802
POWER_SUPPLY_POWER_AVG=240412
POWER_SUPPLY_POWER_AVG=134252
POWER_SUPPLY_POWER_AVG=132694
POWER_SUPPLY_POWER_AVG=571569
POWER_SUPPLY_POWER_AVG=132694
POWER_SUPPLY_POWER_AVG=190456
POWER_SUPPLY_POWER_AVG=518288

So the average based on that sampling is about 270mW and the idle
time should be about 1785 * 3.8 / 270 = 25h, which is quite usable
already :)

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Rob Herring <robh@kernel.org>, Marcel Partap <mpartap@gmx.net>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	omerlle@gmail.com, Merlijn Wajer <merlijn@wizzup.org>,
	linux-kernel@vger.kernel.org, Johan Hovold <johan@kernel.org>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	NeKit <nekit1000@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	Michael Scott <hashcode0f@gmail.com>,
	Sebastian Reichel <sre@kernel.org>,
	linux-omap@vger.kernel.org,
	Jarkko Nikula <jarkko.nikula@bitmer.com>
Subject: Re: WIP Droid 4 voice calls, GNSS & PM with a TS 27.010 serdev driver
Date: Fri, 28 Dec 2018 14:28:05 -0800	[thread overview]
Message-ID: <20181228222805.GC6707@atomide.com> (raw)
In-Reply-To: <20181228204614.GA9431@amd>

Hi,

* Pavel Machek <pavel@ucw.cz> [181228 20:46]:
> I have ofone with direct AT access --
> https://github.com/pavelmachek/unicsy_demo/blob/master/ofone/at.py .

OK thanks, that shows some of the commands I was wondering about.

> Now, ttyUSB4 provides quite a rich interface, and you can actually
> select what if you want messages in text and PDU format, and if you
> want modem to auto-acknowledge messages for you.

So which AT command configures auto-ack of SMS? I don't need it,
just wondering what all these commands do.

> What kind of battery life do you get with all the optimalizations?
> IIRC I was getting 7h with ttyUSB4 in use...

With droid4-pending-mdm-v4.20 branch in the following state:

- UARTs idled
- LCD blanked (well no drivers yet droid4-sms-read.rb)
- MUSB and EHCI USB modules unloaded
- OHCI loaded with all the children in autosuspend via sysfs
- WLAN connected
- busybox acpid stopped (yup, it keeps polling something???)
- MDM6600 online with AT+CFUN=1 on /dev/motmdm1
- MDM6600 notifications disabled with AT+SCRN=0 on /motmdm1
- droid4-sms-read.rb running

I'm seeing droid 4 idle at 119mW according to my power supply.
So I guess theoretical battery life would currently be
(1785mWh * 3.8V) / 119mW = 57h. But in practise things are not
completely idle and monitoring sysfs POWER_SUPPLY_POWER_AVG
every 10 seconds I'm seeing something along these 10 samples:

POWER_SUPPLY_POWER_AVG=138938
POWER_SUPPLY_POWER_AVG=134571
POWER_SUPPLY_POWER_AVG=505802
POWER_SUPPLY_POWER_AVG=240412
POWER_SUPPLY_POWER_AVG=134252
POWER_SUPPLY_POWER_AVG=132694
POWER_SUPPLY_POWER_AVG=571569
POWER_SUPPLY_POWER_AVG=132694
POWER_SUPPLY_POWER_AVG=190456
POWER_SUPPLY_POWER_AVG=518288

So the average based on that sampling is about 270mW and the idle
time should be about 1785 * 3.8 / 270 = 25h, which is quite usable
already :)

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2018-12-28 22:28 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17  0:44 WIP Droid 4 voice calls, GNSS & PM with a TS 27.010 serdev driver Tony Lindgren
2018-12-17  0:44 ` Tony Lindgren
2018-12-18 12:46 ` Pavel Machek
2018-12-18 12:46   ` Pavel Machek
2018-12-18 15:36   ` Tony Lindgren
2018-12-18 15:36     ` Tony Lindgren
2018-12-18 20:22     ` Pavel Machek
2018-12-18 20:22       ` Pavel Machek
2018-12-18 21:53       ` Tony Lindgren
2018-12-18 21:53         ` Tony Lindgren
2019-01-16 13:48         ` Pavel Machek
2019-01-16 13:48           ` Pavel Machek
2019-01-17  2:54           ` Tony Lindgren
2019-01-17  2:54             ` Tony Lindgren
2019-01-17 12:51             ` Pavel Machek
2019-01-17 12:51               ` Pavel Machek
2018-12-22 23:05 ` Pavel Machek
2018-12-22 23:05   ` Pavel Machek
2018-12-23 10:33 ` Pavel Machek
2018-12-23 10:33   ` Pavel Machek
2018-12-23 11:10   ` Pavel Machek
2018-12-23 11:10     ` Pavel Machek
2018-12-23 15:51     ` Tony Lindgren
2018-12-23 15:51       ` Tony Lindgren
2018-12-23 19:59       ` Pavel Machek
2018-12-23 19:59         ` Pavel Machek
2018-12-26 21:16       ` Pavel Machek
2018-12-26 21:16         ` Pavel Machek
2018-12-27 10:16 ` Pavel Machek
2018-12-27 10:16   ` Pavel Machek
2018-12-28 19:31   ` Tony Lindgren
2018-12-28 19:31     ` Tony Lindgren
2018-12-28 20:46     ` Pavel Machek
2018-12-28 20:46       ` Pavel Machek
2018-12-28 22:28       ` Tony Lindgren [this message]
2018-12-28 22:28         ` Tony Lindgren
2018-12-28 23:25         ` Pavel Machek
2018-12-28 23:25           ` Pavel Machek
2018-12-28 23:34           ` Tony Lindgren
2018-12-28 23:34             ` Tony Lindgren
2018-12-31 22:20         ` Tony Lindgren
2018-12-31 22:20           ` Tony Lindgren
2019-01-16 13:58     ` Pavel Machek
2019-01-16 13:58       ` Pavel Machek
2019-01-16 14:59       ` Tony Lindgren
2019-01-16 14:59         ` Tony Lindgren
2019-01-16 15:09         ` Tony Lindgren
2019-01-16 15:09           ` Tony Lindgren
2019-01-16 23:06         ` Pavel Machek
2019-01-16 23:06           ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181228222805.GC6707@atomide.com \
    --to=tony@atomide.com \
    --cc=hashcode0f@gmail.com \
    --cc=jarkko.nikula@bitmer.com \
    --cc=johan@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=merlijn@wizzup.org \
    --cc=mpartap@gmx.net \
    --cc=nekit1000@gmail.com \
    --cc=omerlle@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=peter.ujfalusi@ti.com \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.