summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-02 16:25:43 +0000
committerAK <andi@firstfloor.org>2011-02-06 11:03:49 -0800
commit848d070ae77a340275678ce27fde5c831e299e64 (patch)
treeacbf178e1435a6e0cfe4759d69c30028231e2240
parent26120280fe178d45390f28394e2d31399c04506d (diff)
downloadlwn-848d070ae77a340275678ce27fde5c831e299e64.tar.gz
lwn-848d070ae77a340275678ce27fde5c831e299e64.zip
mfd: Support additional parent IDs for wm831x
commit b93cef556162b0f33399bfe5f307c54f51554e09 upstream. Some newer device revisions add a second parent ID. Support this in the device validity checks done at startup. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r--drivers/mfd/wm831x-core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c
index 1a968f34d679..8d7182e24985 100644
--- a/drivers/mfd/wm831x-core.c
+++ b/drivers/mfd/wm831x-core.c
@@ -1463,7 +1463,11 @@ static 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;