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-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-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-07 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 ((te

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 chargin

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 wond

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

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

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

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 > > > > > +++ b/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 is_battery_f

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

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_CHARGE

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 d

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 ha

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

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