Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-23 Thread Lee Jones
> On Fri, Nov 23, 2012 at 12:13:44AM +0530, Rajanikanth H.V wrote: > [...] > > +/* > > + * Note that the batres_vs_temp table must be strictly sorted by falling > > + * temperature values to work. > > + */ > > +struct batres_vs_temp temp_to_batres_tbl_thermistor[] = { > > It must be static. > >

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-23 Thread Lee Jones
On Fri, Nov 23, 2012 at 12:13:44AM +0530, Rajanikanth H.V wrote: [...] +/* + * Note that the batres_vs_temp table must be strictly sorted by falling + * temperature values to work. + */ +struct batres_vs_temp temp_to_batres_tbl_thermistor[] = { It must be static. [..] +struct

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-22 Thread Anton Vorontsov
On Fri, Nov 23, 2012 at 12:13:44AM +0530, Rajanikanth H.V wrote: [...] > +/* > + * Note that the batres_vs_temp table must be strictly sorted by falling > + * temperature values to work. > + */ > +struct batres_vs_temp temp_to_batres_tbl_thermistor[] = { It must be static. [..] > +struct

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-22 Thread Anton Vorontsov
On Fri, Nov 23, 2012 at 12:13:44AM +0530, Rajanikanth H.V wrote: [...] +/* + * Note that the batres_vs_temp table must be strictly sorted by falling + * temperature values to work. + */ +struct batres_vs_temp temp_to_batres_tbl_thermistor[] = { It must be static. [..] +struct

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-15 Thread Rajanikanth HV
On Saturday 10 November 2012 10:23 PM, Francesco Lavra wrote: >>> I don't get the point of declaring the char array and copying the string >>> in it, when you could simply use just the pointer returned by >>> of_get_property(). >> >> I am considering a corner case where in 'battery-type'

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-15 Thread Rajanikanth HV
On Saturday 10 November 2012 10:23 PM, Francesco Lavra wrote: I don't get the point of declaring the char array and copying the string in it, when you could simply use just the pointer returned by of_get_property(). I am considering a corner case where in 'battery-type' property is not

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-10 Thread Francesco Lavra
On 11/07/2012 07:45 PM, Rajanikanth H V wrote: > On Thu, 1 Nov 2012, Francesco Lavra wrote: > [...] >>> +btech = of_get_property(np_bat_supply, >>> +"stericsson,battery-type", NULL); >>> +if (!btech) { >>> +dev_warn(dev, "missing property battery-name/type\n"); >>> +

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-10 Thread Francesco Lavra
On 11/07/2012 07:45 PM, Rajanikanth H V wrote: On Thu, 1 Nov 2012, Francesco Lavra wrote: [...] +btech = of_get_property(np_bat_supply, +stericsson,battery-type, NULL); +if (!btech) { +dev_warn(dev, missing property battery-name/type\n); +strcpy(bat_tech,

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-07 Thread Rajanikanth H V
On Thu, 1 Nov 2012, Francesco Lavra wrote: [...] + btech = of_get_property(np_bat_supply, + "stericsson,battery-type", NULL); + if (!btech) { + dev_warn(dev, "missing property battery-name/type\n"); + strcpy(bat_tech, "UNKNOWN"); + }

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-07 Thread Rajanikanth H V
On Thu, 1 Nov 2012, Francesco Lavra wrote: [...] + btech = of_get_property(np_bat_supply, + stericsson,battery-type, NULL); + if (!btech) { + dev_warn(dev, missing property battery-name/type\n); + strcpy(bat_tech, UNKNOWN); + } else { +

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-01 Thread Francesco Lavra
On 10/31/2012 04:40 PM, Rajanikanth H.V wrote: > From: "Rajanikanth H.V" > > - This patch adds device tree support for fuelgauge driver > - optimize bm devices platform_data usage and of_probe(...) > Note: of_probe() routine for battery managed devices is made > common across all bm drivers.

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-11-01 Thread Francesco Lavra
On 10/31/2012 04:40 PM, Rajanikanth H.V wrote: From: Rajanikanth H.V rajanikanth...@stericsson.com - This patch adds device tree support for fuelgauge driver - optimize bm devices platform_data usage and of_probe(...) Note: of_probe() routine for battery managed devices is made common

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-27 Thread Francesco Lavra
On 10/27/2012 06:00 PM, Rajanikanth HV wrote: > On 27 October 2012 20:37, Francesco Lavra wrote: >> On 10/25/2012 08:30 AM, Rajanikanth H.V wrote: >>> From: "Rajanikanth H.V" >>> + bat_tech = of_get_property(np_bat_supply, >>> + "stericsson,battery-type", NULL); >>> +

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-27 Thread Rajanikanth HV
On 27 October 2012 20:37, Francesco Lavra wrote: > On 10/25/2012 08:30 AM, Rajanikanth H.V wrote: >> From: "Rajanikanth H.V" >> + bat_tech = of_get_property(np_bat_supply, >> + "stericsson,battery-type", NULL); >> + if (!bat_tech) >> + dev_warn(dev,

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-27 Thread Francesco Lavra
On 10/25/2012 08:30 AM, Rajanikanth H.V wrote: > From: "Rajanikanth H.V" > > - This patch adds device tree support for fuelgauge driver > - optimize bm devices platform_data usage and of_probe(...) > Note: of_probe() routine for battery managed devices is made > common across all bm drivers.

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-27 Thread Francesco Lavra
On 10/25/2012 08:30 AM, Rajanikanth H.V wrote: From: Rajanikanth H.V rajanikanth...@stericsson.com - This patch adds device tree support for fuelgauge driver - optimize bm devices platform_data usage and of_probe(...) Note: of_probe() routine for battery managed devices is made common

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-27 Thread Rajanikanth HV
On 27 October 2012 20:37, Francesco Lavra francescolavra...@gmail.com wrote: On 10/25/2012 08:30 AM, Rajanikanth H.V wrote: From: Rajanikanth H.V rajanikanth...@stericsson.com + bat_tech = of_get_property(np_bat_supply, + stericsson,battery-type, NULL); + if

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-27 Thread Francesco Lavra
On 10/27/2012 06:00 PM, Rajanikanth HV wrote: On 27 October 2012 20:37, Francesco Lavra francescolavra...@gmail.com wrote: On 10/25/2012 08:30 AM, Rajanikanth H.V wrote: From: Rajanikanth H.V rajanikanth...@stericsson.com + bat_tech = of_get_property(np_bat_supply, +

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-06 Thread Francesco Lavra
Hi, On 10/01/2012 06:08 AM, Rajanikanth H.V wrote: > From: "Rajanikanth H.V" > > - This patch adds device tree support for fuelguage driver > - optimize bm devices platform_data usage and of_probe(...) > Note: of_probe() routine for battery managed devices is made > common across all bm

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-06 Thread Francesco Lavra
Hi, On 10/01/2012 06:08 AM, Rajanikanth H.V wrote: From: Rajanikanth H.V rajanikanth...@stericsson.com - This patch adds device tree support for fuelguage driver - optimize bm devices platform_data usage and of_probe(...) Note: of_probe() routine for battery managed devices is made

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-01 Thread Lee Jones
> did you have a look at arnd and anton comments regarding > 'supplied-to' and boolean property Try to keep your comments inline, situated below the relevant comment. > >> + ab8500_battery_info: ab8500_bat_type { > >> + battery-type = <2>; > >> + thermistor-on-batctrl

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-01 Thread Lee Jones
Sorry, some mistakes: > > From: "Rajanikanth H.V" > > > > - This patch adds device tree support for fuelguage driver > > - optimize bm devices platform_data usage and of_probe(...) > > Note: of_probe() routine for battery managed devices is made > > common across all bm drivers. Spelling

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-01 Thread Rajanikanth HV
did you have a look at arnd and anton comments regarding 'supplied-to' and boolean property On Monday 01 October 2012 03:19 PM, Lee Jones wrote: > On Mon, 01 Oct 2012, Rajanikanth H.V wrote: > >> From: "Rajanikanth H.V" >> >> - This patch adds device tree support for fuelguage driver >> -

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-01 Thread Lee Jones
On Mon, 01 Oct 2012, Rajanikanth H.V wrote: > From: "Rajanikanth H.V" > > - This patch adds device tree support for fuelguage driver > - optimize bm devices platform_data usage and of_probe(...) > Note: of_probe() routine for battery managed devices is made > common across all bm drivers. >

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-01 Thread Lee Jones
On Mon, 01 Oct 2012, Rajanikanth H.V wrote: From: Rajanikanth H.V rajanikanth...@stericsson.com - This patch adds device tree support for fuelguage driver - optimize bm devices platform_data usage and of_probe(...) Note: of_probe() routine for battery managed devices is made common

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-01 Thread Rajanikanth HV
did you have a look at arnd and anton comments regarding 'supplied-to' and boolean property On Monday 01 October 2012 03:19 PM, Lee Jones wrote: On Mon, 01 Oct 2012, Rajanikanth H.V wrote: From: Rajanikanth H.V rajanikanth...@stericsson.com - This patch adds device tree support for

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-01 Thread Lee Jones
Sorry, some mistakes: From: Rajanikanth H.V rajanikanth...@stericsson.com - This patch adds device tree support for fuelguage driver - optimize bm devices platform_data usage and of_probe(...) Note: of_probe() routine for battery managed devices is made common across all bm

Re: [PATCH 1/4] mfd: ab8500: add devicetree support for fuelgauge

2012-10-01 Thread Lee Jones
did you have a look at arnd and anton comments regarding 'supplied-to' and boolean property Try to keep your comments inline, situated below the relevant comment. + ab8500_battery_info: ab8500_bat_type { + battery-type = 2; + thermistor-on-batctrl = 1; You