aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-05-07 13:39:25 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-05-10 06:04:34 -0400
commit896060c76bdfd8a45eb33b3dd1a8307fe37f6c04 (patch)
tree531f445feee2c226c477a288eda98c6d0141c586
parent06ae99888e599ea2e82386d618405c473c379185 (diff)
ASoC: Use more idiomatic driver name for WM8731
Make dev_() prints much prettier. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-rw-r--r--drivers/mfd/wm831x-irq.c30
-rw-r--r--sound/soc/codecs/wm8731.c2
2 files changed, 31 insertions, 1 deletions
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index 301327697117..4c1122ceb443 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -21,6 +21,7 @@
21 21
22#include <linux/mfd/wm831x/core.h> 22#include <linux/mfd/wm831x/core.h>
23#include <linux/mfd/wm831x/pdata.h> 23#include <linux/mfd/wm831x/pdata.h>
24#include <linux/mfd/wm831x/gpio.h>
24#include <linux/mfd/wm831x/irq.h> 25#include <linux/mfd/wm831x/irq.h>
25 26
26#include <linux/delay.h> 27#include <linux/delay.h>
@@ -388,12 +389,41 @@ static void wm831x_irq_mask(unsigned int irq)
388 wm831x->irq_masks_cur[irq_data->reg - 1] |= irq_data->mask; 389 wm831x->irq_masks_cur[irq_data->reg - 1] |= irq_data->mask;
389} 390}
390 391
392static int wm831x_irq_set_type(unsigned int irq, unsigned int type)
393{
394 struct wm831x *wm831x = get_irq_chip_data(irq);
395 int val;
396
397 irq = irq - wm831x->irq_base;
398
399 if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11)
400 return -EINVAL;
401
402 switch (type) {
403 case IRQ_TYPE_EDGE_BOTH:
404 val = WM831X_GPN_INT_MODE;
405 break;
406 case IRQ_TYPE_EDGE_RISING:
407 val = WM831X_GPN_POL;
408 break;
409 case IRQ_TYPE_EDGE_FALLING:
410 val = 0;
411 break;
412 default:
413 return -EINVAL;
414 }
415
416 return wm831x_set_bits(wm831x, WM831X_GPIO1_CONTROL + irq,
417 WM831X_GPN_INT_MODE | WM831X_GPN_POL, val);
418}
419
391static struct irq_chip wm831x_irq_chip = { 420static struct irq_chip wm831x_irq_chip = {
392 .name = "wm831x", 421 .name = "wm831x",
393 .bus_lock = wm831x_irq_lock, 422 .bus_lock = wm831x_irq_lock,
394 .bus_sync_unlock = wm831x_irq_sync_unlock, 423 .bus_sync_unlock = wm831x_irq_sync_unlock,
395 .mask = wm831x_irq_mask, 424 .mask = wm831x_irq_mask,
396 .unmask = wm831x_irq_unmask, 425 .unmask = wm831x_irq_unmask,
426 .set_type = wm831x_irq_set_type,
397}; 427};
398 428
399/* The processing of the primary interrupt occurs in a thread so that 429/* The processing of the primary interrupt occurs in a thread so that
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 2650fac30ee4..e17c714196f2 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -707,7 +707,7 @@ MODULE_DEVICE_TABLE(i2c, wm8731_i2c_id);
707 707
708static struct i2c_driver wm8731_i2c_driver = { 708static struct i2c_driver wm8731_i2c_driver = {
709 .driver = { 709 .driver = {
710 .name = "WM8731 I2C Codec", 710 .name = "wm8731",
711 .owner = THIS_MODULE, 711 .owner = THIS_MODULE,
712 }, 712 },
713 .probe = wm8731_i2c_probe, 713 .probe = wm8731_i2c_probe,