diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-29 17:57:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-29 17:57:53 -0400 |
commit | 9d457c60ba783c709c750b851d07f0ac8af78ce9 (patch) | |
tree | 9e28956058607759b3ef63c0fb6fc9a0e3d9a810 /drivers | |
parent | f12f662f29d5801e598c6bb4a71e54b2de218f72 (diff) | |
parent | 90182317a9e383474613aa60e9d61d57bdf17c3e (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
mfd: Fix max8925 irq control bit incorrect setting
mfd: Ignore non-GPIO IRQs when setting wm831x IRQ types
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/max8925-core.c | 13 | ||||
-rw-r--r-- | drivers/mfd/wm831x-irq.c | 9 |
2 files changed, 14 insertions, 8 deletions
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c index 04028a9ee082..428377a5a6f5 100644 --- a/drivers/mfd/max8925-core.c +++ b/drivers/mfd/max8925-core.c | |||
@@ -429,24 +429,25 @@ static void max8925_irq_sync_unlock(unsigned int irq) | |||
429 | irq_tsc = cache_tsc; | 429 | irq_tsc = cache_tsc; |
430 | for (i = 0; i < ARRAY_SIZE(max8925_irqs); i++) { | 430 | for (i = 0; i < ARRAY_SIZE(max8925_irqs); i++) { |
431 | irq_data = &max8925_irqs[i]; | 431 | irq_data = &max8925_irqs[i]; |
432 | /* 1 -- disable, 0 -- enable */ | ||
432 | switch (irq_data->mask_reg) { | 433 | switch (irq_data->mask_reg) { |
433 | case MAX8925_CHG_IRQ1_MASK: | 434 | case MAX8925_CHG_IRQ1_MASK: |
434 | irq_chg[0] &= irq_data->enable; | 435 | irq_chg[0] &= ~irq_data->enable; |
435 | break; | 436 | break; |
436 | case MAX8925_CHG_IRQ2_MASK: | 437 | case MAX8925_CHG_IRQ2_MASK: |
437 | irq_chg[1] &= irq_data->enable; | 438 | irq_chg[1] &= ~irq_data->enable; |
438 | break; | 439 | break; |
439 | case MAX8925_ON_OFF_IRQ1_MASK: | 440 | case MAX8925_ON_OFF_IRQ1_MASK: |
440 | irq_on[0] &= irq_data->enable; | 441 | irq_on[0] &= ~irq_data->enable; |
441 | break; | 442 | break; |
442 | case MAX8925_ON_OFF_IRQ2_MASK: | 443 | case MAX8925_ON_OFF_IRQ2_MASK: |
443 | irq_on[1] &= irq_data->enable; | 444 | irq_on[1] &= ~irq_data->enable; |
444 | break; | 445 | break; |
445 | case MAX8925_RTC_IRQ_MASK: | 446 | case MAX8925_RTC_IRQ_MASK: |
446 | irq_rtc &= irq_data->enable; | 447 | irq_rtc &= ~irq_data->enable; |
447 | break; | 448 | break; |
448 | case MAX8925_TSC_IRQ_MASK: | 449 | case MAX8925_TSC_IRQ_MASK: |
449 | irq_tsc &= irq_data->enable; | 450 | irq_tsc &= ~irq_data->enable; |
450 | break; | 451 | break; |
451 | default: | 452 | default: |
452 | dev_err(chip->dev, "wrong IRQ\n"); | 453 | dev_err(chip->dev, "wrong IRQ\n"); |
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c index 7dabe4dbd373..294183b6260b 100644 --- a/drivers/mfd/wm831x-irq.c +++ b/drivers/mfd/wm831x-irq.c | |||
@@ -394,8 +394,13 @@ static int wm831x_irq_set_type(unsigned int irq, unsigned int type) | |||
394 | 394 | ||
395 | irq = irq - wm831x->irq_base; | 395 | irq = irq - wm831x->irq_base; |
396 | 396 | ||
397 | if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11) | 397 | if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11) { |
398 | return -EINVAL; | 398 | /* Ignore internal-only IRQs */ |
399 | if (irq >= 0 && irq < WM831X_NUM_IRQS) | ||
400 | return 0; | ||
401 | else | ||
402 | return -EINVAL; | ||
403 | } | ||
399 | 404 | ||
400 | switch (type) { | 405 | switch (type) { |
401 | case IRQ_TYPE_EDGE_BOTH: | 406 | case IRQ_TYPE_EDGE_BOTH: |