Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-13 Thread anish singh
On Thu, Sep 13, 2012 at 5:56 PM, Jonathan Cameron wrote: >>> >> Thanks Lars, all of your comments are valid and I will accordingly update. >> I am waiting for some more review comments if there is any and will send >> the updated code. > > Beware of that strategy as I for one am guilty of the old

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-13 Thread Jonathan Cameron
Thanks Lars, all of your comments are valid and I will accordingly update. I am waiting for some more review comments if there is any and will send the updated code. Beware of that strategy as I for one am guilty of the old approach of 'oh look someone else has commented, I'll wait for the ne

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-12 Thread anish singh
On Tue, Sep 11, 2012 at 3:29 PM, Lars-Peter Clausen wrote: > On 09/10/2012 05:40 PM, anish kumar wrote: >> From: anish kumar >> >> This is the cleaned up code after the valuable inputs from >> the Jonathan, Lars and Anton. >> >> I have tried to accomodate all the concerns however please >> let me

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-11 Thread Lars-Peter Clausen
On 09/10/2012 05:40 PM, anish kumar wrote: > From: anish kumar > > This is the cleaned up code after the valuable inputs from > the Jonathan, Lars and Anton. > > I have tried to accomodate all the concerns however please > let me know incase something is missed out. > > Signed-off-by: anish kum

[PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-10 Thread anish kumar
From: anish kumar This is the cleaned up code after the valuable inputs from the Jonathan, Lars and Anton. I have tried to accomodate all the concerns however please let me know incase something is missed out. Signed-off-by: anish kumar --- drivers/power/generic-adc-battery.c | 431 +++

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-09 Thread Jonathan Cameron
On 09/09/2012 10:46 AM, Lars-Peter Clausen wrote: > On 09/09/2012 11:32 AM, anish kumar wrote: >> +channels = iio_channel_get_all(dev_name(&pdev->dev)); > I would give these explicit names and get the two individual channels by > name. I think it will give you cleaner code. >>>

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-09 Thread Lars-Peter Clausen
On 09/09/2012 11:32 AM, anish kumar wrote: > + channels = iio_channel_get_all(dev_name(&pdev->dev)); I would give these explicit names and get the two individual channels by name. I think it will give you cleaner code. >>> Yes, now it will be based on pdata->voltage_channel, >>> pdat

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-09 Thread anish kumar
On Sat, 2012-09-08 at 11:09 +0100, Jonathan Cameron wrote: > On 09/08/2012 08:10 AM, anish kumar wrote: > > Thanks for your time. > > On Fri, 2012-09-07 at 08:52 +0100, Jonathan Cameron wrote: > >> On 02/09/12 16:39, anish kumar wrote: > >>> From: anish kumar > >>> > >>> This patch is to use IIO t

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-08 Thread Jonathan Cameron
On 09/08/2012 08:30 AM, anish kumar wrote: > On Fri, 2012-09-07 at 10:49 +0200, Lars-Peter Clausen wrote: >> On 09/02/2012 05:39 PM, anish kumar wrote: >>> From: anish kumar >>> >>> This patch is to use IIO to write a generic batttery driver. >>> There are some inherent assumptions here: >>> 1.Use

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-08 Thread Jonathan Cameron
On 09/08/2012 08:10 AM, anish kumar wrote: > Thanks for your time. > On Fri, 2012-09-07 at 08:52 +0100, Jonathan Cameron wrote: >> On 02/09/12 16:39, anish kumar wrote: >>> From: anish kumar >>> >>> This patch is to use IIO to write a generic batttery driver. >> battery >>> There are some inherent

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-08 Thread Anton Vorontsov
On Sat, Sep 08, 2012 at 12:40:18PM +0530, anish kumar wrote: [...] > > > Signed-off-by: anish kumar > > So what happened in 1985? > Was hurrying to get an email id :) I so much understand... ;-) Much thanks to Lars-Peter and Jonathan, saved me a lot of time reviewing the driver. Anish, the idea

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-08 Thread anish kumar
On Fri, 2012-09-07 at 10:49 +0200, Lars-Peter Clausen wrote: > On 09/02/2012 05:39 PM, anish kumar wrote: > > From: anish kumar > > > > This patch is to use IIO to write a generic batttery driver. > > There are some inherent assumptions here: > > 1.User is having both main battery and backup batt

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-08 Thread anish kumar
Thanks for your time. On Fri, 2012-09-07 at 08:52 +0100, Jonathan Cameron wrote: > On 02/09/12 16:39, anish kumar wrote: > > From: anish kumar > > > > This patch is to use IIO to write a generic batttery driver. > battery > > There are some inherent assumptions here: > > 1.User is having both main

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-07 Thread Lars-Peter Clausen
On 09/02/2012 05:39 PM, anish kumar wrote: > From: anish kumar > > This patch is to use IIO to write a generic batttery driver. > There are some inherent assumptions here: > 1.User is having both main battery and backup battery. > 2.Both batteries use same channel to get the information. > Hi t

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-07 Thread Jonathan Cameron
On 02/09/12 16:39, anish kumar wrote: From: anish kumar This patch is to use IIO to write a generic batttery driver. battery There are some inherent assumptions here: 1.User is having both main battery and backup battery. Seems rather like that could be easily enough relaxed or configured vi

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-04 Thread anish kumar
On Sun, 2012-09-02 at 14:34 -0700, Anton Vorontsov wrote: > On Sun, Sep 02, 2012 at 09:44:04PM +0530, Sannu K wrote: [...] > > Just Curious what is the use of this module? Is there any user space > > program uses this? When ACPI drivers for battery is available how > > useful will this be? > > Tha

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-02 Thread Anton Vorontsov
On Sun, Sep 02, 2012 at 09:44:04PM +0530, Sannu K wrote: [...] > Just Curious what is the use of this module? Is there any user space > program uses this? When ACPI drivers for battery is available how > useful will this be? That's mostly for embedded devices. They often have batteries directly co

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-02 Thread Sannu K
On Sun, Sep 2, 2012 at 9:09 PM, anish kumar wrote: > From: anish kumar > > This patch is to use IIO to write a generic batttery driver. > There are some inherent assumptions here: > 1.User is having both main battery and backup battery. > 2.Both batteries use same channel to get the information.

[PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-02 Thread anish kumar
From: anish kumar This patch is to use IIO to write a generic batttery driver. There are some inherent assumptions here: 1.User is having both main battery and backup battery. 2.Both batteries use same channel to get the information. Signed-off-by: anish kumar --- drivers/power/Kconfig