Skip to contentSkip to conversation

mfd: Support additional parent IDs for wm831x

PATCH In review Mark Brown 2 participants 2 messages Dec 2, 2010 – Dec 9, 2010

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mfd: Support additional parent IDs for wm831x

Some newer device revisions add a second parent ID. Support this in the device validity checks done at startup.

---
 drivers/mfd/wm831x-core.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/mfd/wm831x-core.c +5 -1
index 47b58cc..3fe9a58 100644
@@ -1455,7 +1455,11 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
 		dev_err(wm831x->dev, "Failed to read parent ID: %d\n", ret);
 		goto err;
 	}
-	if (ret != 0x6204) {
+	switch (ret) {
+	case 0x6204:
+	case 0x6246:
+		break;
+	default:
 		dev_err(wm831x->dev, "Device is not a WM831x: ID %x\n", ret);
 		ret = -EINVAL;
 		goto err;
Signature · 1 line
1.7.1
#1 lore raw

Hi Mark,

Quoted 2 lines · Mark Brown

Some newer device revisions add a second parent ID. Support this in the device validity checks done at startup.

Patch applied to both my for-next and for-linus branches, thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/