RE: [RFC 1/4] power_supply: Introduce charging object table

2015-03-09 Thread Tc, Jenny
> > On Mon, Mar 09, 2015 at 12:26:21PM +, Tc, Jenny wrote: > > > > + char name[PSY_MAX_BAT_NAME_LEN]; > > > > > > char *name; > > > > > > No need for arbitrary length limitation. > > > > The length limitation is introduced to form a packed structure so that > > the data can be read direc

Re: [RFC 1/4] power_supply: Introduce charging object table

2015-03-09 Thread 'Sebastian Reichel'
Hi, On Mon, Mar 09, 2015 at 12:26:21PM +, Tc, Jenny wrote: > > > + char name[PSY_MAX_BAT_NAME_LEN]; > > > > char *name; > > > > No need for arbitrary length limitation. > > The length limitation is introduced to form a packed structure so that > the data can be read directly from memory wit

RE: [RFC 1/4] power_supply: Introduce charging object table

2015-03-09 Thread Tc, Jenny
Hi, > > +#define PSY_MAX_BAT_NAME_LEN 8 > > +#define PSY_MAX_TEMP_ZONE 6 > > + > > +struct psy_charging_obj { > > This is not just about charging data, but also about the batteries > thermal limits, technology and full capacity, so how about > > struct psy_battery_information { Ok, Agree. > >

Re: [RFC 1/4] power_supply: Introduce charging object table

2015-03-07 Thread Sebastian Reichel
Hi, On Fri, Mar 06, 2015 at 12:12:50PM +0100, Oliver Neukum wrote: > On Fri, 2015-03-06 at 16:03 +0530, Jenny TC wrote: > > +struct psy_temp_mon_table { > > + int temp_max; > > + int temp_min; > > + int charging_current; /* CC */ > > + int charging_voltage; /* CV */ > > In which units? F

Re: [RFC 1/4] power_supply: Introduce charging object table

2015-03-07 Thread Sebastian Reichel
Hi, On Fri, Mar 06, 2015 at 04:03:24PM +0530, Jenny TC wrote: > Charging current (CC) and charging voltage (CV) may vary based on > battery temperature. To support CC and CV for different temperature > zones, defined a charging object which holds the properties related > to battery charging. > >

Re: [RFC 1/4] power_supply: Introduce charging object table

2015-03-06 Thread Oliver Neukum
On Fri, 2015-03-06 at 16:03 +0530, Jenny TC wrote: > Charging current (CC) and charging voltage (CV) may vary based on > battery temperature. To support CC and CV for different temperature > zones, defined a charging object which holds the properties related > to battery charging. > > Signed-off-b

[RFC 1/4] power_supply: Introduce charging object table

2015-03-06 Thread Jenny TC
Charging current (CC) and charging voltage (CV) may vary based on battery temperature. To support CC and CV for different temperature zones, defined a charging object which holds the properties related to battery charging. Signed-off-by: Jenny TC --- include/linux/power_supply.h | 27 +