lkml.org 
[lkml]   [2014]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm
Hi!

> --- a/drivers/power/Kconfig
> +++ b/drivers/power/Kconfig
> @@ -22,6 +22,19 @@ config POWER_SUPPLY_CHARGER
> drivers to keep the charging logic outside and the charger driver
> just need to abstract the charger hardware.
>
> +config POWER_SUPPLY_CHARGING_ALGO_PSE
> + bool "PSE compliant charging algorithm"
> + help
> + Say Y here to select Product Safety Engineering (PSE) compliant
> + charging algorithm. As per PSE standard the battery characteristics
> + and thereby the charging rates can vary on different temperature
> + zones. This config will enable PSE compliant charging algorithm with
> + maintenance charging support. At runtime the algorithm will be
> + selected by the psy charger driver based on the type of the battery
> + charging profile.

Information where to expect PSE compliant chargers would be nice.

> +static inline bool __is_battery_full
> + (long volt, long cur, long iterm, unsigned long cv)
> +{

codingstyle.

> + pr_devel("%s:current=%ld pse_mod_bprof->chrg_term_mA =%ld voltage_now=%ld full_cond=%ld",
> + __func__, cur, iterm, volt * 100, (FULL_CV_MIN * cv));
> +
> + return (cur > 0) && (cur <= iterm) &&
> + ((volt * 100) >= (FULL_CV_MIN * cv));

Codingstyle. Just run checkpatch.

Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2014-02-04 13:21    [W:0.137 / U:0.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site