diff options
-rw-r--r-- | drivers/mfd/wm831x-core.c | 7 | ||||
-rw-r--r-- | drivers/mfd/wm831x-i2c.c | 1 | ||||
-rw-r--r-- | drivers/mfd/wm831x-spi.c | 18 | ||||
-rw-r--r-- | include/linux/mfd/wm831x/core.h | 1 |
4 files changed, 27 insertions, 0 deletions
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c index d1b2d534b991..3fe9a58fe6c7 100644 --- a/drivers/mfd/wm831x-core.c +++ b/drivers/mfd/wm831x-core.c | |||
@@ -1541,6 +1541,12 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq) | |||
1541 | dev_info(wm831x->dev, "WM8325 revision %c\n", 'A' + rev); | 1541 | dev_info(wm831x->dev, "WM8325 revision %c\n", 'A' + rev); |
1542 | break; | 1542 | break; |
1543 | 1543 | ||
1544 | case WM8326: | ||
1545 | parent = WM8326; | ||
1546 | wm831x->num_gpio = 12; | ||
1547 | dev_info(wm831x->dev, "WM8326 revision %c\n", 'A' + rev); | ||
1548 | break; | ||
1549 | |||
1544 | default: | 1550 | default: |
1545 | dev_err(wm831x->dev, "Unknown WM831x device %04x\n", ret); | 1551 | dev_err(wm831x->dev, "Unknown WM831x device %04x\n", ret); |
1546 | ret = -EINVAL; | 1552 | ret = -EINVAL; |
@@ -1612,6 +1618,7 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq) | |||
1612 | case WM8320: | 1618 | case WM8320: |
1613 | case WM8321: | 1619 | case WM8321: |
1614 | case WM8325: | 1620 | case WM8325: |
1621 | case WM8326: | ||
1615 | ret = mfd_add_devices(wm831x->dev, -1, | 1622 | ret = mfd_add_devices(wm831x->dev, -1, |
1616 | wm8320_devs, ARRAY_SIZE(wm8320_devs), | 1623 | wm8320_devs, ARRAY_SIZE(wm8320_devs), |
1617 | NULL, wm831x->irq_base); | 1624 | NULL, wm831x->irq_base); |
diff --git a/drivers/mfd/wm831x-i2c.c b/drivers/mfd/wm831x-i2c.c index 156b19859e81..38be5201c783 100644 --- a/drivers/mfd/wm831x-i2c.c +++ b/drivers/mfd/wm831x-i2c.c | |||
@@ -108,6 +108,7 @@ static const struct i2c_device_id wm831x_i2c_id[] = { | |||
108 | { "wm8320", WM8320 }, | 108 | { "wm8320", WM8320 }, |
109 | { "wm8321", WM8321 }, | 109 | { "wm8321", WM8321 }, |
110 | { "wm8325", WM8325 }, | 110 | { "wm8325", WM8325 }, |
111 | { "wm8326", WM8326 }, | ||
111 | { } | 112 | { } |
112 | }; | 113 | }; |
113 | MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id); | 114 | MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id); |
diff --git a/drivers/mfd/wm831x-spi.c b/drivers/mfd/wm831x-spi.c index 2789b151b0f9..0a8f772be88c 100644 --- a/drivers/mfd/wm831x-spi.c +++ b/drivers/mfd/wm831x-spi.c | |||
@@ -81,6 +81,8 @@ static int __devinit wm831x_spi_probe(struct spi_device *spi) | |||
81 | type = WM8321; | 81 | type = WM8321; |
82 | else if (strcmp(spi->modalias, "wm8325") == 0) | 82 | else if (strcmp(spi->modalias, "wm8325") == 0) |
83 | type = WM8325; | 83 | type = WM8325; |
84 | else if (strcmp(spi->modalias, "wm8326") == 0) | ||
85 | type = WM8326; | ||
84 | else { | 86 | else { |
85 | dev_err(&spi->dev, "Unknown device type\n"); | 87 | dev_err(&spi->dev, "Unknown device type\n"); |
86 | return -EINVAL; | 88 | return -EINVAL; |
@@ -184,6 +186,17 @@ static struct spi_driver wm8325_spi_driver = { | |||
184 | .suspend = wm831x_spi_suspend, | 186 | .suspend = wm831x_spi_suspend, |
185 | }; | 187 | }; |
186 | 188 | ||
189 | static struct spi_driver wm8326_spi_driver = { | ||
190 | .driver = { | ||
191 | .name = "wm8326", | ||
192 | .bus = &spi_bus_type, | ||
193 | .owner = THIS_MODULE, | ||
194 | }, | ||
195 | .probe = wm831x_spi_probe, | ||
196 | .remove = __devexit_p(wm831x_spi_remove), | ||
197 | .suspend = wm831x_spi_suspend, | ||
198 | }; | ||
199 | |||
187 | static int __init wm831x_spi_init(void) | 200 | static int __init wm831x_spi_init(void) |
188 | { | 201 | { |
189 | int ret; | 202 | int ret; |
@@ -212,12 +225,17 @@ static int __init wm831x_spi_init(void) | |||
212 | if (ret != 0) | 225 | if (ret != 0) |
213 | pr_err("Failed to register WM8325 SPI driver: %d\n", ret); | 226 | pr_err("Failed to register WM8325 SPI driver: %d\n", ret); |
214 | 227 | ||
228 | ret = spi_register_driver(&wm8326_spi_driver); | ||
229 | if (ret != 0) | ||
230 | pr_err("Failed to register WM8326 SPI driver: %d\n", ret); | ||
231 | |||
215 | return 0; | 232 | return 0; |
216 | } | 233 | } |
217 | subsys_initcall(wm831x_spi_init); | 234 | subsys_initcall(wm831x_spi_init); |
218 | 235 | ||
219 | static void __exit wm831x_spi_exit(void) | 236 | static void __exit wm831x_spi_exit(void) |
220 | { | 237 | { |
238 | spi_unregister_driver(&wm8326_spi_driver); | ||
221 | spi_unregister_driver(&wm8325_spi_driver); | 239 | spi_unregister_driver(&wm8325_spi_driver); |
222 | spi_unregister_driver(&wm8321_spi_driver); | 240 | spi_unregister_driver(&wm8321_spi_driver); |
223 | spi_unregister_driver(&wm8320_spi_driver); | 241 | spi_unregister_driver(&wm8320_spi_driver); |
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h index a1239c48b41a..903280d21866 100644 --- a/include/linux/mfd/wm831x/core.h +++ b/include/linux/mfd/wm831x/core.h | |||
@@ -245,6 +245,7 @@ enum wm831x_parent { | |||
245 | WM8320 = 0x8320, | 245 | WM8320 = 0x8320, |
246 | WM8321 = 0x8321, | 246 | WM8321 = 0x8321, |
247 | WM8325 = 0x8325, | 247 | WM8325 = 0x8325, |
248 | WM8326 = 0x8326, | ||
248 | }; | 249 | }; |
249 | 250 | ||
250 | struct wm831x { | 251 | struct wm831x { |