diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-09-28 12:13:39 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-10-28 18:29:43 -0400 |
commit | 0b3158842f1f22277bc5cb0968c09a833f9d15c1 (patch) | |
tree | 25791f469d34ec78c9615a55b2f94f1ac504ca45 /drivers/mfd | |
parent | c6252e9ce7f51a2af66bd69c93afb37191467c96 (diff) |
mfd: Add WM8325 support
The WM8325 is a PMIC for low power, high performance applications. From
a software point of view the device is identical to the WM8320, all the
differences are at the hardware level.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/wm831x-core.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c index 1e7aaaf6cc6..ad36579bc81 100644 --- a/drivers/mfd/wm831x-core.c +++ b/drivers/mfd/wm831x-core.c | |||
@@ -96,6 +96,7 @@ enum wm831x_parent { | |||
96 | WM8312 = 0x8312, | 96 | WM8312 = 0x8312, |
97 | WM8320 = 0x8320, | 97 | WM8320 = 0x8320, |
98 | WM8321 = 0x8321, | 98 | WM8321 = 0x8321, |
99 | WM8325 = 0x8325, | ||
99 | }; | 100 | }; |
100 | 101 | ||
101 | static int wm831x_reg_locked(struct wm831x *wm831x, unsigned short reg) | 102 | static int wm831x_reg_locked(struct wm831x *wm831x, unsigned short reg) |
@@ -1540,6 +1541,12 @@ static int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq) | |||
1540 | dev_info(wm831x->dev, "WM8321 revision %c\n", 'A' + rev); | 1541 | dev_info(wm831x->dev, "WM8321 revision %c\n", 'A' + rev); |
1541 | break; | 1542 | break; |
1542 | 1543 | ||
1544 | case WM8325: | ||
1545 | parent = WM8325; | ||
1546 | wm831x->num_gpio = 12; | ||
1547 | dev_info(wm831x->dev, "WM8325 revision %c\n", 'A' + rev); | ||
1548 | break; | ||
1549 | |||
1543 | default: | 1550 | default: |
1544 | dev_err(wm831x->dev, "Unknown WM831x device %04x\n", ret); | 1551 | dev_err(wm831x->dev, "Unknown WM831x device %04x\n", ret); |
1545 | ret = -EINVAL; | 1552 | ret = -EINVAL; |
@@ -1620,6 +1627,12 @@ static int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq) | |||
1620 | NULL, 0); | 1627 | NULL, 0); |
1621 | break; | 1628 | break; |
1622 | 1629 | ||
1630 | case WM8325: | ||
1631 | ret = mfd_add_devices(wm831x->dev, -1, | ||
1632 | wm8320_devs, ARRAY_SIZE(wm8320_devs), | ||
1633 | NULL, 0); | ||
1634 | break; | ||
1635 | |||
1623 | default: | 1636 | default: |
1624 | /* If this happens the bus probe function is buggy */ | 1637 | /* If this happens the bus probe function is buggy */ |
1625 | BUG(); | 1638 | BUG(); |
@@ -1791,6 +1804,7 @@ static const struct i2c_device_id wm831x_i2c_id[] = { | |||
1791 | { "wm8312", WM8312 }, | 1804 | { "wm8312", WM8312 }, |
1792 | { "wm8320", WM8320 }, | 1805 | { "wm8320", WM8320 }, |
1793 | { "wm8321", WM8321 }, | 1806 | { "wm8321", WM8321 }, |
1807 | { "wm8325", WM8325 }, | ||
1794 | { } | 1808 | { } |
1795 | }; | 1809 | }; |
1796 | MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id); | 1810 | MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id); |