Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-07-18 Thread Pavel Machek
Hi! > > I suggest to add features supported by charger-manager to power supply > > charging > > driver and convert users of charger-manager to the improved driver. > > > > I CC'd MyungJoo Ham, who wrote the charger-manager, so that he can also give > > feedback. > > We are back to the initial d

Re: RE: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-07-17 Thread MyungJoo Ham
hen; Pallala, Ramakrishna; > > myungjoo....@samsung.com > > Subject: Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver > > > > Hi Jenny, > > > > On Tue, Jul 08, 2014 at 11:34:19AM +0530, Jenny TC wrote: > > > The Power Supply cha

RE: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-07-17 Thread Tc, Jenny
.com > Subject: Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver > > Hi Jenny, > > On Tue, Jul 08, 2014 at 11:34:19AM +0530, Jenny TC wrote: > > The Power Supply charging driver connects multiple subsystems to do > > charging in a generic way. The subs

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-07-17 Thread Sebastian Reichel
Hi Jenny, On Tue, Jul 08, 2014 at 11:34:19AM +0530, Jenny TC wrote: > The Power Supply charging driver connects multiple subsystems > to do charging in a generic way. The subsystems involves power_supply, > thermal and battery communication subsystems (1wire). With this the charging > is > handle

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-07-14 Thread Pavel Machek
Hi! > The Power Supply charging driver connects multiple subsystems > to do charging in a generic way. The subsystems involves power_supply, > thermal and battery communication subsystems (1wire). With this the charging > is > handled in a generic way. > > The driver makes use of different new f

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-03-14 Thread Mark Brown
On Fri, Mar 14, 2014 at 11:36:40AM +0100, Linus Walleij wrote: > On Thu, Mar 13, 2014 at 10:12 AM, Pavel Machek wrote: > > But... what would actually help: I believe we should introduce > > milivolt_t, miliamp_t, milisec_t etc... types. Storing milivolts in > > int, then having comment saying "mi

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-03-14 Thread Linus Walleij
On Thu, Mar 13, 2014 at 10:12 AM, Pavel Machek wrote: > Hi! > >> > 30*HZ means 30 seconds in the kernel... what is hard to understand >> > about it? >> >> Well I might be picky, but since it is a charging algorithm dealing with >> ampères, volts, constant-current/constant-voltage, watchdogs and >>

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-03-13 Thread Pavel Machek
Hi! > > 30*HZ means 30 seconds in the kernel... what is hard to understand > > about it? > > Well I might be picky, but since it is a charging algorithm dealing with > ampères, volts, constant-current/constant-voltage, watchdogs and > timeouts, all stated in SI units, it would be nice if all such

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-03-12 Thread Linus Walleij
On Fri, Mar 7, 2014 at 9:10 PM, Pavel Machek wrote: > On Fri 2014-03-07 11:04:59, Linus Walleij wrote: >> On Fri, Feb 28, 2014 at 6:01 PM, Pavel Machek wrote: >> > On Thu 2014-02-27 21:08:01, Linus Walleij wrote: >> >> On Thu, Feb 20, 2014 at 6:53 AM, Jenny TC wrote: >> >> >> >> > +++ b/include/

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-03-07 Thread Pavel Machek
Hi! > >> > +++ b/include/linux/power/power_supply_charger.h > >> > >> > +#define MAX_CUR_VOLT_SAMPLES 3 > >> > +#define DEF_CUR_VOLT_SAMPLE_JIFF (30*HZ) > >> > >> Why are things defined in Jiffies like this insead of seconds, milliseconds > >> etc? This will vary with the current operating frequen

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-03-07 Thread Pavel Machek
On Fri 2014-03-07 11:04:59, Linus Walleij wrote: > On Fri, Feb 28, 2014 at 6:01 PM, Pavel Machek wrote: > > On Thu 2014-02-27 21:08:01, Linus Walleij wrote: > >> On Thu, Feb 20, 2014 at 6:53 AM, Jenny TC wrote: > >> > >> > +++ b/include/linux/power/power_supply_charger.h > >> > >> > +#define MAX_

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-03-06 Thread Jenny Tc
On Fri, Mar 07, 2014 at 11:03:02AM +0800, Linus Walleij wrote: > On Fri, Feb 28, 2014 at 12:27 PM, Jenny Tc wrote: > > On Thu, Feb 27, 2014 at 09:08:01PM +0100, Linus Walleij wrote: > >> On Thu, Feb 20, 2014 at 6:53 AM, Jenny TC wrote: > >> > >> > +++ b/include/linux/power/power_supply_charger.h

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-03-06 Thread Linus Walleij
On Fri, Feb 28, 2014 at 6:01 PM, Pavel Machek wrote: > On Thu 2014-02-27 21:08:01, Linus Walleij wrote: >> On Thu, Feb 20, 2014 at 6:53 AM, Jenny TC wrote: >> >> > +++ b/include/linux/power/power_supply_charger.h >> >> > +#define MAX_CUR_VOLT_SAMPLES 3 >> > +#define DEF_CUR_VOLT_SAMPLE_JIFF (30*H

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-03-06 Thread Linus Walleij
On Fri, Feb 28, 2014 at 12:27 PM, Jenny Tc wrote: > On Thu, Feb 27, 2014 at 09:08:01PM +0100, Linus Walleij wrote: >> On Thu, Feb 20, 2014 at 6:53 AM, Jenny TC wrote: >> >> > +++ b/include/linux/power/power_supply_charger.h >> >> > +#define MAX_CUR_VOLT_SAMPLES 3 >> > +#define DEF_CUR_VOLT_SAMPLE

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-02-28 Thread Pavel Machek
On Thu 2014-02-27 21:08:01, Linus Walleij wrote: > On Thu, Feb 20, 2014 at 6:53 AM, Jenny TC wrote: > > > +++ b/include/linux/power/power_supply_charger.h > > > +#define MAX_CUR_VOLT_SAMPLES 3 > > +#define DEF_CUR_VOLT_SAMPLE_JIFF (30*HZ) > > Why are things defined in Jiffies like this insead o

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-02-27 Thread Jenny Tc
On Thu, Feb 27, 2014 at 09:08:01PM +0100, Linus Walleij wrote: > On Thu, Feb 20, 2014 at 6:53 AM, Jenny TC wrote: > > > +++ b/include/linux/power/power_supply_charger.h > > > +#define MAX_CUR_VOLT_SAMPLES 3 > > +#define DEF_CUR_VOLT_SAMPLE_JIFF (30*HZ) > > Why are things defined in Jiffies like

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-02-27 Thread Linus Walleij
On Thu, Feb 20, 2014 at 6:53 AM, Jenny TC wrote: > +++ b/include/linux/power/power_supply_charger.h > +#define MAX_CUR_VOLT_SAMPLES 3 > +#define DEF_CUR_VOLT_SAMPLE_JIFF (30*HZ) Why are things defined in Jiffies like this insead of seconds, milliseconds etc? This will vary with the current oper

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-02-12 Thread Jingoo Han
On Wednesday, February 12, 2014 8:00 PM, Pavel Machek wrote: > On Wed 2014-02-05 13:44:58, Jenny Tc wrote: > > On Tue, Feb 04, 2014 at 12:36:30PM +0100, Pavel Machek wrote: > > > > +struct psy_charger_context { > > > > + bool is_usb_cable_evt_reg; > > > > + int psyc_cnt; > > > > +

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-02-12 Thread Pavel Machek
On Wed 2014-02-05 13:44:58, Jenny Tc wrote: > On Tue, Feb 04, 2014 at 12:36:30PM +0100, Pavel Machek wrote: > > > +struct psy_charger_context { > > > + bool is_usb_cable_evt_reg; > > > + int psyc_cnt; > > > + int batt_status; > > > + /*cache battery and charger properties */ > > > > Comment coding

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-02-05 Thread Jenny Tc
On Tue, Feb 04, 2014 at 12:36:30PM +0100, Pavel Machek wrote: > > +struct psy_charger_context { > > + bool is_usb_cable_evt_reg; > > + int psyc_cnt; > > + int batt_status; > > + /*cache battery and charger properties */ > > Comment coding style. Please run you patches through checkpatch.

Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

2014-02-04 Thread Pavel Machek
Hi! > +Throttling configuration example: > + > +struct psy_throttle_state my_throttle_states[] = { > + > + /* Level 0: Limit charge current to 1500mA. Normal Level */ > + { > + .throttle_action = PSY_THROTTLE_CC_LIMIT, > + .throttle_val = 1500, > + }, > + > +