Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-03-06 Thread Linus Walleij
On Fri, Feb 28, 2014 at 11:07 AM, Jenny Tc jenny...@intel.com wrote: On Thu, Feb 27, 2014 at 09:18:57PM +0100, Linus Walleij wrote: On Tue, Feb 4, 2014 at 6:12 AM, Jenny TC jenny...@intel.com wrote: +static inline bool __is_battery_full + (long volt, long cur, long iterm, unsigned

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-03-06 Thread Jenny Tc
On Fri, Mar 07, 2014 at 11:34:14AM +0800, Linus Walleij wrote: On Fri, Feb 28, 2014 at 11:07 AM, Jenny Tc jenny...@intel.com wrote: On Thu, Feb 27, 2014 at 09:18:57PM +0100, Linus Walleij wrote: On Tue, Feb 4, 2014 at 6:12 AM, Jenny TC jenny...@intel.com wrote: +static inline bool

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-03-03 Thread Pavel Machek
Hi! Just to convey that is_battery_full is a local function and not generic. You can find similar usage in power_supply_core.c (__power_supply_changed_work) and in other drivers. Isn't it advised to have __ prefixes? It is static; everybody sees it is local. __ prefix

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-03-02 Thread Jenny Tc
On Fri, Feb 28, 2014 at 11:08:16AM +0100, Pavel Machek wrote: On Fri 2014-02-28 08:37:27, Jenny Tc wrote: On Thu, Feb 27, 2014 at 09:18:57PM +0100, Linus Walleij wrote: On Tue, Feb 4, 2014 at 6:12 AM, Jenny TC jenny...@intel.com wrote: +static inline bool __is_battery_full +

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-28 Thread Pavel Machek
On Fri 2014-02-28 08:37:27, Jenny Tc wrote: On Thu, Feb 27, 2014 at 09:18:57PM +0100, Linus Walleij wrote: On Tue, Feb 4, 2014 at 6:12 AM, Jenny TC jenny...@intel.com wrote: +static inline bool __is_battery_full + (long volt, long cur, long iterm, unsigned long cv) Overall I

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-27 Thread Linus Walleij
On Wed, Feb 26, 2014 at 3:54 AM, Jenny Tc jenny...@intel.com wrote: The idea is to allow pluggable charging algorithms. Currently we have only one charging algorithm proposed, but can have other charging algorithms (like pulse charging, rule based charging etc.). Based on the platform need,

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-27 Thread Linus Walleij
On Tue, Feb 4, 2014 at 6:12 AM, Jenny TC jenny...@intel.com wrote: +static inline bool __is_battery_full + (long volt, long cur, long iterm, unsigned long cv) Overall I wonder if you've run checkpatch on these patches, but why are you naming this one function with a double __underscore?

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-27 Thread Pavel Machek
On Wed 2014-02-26 08:24:44, Jenny Tc wrote: On Fri, Feb 21, 2014 at 03:45:29PM +0100, Pavel Machek wrote: On Thu 2014-02-20 10:46:55, Jenny Tc wrote: On Tue, Feb 04, 2014 at 12:36:40PM +0100, Pavel Machek wrote: --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -22,6

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-27 Thread Jenny Tc
On Thu, Feb 27, 2014 at 08:47:07PM +0100, Linus Walleij wrote: On Wed, Feb 26, 2014 at 3:54 AM, Jenny Tc jenny...@intel.com wrote: The idea is to allow pluggable charging algorithms. Currently we have only one charging algorithm proposed, but can have other charging algorithms (like

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-27 Thread Jenny Tc
On Thu, Feb 27, 2014 at 09:18:57PM +0100, Linus Walleij wrote: On Tue, Feb 4, 2014 at 6:12 AM, Jenny TC jenny...@intel.com wrote: +static inline bool __is_battery_full + (long volt, long cur, long iterm, unsigned long cv) Overall I wonder if you've run checkpatch on these patches,

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-25 Thread Jenny Tc
On Fri, Feb 21, 2014 at 03:45:29PM +0100, Pavel Machek wrote: On Thu 2014-02-20 10:46:55, Jenny Tc wrote: On Tue, Feb 04, 2014 at 12:36:40PM +0100, Pavel Machek wrote: --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -22,6 +22,19 @@ config POWER_SUPPLY_CHARGER

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-21 Thread Pavel Machek
On Thu 2014-02-20 10:46:55, Jenny Tc wrote: On Tue, Feb 04, 2014 at 12:36:40PM +0100, Pavel Machek wrote: --- 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

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-19 Thread Jenny Tc
On Tue, Feb 04, 2014 at 12:36:40PM +0100, Pavel Machek wrote: --- 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.

[PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-19 Thread Jenny TC
As per Product Safety Engineering (PSE) specification for battery charging, the battery characteristics and thereby the charging rates can vary on different temperature zones. This patch introduces a PSE compliant charging algorithm with maintenance charging support. The algorithm can be selected

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-04 Thread Pavel Machek
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

[PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-02-03 Thread Jenny TC
As per Product Safety Engineering (PSE) specification for battery charging, the battery characteristics and thereby the charging rates can vary on different temperature zones. This patch introduces a PSE compliant charging algorithm with maintenance charging support. The algorithm can be selected

[PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-01-30 Thread Jenny TC
As per Product Safety Engineering (PSE) specification for battery charging, the battery characteristics and thereby the charging rates can vary on different temperature zones. This patch introduces a PSE compliant charging algorithm with maintenance charging support. The algorithm can be selected

Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-01-25 Thread Pavel Machek
Hi! +config POWER_SUPPLY_CHARGING_ALGO_PSE + bool PSE compliant charging algorithm + help + Say Y here to select PSE compliant charging algorithm. As per PSE + standard the battery characteristics and thereby the charging rates It would be good to explain PSE here.

[PATCH 3/4] power_supply: Introduce PSE compliant algorithm

2014-01-22 Thread Jenny TC
As per Product Safety Engineering (PSE) specification for battery charging, the battery characteristics and thereby the charging rates can vary on different temperature zones. This patch introduces a PSE compliant charging algorithm with maintenance charging support. The algorithm can be selected