Skip to contentSkip to conversation

mfd: Add support for WM8351 revision B

PATCH In review Mark Brown 3 participants 4 messages Feb 25, 2009 – Feb 26, 2009

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/2 mfd: Add support for WM8351 revision B

No software visible difference from revision A.

---
 drivers/mfd/wm8350-core.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/mfd/wm8350-core.c +5 -0
index c384cd2..a285cc0 100644
@@ -1386,6 +1386,11 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq,
 			wm8350->power.rev_g_coeff = 1;
 			break;
 
+		case 1:
+			dev_info(wm8350->dev, "WM8351 Rev B\n");
+			wm8350->power.rev_g_coeff = 1;
+			break;
+
 		default:
 			dev_err(wm8350->dev, "Unknown WM8351 CHIP_REV\n");
 			ret = -ENODEV;
Signature · 1 line
1.6.1.3
author
#1 lore raw

PATCH 2/2 mfd: Use the value of the final spin when reading the AUXADC

---
 drivers/mfd/wm8350-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/wm8350-core.c +1 -1
index a285cc0..c2be308 100644
@@ -1111,7 +1111,7 @@ int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref)
 	do {
 		schedule_timeout_interruptible(1);
 		reg = wm8350_reg_read(wm8350, WM8350_DIGITISER_CONTROL_1);
-	} while (--tries && (reg & WM8350_AUXADC_POLL));
+	} while ((reg & WM8350_AUXADC_POLL) && --tries);
 
 	if (!tries)
 		dev_err(wm8350->dev, "adc chn %d read timeout\n", channel);
Signature · 1 line
1.6.1.3
#2 lore raw

Re: [PATCH 2/2] mfd: Use the value of the final spin when reading the AUXADC

Quoted 10 lines · On Wed, 25 Feb 2009 16:23:35 +0000 Mark Brown…
---
 drivers/mfd/wm8350-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/wm8350-core.c +0 -0
index a285cc0..c2be308 100644

drivers/mfd/wm8350-core.c int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref) · line 1117

Quoted 8 lines
drivers/mfd/wm8350-core.c +1 -1
@@ -1111,7 +1111,7 @@ int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref)
 	do {
 		schedule_timeout_interruptible(1);
 		reg = wm8350_reg_read(wm8350, WM8350_DIGITISER_CONTROL_1);
-	} while (--tries && (reg & WM8350_AUXADC_POLL));
+	} while ((reg & WM8350_AUXADC_POLL) && --tries);
 
 	if (!tries)
 		dev_err(wm8350->dev, "adc chn %d read timeout\n", channel);

Please do not ever send any unchangelogged patches ever again, at all, ever.

OK?

#3 lore raw
In reply to Mark Brown

Hi Mark,

I'll apply both patches to my for-next branch, thanks a lot.

Cheers,
Samuel.

Quoted 26 lines · Mark Brown

No software visible difference from revision A.

---
 drivers/mfd/wm8350-core.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/mfd/wm8350-core.c +5 -0
index c384cd2..a285cc0 100644
@@ -1386,6 +1386,11 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq,
 			wm8350->power.rev_g_coeff = 1;
 			break;
 
+		case 1:
+			dev_info(wm8350->dev, "WM8351 Rev B\n");
+			wm8350->power.rev_g_coeff = 1;
+			break;
+
 		default:
 			dev_err(wm8350->dev, "Unknown WM8351 CHIP_REV\n");
 			ret = -ENODEV;
Signature · 1 line
1.6.1.3
Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/