All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
@ 2013-02-15 22:56 Pali Rohár
  2013-02-15 22:56 ` [PATCH 2/2] power: rx51_battery: Fix reporting correct values Pali Rohár
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Pali Rohár @ 2013-02-15 22:56 UTC (permalink / raw)
  To: Samuel Ortiz, Anton Vorontsov; +Cc: linux-kernel, Pali Rohár

Driver twl4030-madc has hardcoded channel types (10 - battery current,
1 - battery temperature) and also conversation data in variable
twl4030_divider_ratios. These hardcoded channels are incorrect for
Nokia RX-51 board (where is channel 0 - battery temperature).

For Nokia RX-51 there is rx51_battery power_supply driver which reporting
battery information via twl4030_madc_conversion. But this driver needs
raw values (not converted via some hardcoded functions). So this patch
adding new parameter "raw" to struct twl4030_madc_request which tell
twl4030-madc driver to not convert values, but rather return raw.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
 drivers/mfd/twl4030-madc.c       |   14 ++++++++++----
 include/linux/i2c/twl4030-madc.h |    2 ++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c
index 88ff9dc..79d5d57 100644
--- a/drivers/mfd/twl4030-madc.c
+++ b/drivers/mfd/twl4030-madc.c
@@ -211,12 +211,14 @@ static int twl4030battery_current(int raw_volt)
  * @reg_base - Base address of the first channel
  * @Channels - 16 bit bitmap. If the bit is set, channel value is read
  * @buf - The channel values are stored here. if read fails error
+ * @raw - Return raw values without conversion
  * value is stored
  * Returns the number of successfully read channels.
  */
 static int twl4030_madc_read_channels(struct twl4030_madc_data *madc,
 				      u8 reg_base, unsigned
-						long channels, int *buf)
+				      long channels, int *buf,
+				      bool raw)
 {
 	int count = 0, count_req = 0, i;
 	u8 reg;
@@ -230,6 +232,10 @@ static int twl4030_madc_read_channels(struct twl4030_madc_data *madc,
 			count_req++;
 			continue;
 		}
+		if (raw) {
+			count++;
+			continue;
+		}
 		switch (i) {
 		case 10:
 			buf[i] = twl4030battery_current(buf[i]);
@@ -371,7 +377,7 @@ static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)
 		method = &twl4030_conversion_methods[r->method];
 		/* Read results */
 		len = twl4030_madc_read_channels(madc, method->rbase,
-						 r->channels, r->rbuf);
+						 r->channels, r->rbuf, r->raw);
 		/* Return results to caller */
 		if (r->func_cb != NULL) {
 			r->func_cb(len, r->channels, r->rbuf);
@@ -397,7 +403,7 @@ err_i2c:
 		method = &twl4030_conversion_methods[r->method];
 		/* Read results */
 		len = twl4030_madc_read_channels(madc, method->rbase,
-						 r->channels, r->rbuf);
+						 r->channels, r->rbuf, r->raw);
 		/* Return results to caller */
 		if (r->func_cb != NULL) {
 			r->func_cb(len, r->channels, r->rbuf);
@@ -585,7 +591,7 @@ int twl4030_madc_conversion(struct twl4030_madc_request *req)
 		goto out;
 	}
 	ret = twl4030_madc_read_channels(twl4030_madc, method->rbase,
-					 req->channels, req->rbuf);
+					 req->channels, req->rbuf, req->raw);
 	twl4030_madc->requests[req->method].active = 0;
 
 out:
diff --git a/include/linux/i2c/twl4030-madc.h b/include/linux/i2c/twl4030-madc.h
index 530e11b..01f5951 100644
--- a/include/linux/i2c/twl4030-madc.h
+++ b/include/linux/i2c/twl4030-madc.h
@@ -39,6 +39,7 @@ struct twl4030_madc_conversion_method {
  * @do_avgP:	sample the input channel for 4 consecutive cycles
  * @method:	RT, SW1, SW2
  * @type:	Polling or interrupt based method
+ * @raw:	Return raw value, do not convert it
  */
 
 struct twl4030_madc_request {
@@ -48,6 +49,7 @@ struct twl4030_madc_request {
 	u16 type;
 	bool active;
 	bool result_pending;
+	bool raw;
 	int rbuf[TWL4030_MADC_MAX_CHANNELS];
 	void (*func_cb)(int len, int channels, int *buf);
 };
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/2] power: rx51_battery: Fix reporting correct values
  2013-02-15 22:56 [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion Pali Rohár
@ 2013-02-15 22:56 ` Pali Rohár
  2013-02-16 21:39   ` Anton Vorontsov
  2013-03-02 22:23 ` [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion Pali Rohár
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Pali Rohár @ 2013-02-15 22:56 UTC (permalink / raw)
  To: Samuel Ortiz, Anton Vorontsov; +Cc: linux-kernel, Pali Rohár

Tell twl4030_madc_conversion that this driver needs raw values.
Driver twl4030_madc has some hardcoded values and conversation
functions which are incorrect for Nokia RX-51 board. This driver
rx51_battery expects raw values which convert itself.

This patch fixing values reported by power supply interface.
Before this patch driver reported always incorrect values on
3.8 kernel (sometimes design capacity was negative).

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
 drivers/power/rx51_battery.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/rx51_battery.c b/drivers/power/rx51_battery.c
index 527d256..d1e17b0 100644
--- a/drivers/power/rx51_battery.c
+++ b/drivers/power/rx51_battery.c
@@ -42,6 +42,7 @@ static int rx51_battery_read_adc(int channel)
 	req.method = TWL4030_MADC_SW1;
 	req.func_cb = NULL;
 	req.type = TWL4030_MADC_WAIT;
+	req.raw = true;
 
 	if (twl4030_madc_conversion(&req) <= 0)
 		return -ENODATA;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] power: rx51_battery: Fix reporting correct values
  2013-02-15 22:56 ` [PATCH 2/2] power: rx51_battery: Fix reporting correct values Pali Rohár
@ 2013-02-16 21:39   ` Anton Vorontsov
  0 siblings, 0 replies; 13+ messages in thread
