Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1367271
| From | Sebastian Reichel <sre@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] sbs-battery: fix power status when battery is dry |
| Date | 2016-03-30 17:10 +0200 |
| Message-ID | <ripUS-7fj-15@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <rhChs-5v5-17@gated-at.bofh.it> <rhHK9-G1-3@gated-at.bofh.it> <rhR6O-7mk-9@gated-at.bofh.it> <ri3rk-82W-15@gated-at.bofh.it> <rik8P-2NM-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi, On Wed, Mar 30, 2016 at 04:58:30PM +0800, YH Huang wrote: > If I revise the description in this way(using your clear explanation): > ------------------------------------------------------------------------ > The battery capacity changing course is like this: > > full: BATTERY_FULLY_CHARGED => POWER_SUPPLY_STATUS_FULL > <unplug AC> > high->low: BATTERY_DISCHARGING => POWER_SUPPLY_STATUS_DISCHARGING > ~0%: DISCHARGING & FULLY_DISCHARGED => POWER_SUPPLY_STATUS_NOT_CHARGING > <plug in AC> > 0%~20%: FULLY_DISCHARGED => POWER_SUPPLY_STATUS_CHARGING > 20%~: No flag => POWER_SUPPLY_STATUS_CHARGING > > For now, it is not exactly right to show the status as > POWER_SUPPLY_STATUS_NOT_CHARGING when the battery is dry > (FULLY_DISCHARGED) and AC is plugged in. > Although the battery is in a low level, system works fine with the AC > charging. > It is better to say that the battery is charging. > ------------------------------------------------------------------------ > > How about this? > By the way, should I also revise the title? POWER_SUPPLY_STATUS_NOT_CHARGING is used for AC connected, but battery not charging (e.g. because battery temperature is out of acceptable range). If you are discharging use POWER_SUPPLY_STATUS_DISCHARGING. You should just ignore the FULLY_DISCHARGED bit in the status property. If you don't want to loose the information about fully discharged battery add POWER_SUPPLY_PROP_CAPACITY_LEVEL, which maps: BATTERY_FULLY_CHARGED => POWER_SUPPLY_CAPACITY_LEVEL_FULL FULLY_DISCHARGED => POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL otherwise => POWER_SUPPLY_CAPACITY_LEVEL_NORMAL -- Sebastian
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] sbs-battery: fix power status when battery is dry YH Huang <yh.huang@mediatek.com> - 2016-03-23 11:00 +0100
Re: [PATCH] sbs-battery: fix power status when battery is dry Daniel Kurtz <djkurtz@chromium.org> - 2016-03-24 05:10 +0100
Re: [PATCH] sbs-battery: fix power status when battery is dry YH Huang <yh.huang@mediatek.com> - 2016-03-24 07:50 +0100
Re: [PATCH] sbs-battery: fix power status when battery is dry Daniel Kurtz <djkurtz@chromium.org> - 2016-03-25 04:10 +0100
Re: [PATCH] sbs-battery: fix power status when battery is dry YH Huang <yh.huang@mediatek.com> - 2016-03-28 04:40 +0200
Re: [PATCH] sbs-battery: fix power status when battery is dry Daniel Kurtz <djkurtz@chromium.org> - 2016-03-28 12:10 +0200
Re: [PATCH] sbs-battery: fix power status when battery is dry Rhyland Klein <rklein@nvidia.com> - 2016-03-28 18:00 +0200
Re: [PATCH] sbs-battery: fix power status when battery is dry YH Huang <yh.huang@mediatek.com> - 2016-03-29 04:00 +0200
Re: [PATCH] sbs-battery: fix power status when battery is dry Rhyland Klein <rklein@nvidia.com> - 2016-03-29 17:10 +0200
Re: [PATCH] sbs-battery: fix power status when battery is dry YH Huang <yh.huang@mediatek.com> - 2016-03-30 11:00 +0200
Re: [PATCH] sbs-battery: fix power status when battery is dry Sebastian Reichel <sre@kernel.org> - 2016-03-30 17:10 +0200
Re: [PATCH] sbs-battery: fix power status when battery is dry YH Huang <yh.huang@mediatek.com> - 2016-03-31 04:50 +0200
Re: [PATCH] sbs-battery: fix power status when battery is dry Sebastian Reichel <sre@kernel.org> - 2016-04-02 05:50 +0200
Re: [PATCH] sbs-battery: fix power status when battery is dry Rhyland Klein <rklein@nvidia.com> - 2016-03-30 17:10 +0200
csiph-web