lkml.org 
[lkml]   [2014]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH V3 08/11] power: charger-manager: Make chraging decision focusing on battery status.
Subject: charging.


> In cm_monitor() where charging management starts, it checks various charging
> condition sequentially to decide next charging operation. However, as it

conditions.

> follows sequential process, cascaded IF statements, it does some duplicated
> jobs which is already done in previous stage. It results delay in decision

which are. It results in delay in the decision....?

> Both of problems mentioned above becomes clean if it manages battery charging

"become clear".


> @@ -249,6 +249,19 @@ static bool is_full_charged(struct charger_manager *cm)
> if (!fuel_gauge)
> return false;
>
> + /* Full, if it's over the fullbatt voltage */
> + if (desc->fullbatt_uV > 0) {
> + ret = get_batt_uV(cm, &uV);
> + if (!ret) {
> + /* Battery is already full, checks voltage drop. */

"check"

> --- a/include/linux/power/charger-manager.h
> +++ b/include/linux/power/charger-manager.h
> @@ -220,6 +220,7 @@ struct charger_desc {
> * saved status of battery before entering suspend-to-RAM
> * @charging_start_time: saved start time of enabling charging
> * @charging_end_time: saved end time of disabling charging
> + * @battery_status: Current battery status

"current" for consistency.

> */
> struct charger_manager {
> struct list_head entry;
> @@ -237,6 +238,8 @@ struct charger_manager {
>
> u64 charging_start_time;
> u64 charging_end_time;
> +
> + int battery_status;
> };

Should battery_status be some kind of enum?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2014-12-20 02:01    [W:0.149 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site