lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141220002440.GC1694@amd>
Date:	Sat, 20 Dec 2014 01:24:40 +0100
From:	Pavel Machek <pavel@....cz>
To:	Jonghwa Lee <jonghwa3.lee@...sung.com>
Cc:	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
	sre@...nel.org, dbaryshkov@...il.com, dwmw2@...radead.org,
	anton@...msg.org, myungjoo.ham@...sung.com, cw00.choi@...sung.com
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