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

2014-07-17 Thread Sebastian Reichel
gt; Rothwell; Anton Vorontsov; David Woodhouse; David Cohen; Pallala, > > Ramakrishna > > Subject: Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm > > > > On Tue, Jul 08, 2014 at 06:07:29AM +, Tc, Jenny wrote: > > > > > +static int get_te

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

2014-07-17 Thread Sebastian Reichel
; David Cohen; Pallala, Ramakrishna Subject: Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm On Tue, Jul 08, 2014 at 06:07:29AM +, Tc, Jenny wrote: +static int get_tempzone(struct psy_pse_chrg_prof *pse_mod_bprof, + int temp) +{ + int i

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

2014-07-10 Thread Tc, Jenny
bject: Re: [PATCH 3/4] power_supply: Introduce PSE compliant algorithm > > On Tue, Jul 08, 2014 at 06:07:29AM +, Tc, Jenny wrote: > > > > +static int get_tempzone(struct psy_pse_chrg_prof *pse_mod_bprof, > > > > + int temp) > > > > +

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

2014-07-10 Thread Tc, Jenny
] power_supply: Introduce PSE compliant algorithm On Tue, Jul 08, 2014 at 06:07:29AM +, Tc, Jenny wrote: +static int get_tempzone(struct psy_pse_chrg_prof *pse_mod_bprof, + int temp) +{ + int i = 0; + int temp_range_cnt; + + temp_range_cnt

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

2014-07-08 Thread Sebastian Reichel
On Tue, Jul 08, 2014 at 06:07:29AM +, Tc, Jenny wrote: > > > +static int get_tempzone(struct psy_pse_chrg_prof *pse_mod_bprof, > > > + int temp) > > > +{ > > > + int i = 0; > > > + int temp_range_cnt; > > > + > > > + temp_range_cnt = min_t(u16, pse_mod_bprof->temp_mon_ranges, > > > +

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

2014-07-08 Thread Tc, Jenny
> > +static int get_tempzone(struct psy_pse_chrg_prof *pse_mod_bprof, > > + int temp) > > +{ > > + int i = 0; > > + int temp_range_cnt; > > + > > + temp_range_cnt = min_t(u16, pse_mod_bprof->temp_mon_ranges, > > + BATT_TEMP_NR_RNG); > > + if

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

2014-07-08 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-07-08 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-07-08 Thread Tc, Jenny
+static int get_tempzone(struct psy_pse_chrg_prof *pse_mod_bprof, + int temp) +{ + int i = 0; + int temp_range_cnt; + + temp_range_cnt = min_t(u16, pse_mod_bprof-temp_mon_ranges, + BATT_TEMP_NR_RNG); + if ((temp

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

2014-07-08 Thread Sebastian Reichel
On Tue, Jul 08, 2014 at 06:07:29AM +, Tc, Jenny wrote: +static int get_tempzone(struct psy_pse_chrg_prof *pse_mod_bprof, + int temp) +{ + int i = 0; + int temp_range_cnt; + + temp_range_cnt = min_t(u16, pse_mod_bprof-temp_mon_ranges, +

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

2014-07-03 Thread Sebastian Reichel
Hi Jenny, On Mon, Jun 30, 2014 at 03:25:54PM +0530, Jenny TC wrote: > 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

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

2014-07-03 Thread Sebastian Reichel
Hi Jenny, On Mon, Jun 30, 2014 at 03:25:54PM +0530, Jenny TC wrote: 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

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

2014-06-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

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

2014-06-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

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

2014-06-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

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

2014-06-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-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 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 wrote: > >> > >> > +static inline bool __is_battery_full > >> > +

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 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 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-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

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 wrote: > > > > > > > +static inline bool __is_battery_full > > > > +

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 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-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 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 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 >

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 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 > >

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 > > > > > +++

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 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? Just

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 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, the >

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

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

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

[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-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

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 > +

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-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

[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

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

[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