From: Anton Vorontsov @ 2013-02-16 21:39 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Samuel Ortiz, linux-kernel

On Fri, Feb 15, 2013 at 11:56:50PM +0100, Pali Rohár wrote:
> Tell twl4030_madc_conversion that this driver needs raw values.
> Driver twl4030_madc has some hardcoded values and conversation
> functions which are incorrect for Nokia RX-51 board. This driver
> rx51_battery expects raw values which convert itself.
> 
> This patch fixing values reported by power supply interface.
> Before this patch driver reported always incorrect values on
> 3.8 kernel (sometimes design capacity was negative).
> 
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>

Assuming you want to pass the series via MFD tree,

Acked-by: Anton Vorontsov <anton@enomsg.org>

Thanks!

> ---
>  drivers/power/rx51_battery.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/power/rx51_battery.c b/drivers/power/rx51_battery.c
> index 527d256..d1e17b0 100644
> --- a/drivers/power/rx51_battery.c
> +++ b/drivers/power/rx51_battery.c
> @@ -42,6 +42,7 @@ static int rx51_battery_read_adc(int channel)
>  	req.method = TWL4030_MADC_SW1;
>  	req.func_cb = NULL;
>  	req.type = TWL4030_MADC_WAIT;
> +	req.raw = true;
>  
>  	if (twl4030_madc_conversion(&req) <= 0)
>  		return -ENODATA;
> -- 
> 1.7.10.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
  2013-02-15 22:56 [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion Pali Rohár
  2013-02-15 22:56 ` [PATCH 2/2] power: rx51_battery: Fix reporting correct values Pali Rohár
@ 2013-03-02 22:23 ` Pali Rohár
  2013-03-24 14:03   ` Pali Rohár
  2013-04-04  9:38   ` Samuel Ortiz
  2013-03-02 23:16 ` Anton Vorontsov
  2013-04-08 14:34 ` Samuel Ortiz
  3 siblings, 2 replies; 13+ messages in thread
From: Pali Rohár @ 2013-03-02 22:23 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: Anton Vorontsov, linux-kernel, Keerthy, Kyle Manna

[-- Attachment #1: Type: Text/Plain, Size: 1036 bytes --]

On Friday 15 February 2013 23:56:49 Pali Rohár wrote:
> Driver twl4030-madc has hardcoded channel types (10 - battery
> current, 1 - battery temperature) and also conversation data
> in variable twl4030_divider_ratios. These hardcoded channels
> are incorrect for Nokia RX-51 board (where is channel 0 -
> battery temperature).
> 
> For Nokia RX-51 there is rx51_battery power_supply driver
> which reporting battery information via
> twl4030_madc_conversion. But this driver needs raw values
> (not converted via some hardcoded functions). So this patch
> adding new parameter "raw" to struct twl4030_madc_request
> which tell twl4030-madc driver to not convert values, but
> rather return raw.
> 
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> ---
>  drivers/mfd/twl4030-madc.c       |   14 ++++++++++----
>  include/linux/i2c/twl4030-madc.h |    2 ++
>  2 files changed, 12 insertions(+), 4 deletions(-)
> 

Hello, can somebody review this twl4030-madc patch?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
  2013-02-15 22:56 [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion Pali Rohár
  2013-02-15 22:56 ` [PATCH 2/2] power: rx51_battery: Fix reporting correct values Pali Rohár
  2013-03-02 22:23 ` [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion Pali Rohár
@ 2013-03-02 23:16 ` Anton Vorontsov
  2013-04-08 14:34 ` Samuel Ortiz
  3 siblings, 0 replies; 13+ messages in thread
From: Anton Vorontsov @ 2013-03-02 23:16 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Samuel Ortiz, linux-kernel

On Fri, Feb 15, 2013 at 11:56:49PM +0100, Pali Rohár wrote:
> Driver twl4030-madc has hardcoded channel types (10 - battery current,
> 1 - battery temperature) and also conversation data in variable
> twl4030_divider_ratios. These hardcoded channels are incorrect for
> Nokia RX-51 board (where is channel 0 - battery temperature).
> 
> For Nokia RX-51 there is rx51_battery power_supply driver which reporting
> battery information via twl4030_madc_conversion. But this driver needs
> raw values (not converted via some hardcoded functions). So this patch
> adding new parameter "raw" to struct twl4030_madc_request which tell
> twl4030-madc driver to not convert values, but rather return raw.
> 
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>

It looks good to me; glancing around, I don't see any better way to do it.
So,

Reviewed-by: Anton Vorontsov <anton@enomsg.org>

Thanks!

Anton

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
  2013-03-02 22:23 ` [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion Pali Rohár
@ 2013-03-24 14:03   ` Pali Rohár
  2013-04-04  9:32     ` Pali Rohár
  2013-04-04  9:38   ` Samuel Ortiz
  1 sibling, 1 reply; 13+ messages in thread
From: Pali Rohár @ 2013-03-24 14:03 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: Anton Vorontsov, linux-kernel, Keerthy, Kyle Manna

[-- Attachment #1: Type: Text/Plain, Size: 1277 bytes --]

On Saturday 02 March 2013 23:23:05 Pali Rohár wrote:
> On Friday 15 February 2013 23:56:49 Pali Rohár wrote:
> > Driver twl4030-madc has hardcoded channel types (10 -
> > battery current, 1 - battery temperature) and also
> > conversation data in variable twl4030_divider_ratios. These
> > hardcoded channels are incorrect for Nokia RX-51 board
> > (where is channel 0 - battery temperature).
> > 
> > For Nokia RX-51 there is rx51_battery power_supply driver
> > which reporting battery information via
> > twl4030_madc_conversion. But this driver needs raw values
> > (not converted via some hardcoded functions). So this patch
> > adding new parameter "raw" to struct twl4030_madc_request
> > which tell twl4030-madc driver to not convert values, but
> > rather return raw.
> > 
> > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > ---
> > 
> >  drivers/mfd/twl4030-madc.c       |   14 ++++++++++----
> >  include/linux/i2c/twl4030-madc.h |    2 ++
> >  2 files changed, 12 insertions(+), 4 deletions(-)
> 
> Hello, can somebody review this twl4030-madc patch?

Bump.

Can some of mfd maintainers look at this patch and include it to 
mfd tree? It is needed for rx51_battery power supply driver.

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
  2013-03-24 14:03   ` Pali Rohár
@ 2013-04-04  9:32     ` Pali Rohár
  2013-04-08 18:15       ` Tony Lindgren
  0 siblings, 1 reply; 13+ messages in thread
From: Pali Rohár @ 2013-04-04  9:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Samuel Ortiz, Anton Vorontsov, Keerthy, Kyle Manna,
	Tony Lindgren, linux-omap

[-- Attachment #1: Type: Text/Plain, Size: 1433 bytes --]

On Sunday 24 March 2013 15:03:29 Pali Rohár wrote:
> On Saturday 02 March 2013 23:23:05 Pali Rohár wrote:
> > On Friday 15 February 2013 23:56:49 Pali Rohár wrote:
> > > Driver twl4030-madc has hardcoded channel types (10 -
> > > battery current, 1 - battery temperature) and also
> > > conversation data in variable twl4030_divider_ratios.
> > > These hardcoded channels are incorrect for Nokia RX-51
> > > board (where is channel 0 - battery temperature).
> > > 
> > > For Nokia RX-51 there is rx51_battery power_supply driver
> > > which reporting battery information via
> > > twl4030_madc_conversion. But this driver needs raw values
> > > (not converted via some hardcoded functions). So this
> > > patch adding new parameter "raw" to struct
> > > twl4030_madc_request which tell twl4030-madc driver to
> > > not convert values, but rather return raw.
> > > 
> > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > > ---
> > > 
> > >  drivers/mfd/twl4030-madc.c       |   14 ++++++++++----
> > >  include/linux/i2c/twl4030-madc.h |    2 ++
> > >  2 files changed, 12 insertions(+), 4 deletions(-)
> > 
> > Hello, can somebody review this twl4030-madc patch?
> 
> Bump.
> 
> Can some of mfd maintainers look at this patch and include it
> to mfd tree? It is needed for rx51_battery power supply
> driver.

CCing Tony, can you look at this patch?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
  2013-03-02 22:23 ` [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion Pali Rohár
  2013-03-24 14:03   ` Pali Rohár
@ 2013-04-04  9:38   ` Samuel Ortiz
  2013-04-08 10:43     ` Pali Rohár
  1 sibling, 1 reply; 13+ messages in thread
From: Samuel Ortiz @ 2013-04-04  9:38 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Anton Vorontsov, linux-kernel, Keerthy, Kyle Manna

Hi Pali,

On Sat, Mar 02, 2013 at 11:23:05PM +0100, Pali Rohár wrote:
> On Friday 15 February 2013 23:56:49 Pali Rohár wrote:
> > Driver twl4030-madc has hardcoded channel types (10 - battery
> > current, 1 - battery temperature) and also conversation data
> > in variable twl4030_divider_ratios. These hardcoded channels
> > are incorrect for Nokia RX-51 board (where is channel 0 -
> > battery temperature).
> > 
> > For Nokia RX-51 there is rx51_battery power_supply driver
> > which reporting battery information via
> > twl4030_madc_conversion. But this driver needs raw values
> > (not converted via some hardcoded functions). So this patch
> > adding new parameter "raw" to struct twl4030_madc_request
> > which tell twl4030-madc driver to not convert values, but
> > rather return raw.
> > 
> > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > ---
> >  drivers/mfd/twl4030-madc.c       |   14 ++++++++++----
> >  include/linux/i2c/twl4030-madc.h |    2 ++
> >  2 files changed, 12 insertions(+), 4 deletions(-)
> > 
> 
> Hello, can somebody review this twl4030-madc patch?
I'll look at all my pending MFD patches starting from tomorrow.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
  2013-04-04  9:38   ` Samuel Ortiz
@ 2013-04-08 10:43     ` Pali Rohár
  0 siblings, 0 replies; 13+ messages in thread
From: Pali Rohár @ 2013-04-08 10:43 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: Anton Vorontsov, linux-kernel, Keerthy, Kyle Manna

[-- Attachment #1: Type: Text/Plain, Size: 1406 bytes --]

On Thursday 04 April 2013 11:38:47 Samuel Ortiz wrote:
> Hi Pali,
> 
> On Sat, Mar 02, 2013 at 11:23:05PM +0100, Pali Rohár wrote:
> > On Friday 15 February 2013 23:56:49 Pali Rohár wrote:
> > > Driver twl4030-madc has hardcoded channel types (10 -
> > > battery current, 1 - battery temperature) and also
> > > conversation data in variable twl4030_divider_ratios.
> > > These hardcoded channels are incorrect for Nokia RX-51
> > > board (where is channel 0 - battery temperature).
> > > 
> > > For Nokia RX-51 there is rx51_battery power_supply driver
> > > which reporting battery information via
> > > twl4030_madc_conversion. But this driver needs raw values
> > > (not converted via some hardcoded functions). So this
> > > patch adding new parameter "raw" to struct
> > > twl4030_madc_request which tell twl4030-madc driver to
> > > not convert values, but rather return raw.
> > > 
> > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > > ---
> > > 
> > >  drivers/mfd/twl4030-madc.c       |   14 ++++++++++----
> > >  include/linux/i2c/twl4030-madc.h |    2 ++
> > >  2 files changed, 12 insertions(+), 4 deletions(-)
> > 
> > Hello, can somebody review this twl4030-madc patch?
> 
> I'll look at all my pending MFD patches starting from
> tomorrow.
> 
> Cheers,
> Samuel.

Hi Samuel, did you look at this patch?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
  2013-02-15 22:56 [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion Pali Rohár
                   ` (2 preceding siblings ...)
  2013-03-02 23:16 ` Anton Vorontsov
@ 2013-04-08 14:34 ` Samuel Ortiz
  3 siblings, 0 replies; 13+ messages in thread
From: Samuel Ortiz @ 2013-04-08 14:34 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Anton Vorontsov, linux-kernel

Hi Pali,

On Fri, Feb 15, 2013 at 11:56:49PM +0100, Pali Rohár wrote:
> Driver twl4030-madc has hardcoded channel types (10 - battery current,
> 1 - battery temperature) and also conversation data in variable
> twl4030_divider_ratios. These hardcoded channels are incorrect for
> Nokia RX-51 board (where is channel 0 - battery temperature).
> 
> For Nokia RX-51 there is rx51_battery power_supply driver which reporting
> battery information via twl4030_madc_conversion. But this driver needs
> raw values (not converted via some hardcoded functions). So this patch
> adding new parameter "raw" to struct twl4030_madc_request which tell
> twl4030-madc driver to not convert values, but rather return raw.
> 
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> ---
>  drivers/mfd/twl4030-madc.c       |   14 ++++++++++----
>  include/linux/i2c/twl4030-madc.h |    2 ++
>  2 files changed, 12 insertions(+), 4 deletions(-)
I appled this patch and the power one to my mfd-next tree.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
  2013-04-04  9:32     ` Pali Rohár
@ 2013-04-08 18:15       ` Tony Lindgren
  2013-04-10 14:12         ` Pali Rohár
  0 siblings, 1 reply; 13+ messages in thread
From: Tony Lindgren @ 2013-04-08 18:15 UTC (permalink / raw)
  To: Pali Rohár
  Cc: linux-kernel, Samuel Ortiz, Anton Vorontsov, Keerthy, Kyle Manna,
	linux-omap

* Pali Rohár <pali.rohar@gmail.com> [130404 02:37]:
> On Sunday 24 March 2013 15:03:29 Pali Rohár wrote:
> > On Saturday 02 March 2013 23:23:05 Pali Rohár wrote:
> > > On Friday 15 February 2013 23:56:49 Pali Rohár wrote:
> > > > Driver twl4030-madc has hardcoded channel types (10 -
> > > > battery current, 1 - battery temperature) and also
> > > > conversation data in variable twl4030_divider_ratios.
> > > > These hardcoded channels are incorrect for Nokia RX-51
> > > > board (where is channel 0 - battery temperature).
> > > > 
> > > > For Nokia RX-51 there is rx51_battery power_supply driver
> > > > which reporting battery information via
> > > > twl4030_madc_conversion. But this driver needs raw values
> > > > (not converted via some hardcoded functions). So this
> > > > patch adding new parameter "raw" to struct
> > > > twl4030_madc_request which tell twl4030-madc driver to
> > > > not convert values, but rather return raw.
> > > > 
> > > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > > > ---
> > > > 
> > > >  drivers/mfd/twl4030-madc.c       |   14 ++++++++++----
> > > >  include/linux/i2c/twl4030-madc.h |    2 ++
> > > >  2 files changed, 12 insertions(+), 4 deletions(-)
> > > 
> > > Hello, can somebody review this twl4030-madc patch?
> > 
> > Bump.
> > 
> > Can some of mfd maintainers look at this patch and include it
> > to mfd tree? It is needed for rx51_battery power supply
> > driver.
> 
> CCing Tony, can you look at this patch?

Sorry for the delay in replying, I've been going through my
inbox for the merge window and noticed this.

I suggest resend with Peter Ujfalusi cc:d as he is the de-facto
twl/tps maintainer and expert by now.

Regards,

Tony

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
  2013-04-08 18:15       ` Tony Lindgren
@ 2013-04-10 14:12         ` Pali Rohár
  2013-04-10 17:00           ` Tony Lindgren
  0 siblings, 1 reply; 13+ messages in thread
From: Pali Rohár @ 2013-04-10 14:12 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-kernel, Samuel Ortiz, Anton Vorontsov, Keerthy, Kyle Manna,
	linux-omap

[-- Attachment #1: Type: Text/Plain, Size: 1989 bytes --]

On Monday 08 April 2013 20:15:24 Tony Lindgren wrote:
> * Pali Rohár <pali.rohar@gmail.com> [130404 02:37]:
> > On Sunday 24 March 2013 15:03:29 Pali Rohár wrote:
> > > On Saturday 02 March 2013 23:23:05 Pali Rohár wrote:
> > > > On Friday 15 February 2013 23:56:49 Pali Rohár wrote:
> > > > > Driver twl4030-madc has hardcoded channel types (10 -
> > > > > battery current, 1 - battery temperature) and also
> > > > > conversation data in variable twl4030_divider_ratios.
> > > > > These hardcoded channels are incorrect for Nokia RX-51
> > > > > board (where is channel 0 - battery temperature).
> > > > > 
> > > > > For Nokia RX-51 there is rx51_battery power_supply
> > > > > driver which reporting battery information via
> > > > > twl4030_madc_conversion. But this driver needs raw
> > > > > values (not converted via some hardcoded functions).
> > > > > So this patch adding new parameter "raw" to struct
> > > > > twl4030_madc_request which tell twl4030-madc driver to
> > > > > not convert values, but rather return raw.
> > > > > 
> > > > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > > > > ---
> > > > > 
> > > > >  drivers/mfd/twl4030-madc.c       |   14
> > > > >  ++++++++++---- include/linux/i2c/twl4030-madc.h |   
> > > > >  2 ++
> > > > >  2 files changed, 12 insertions(+), 4 deletions(-)
> > > > 
> > > > Hello, can somebody review this twl4030-madc patch?
> > > 
> > > Bump.
> > > 
> > > Can some of mfd maintainers look at this patch and include
> > > it to mfd tree? It is needed for rx51_battery power
> > > supply driver.
> > 
> > CCing Tony, can you look at this patch?
> 
> Sorry for the delay in replying, I've been going through my
> inbox for the merge window and noticed this.
> 
> I suggest resend with Peter Ujfalusi cc:d as he is the
> de-facto twl/tps maintainer and expert by now.
> 
> Regards,
> 
> Tony

Ok, both patches are now in mfd-next tree.

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
  2013-04-10 14:12         ` Pali Rohár
@ 2013-04-10 17:00           ` Tony Lindgren
  0 siblings, 0 replies; 13+ messages in thread
From: Tony Lindgren @ 2013-04-10 17:00 UTC (permalink / raw)
  To: Pali Rohár
  Cc: linux-kernel, Samuel Ortiz, Anton Vorontsov, Keerthy, Kyle Manna,
	linux-omap

* Pali Rohár <pali.rohar@gmail.com> [130410 07:17]:
> On Monday 08 April 2013 20:15:24 Tony Lindgren wrote:
> > * Pali Rohár <pali.rohar@gmail.com> [130404 02:37]:
> > > On Sunday 24 March 2013 15:03:29 Pali Rohár wrote:
> > > > On Saturday 02 March 2013 23:23:05 Pali Rohár wrote:
> > > > > On Friday 15 February 2013 23:56:49 Pali Rohár wrote:
> > > > > > Driver twl4030-madc has hardcoded channel types (10 -
> > > > > > battery current, 1 - battery temperature) and also
> > > > > > conversation data in variable twl4030_divider_ratios.
> > > > > > These hardcoded channels are incorrect for Nokia RX-51
> > > > > > board (where is channel 0 - battery temperature).
> > > > > > 
> > > > > > For Nokia RX-51 there is rx51_battery power_supply
> > > > > > driver which reporting battery information via
> > > > > > twl4030_madc_conversion. But this driver needs raw
> > > > > > values (not converted via some hardcoded functions).
> > > > > > So this patch adding new parameter "raw" to struct
> > > > > > twl4030_madc_request which tell twl4030-madc driver to
> > > > > > not convert values, but rather return raw.
> > > > > > 
> > > > > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > > > > > ---
> > > > > > 
> > > > > >  drivers/mfd/twl4030-madc.c       |   14
> > > > > >  ++++++++++---- include/linux/i2c/twl4030-madc.h |   
> > > > > >  2 ++
> > > > > >  2 files changed, 12 insertions(+), 4 deletions(-)
> > > > > 
> > > > > Hello, can somebody review this twl4030-madc patch?
> > > > 
> > > > Bump.
> > > > 
> > > > Can some of mfd maintainers look at this patch and include
> > > > it to mfd tree? It is needed for rx51_battery power
> > > > supply driver.
> > > 
> > > CCing Tony, can you look at this patch?
> > 
> > Sorry for the delay in replying, I've been going through my
> > inbox for the merge window and noticed this.
> > 
> > I suggest resend with Peter Ujfalusi cc:d as he is the
> > de-facto twl/tps maintainer and expert by now.
> > 
> > Regards,
> > 
> > Tony
> 
> Ok, both patches are now in mfd-next tree.

Great thanks!

Tony

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-04-10 17:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-15 22:56 [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion Pali Rohár
2013-02-15 22:56 ` [PATCH 2/2] power: rx51_battery: Fix reporting correct values Pali Rohár
2013-02-16 21:39   ` Anton Vorontsov
2013-03-02 22:23 ` [PATCH 1/2] mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion Pali Rohár
2013-03-24 14:03   ` Pali Rohár
2013-04-04  9:32     ` Pali Rohár
2013-04-08 18:15       ` Tony Lindgren
2013-04-10 14:12         ` Pali Rohár
2013-04-10 17:00           ` Tony Lindgren
2013-04-04  9:38   ` Samuel Ortiz
2013-04-08 10:43     ` Pali Rohár
2013-03-02 23:16 ` Anton Vorontsov
2013-04-08 14:34 ` Samuel Ortiz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.