All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Reid <preid@electromag.com.au>
To: sre@kernel.org, preid@electromag.com.au,
	linux-pm@vger.kernel.org, posted@heine.so
Subject: [PATCH 0/4] power: supply: sbs-battery: Add delay when changing capacity mode
Date: Mon, 10 Jul 2017 14:23:16 +0800	[thread overview]
Message-ID: <1499667800-69055-1-git-send-email-preid@electromag.com.au> (raw)

This is based on Michael Heinemann's patch:
"sbs-battery: correct capacity mode selection bits"

First two are housing keep / cleanup.
As reported by Michael with his patch he found the mode didn't always change.
I found adding a delay fixed the problem for several Insipered Energy SBS 
compatible batteries I have on hand.

The last patch may need some comment and testing by others.

The SBS spec says that capcaty mode bit:

Changes the return type for the following registers:
  RemainingCapacityAlarm()
  AtRate()
  RemainingCapacity()
  FullChargeCapacity()
  DesignCapacity()

and may affect the following calculations:
  AtRateOK()
  AtRateTimeToEmpty()
  RunTimeToEmpty()
  AverageTimeToEmpty()
  RemainingTimeAlarm()
  BatteryStatus()
  Optional: AtRateTimeToFull()

So far I wasn't able to detect any difference in say the AverageTimeTEmpty(). 
But if we are reseting the bit after the watt reading then perhaps it should 
be reset to the power up value (ie cleared) instead of reset to some other value.

I'm not sure what the best approach is here. 



Phil Reid (4):
  power: supply: sbs-battery: Remove FSF mailing address from comments
  power: supply: sbs-battery: sort includes
  power: supply: sbs-battery: Add delay when changing capacity mode bit
  power: supply: sbs-battery: Don't reset mode in get_battery_capacity

 drivers/power/supply/sbs-battery.c | 55 ++++++++++++++++----------------------
 1 file changed, 23 insertions(+), 32 deletions(-)

-- 
1.8.3.1

             reply	other threads:[~2017-07-10  6:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10  6:23 Phil Reid [this message]
2017-07-10  6:23 ` [PATCH 1/4] power: supply: sbs-battery: Remove FSF mailing address from comments Phil Reid
2017-07-10  6:23 ` [PATCH 2/4] power: supply: sbs-battery: sort includes Phil Reid
2017-07-11  8:37   ` Michael Heinemann
2017-07-11  8:47     ` Phil Reid
2017-07-10  6:23 ` [PATCH 3/4] power: supply: sbs-battery: Add delay when changing capacity mode bit Phil Reid
2017-07-10  6:23 ` [PATCH 4/4] power: supply: sbs-battery: Don't reset mode in get_battery_capacity Phil Reid
2017-07-11  4:57   ` Phil Reid
2017-07-11 10:03     ` Michael Heinemann

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=1499667800-69055-1-git-send-email-preid@electromag.com.au \
    --to=preid@electromag.com.au \
    --cc=linux-pm@vger.kernel.org \
    --cc=posted@heine.so \
    --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.