All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] power: supply: sbs-battery: Add delay when changing capacity mode
@ 2017-07-10  6:23 Phil Reid
  2017-07-10  6:23 ` [PATCH 1/4] power: supply: sbs-battery: Remove FSF mailing address from comments Phil Reid
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Phil Reid @ 2017-07-10  6:23 UTC (permalink / raw)
  To: sre, preid, linux-pm, posted

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-07-11 10:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10  6:23 [PATCH 0/4] power: supply: sbs-battery: Add delay when changing capacity mode Phil Reid
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

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.