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: <20140204113640.GD2450@amd.pavel.ucw.cz>
Date:	Tue, 4 Feb 2014 12:36:40 +0100
From:	Pavel Machek <pavel@....cz>
To:	Jenny TC <jenny.tc@...el.com>
Cc:	linux-kernel@...r.kernel.org,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	Anton Vorontsov <cbouatmailru@...il.com>,
	Anton Vorontsov <anton.vorontsov@...aro.org>,
	Kim Milo <Milo.Kim@...com>, Lee Jones <lee.jones@...aro.org>,
	Jingoo Han <jg1.han@...sung.com>,
	Chanwoo Choi <cw00.choi@...sung.com>,
	Sachin Kamat <sachin.kamat@...aro.org>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Pali Rohár <pali.rohar@...il.com>,
	Rhyland Klein <rklein@...dia.com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	David Woodhouse <dwmw2@...radead.org>,
	Tony Lindgren <tony@...mide.com>,
	Russell King <linux@....linux.org.uk>,
	Sebastian Reichel <sre@...g0.de>, aaro.koskinen@....fi,
	Pallala Ramakrishna <ramakrishna.pallala@...el.com>,
	freemangordon@....bg, linux-omap@...r.kernel.org
Subject: Re: [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
--
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