From: Paul Parsons Date: Tue, 10 Apr 2012 23:35:34 +0000 (+0100) Subject: mfd: Avoid unbalanced asic3 irq wakeup enables/disables X-Git-Tag: v3.5-rc1~51^2~96 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2fe372fc2a037c8de0c721b45cd0e4e9c8d8c25e;p=platform%2Fkernel%2Flinux-exynos.git mfd: Avoid unbalanced asic3 irq wakeup enables/disables The mfd/asic3 driver does not currently define a irq_set_wake() handler. Consequently any attempt to configure the 3 ASIC3 GPIO buttons - RECORD, CALENDAR, HOME - as wakeup sources results in Unbalanced IRQ warnings when the system is woken from sleep mode: WARNING: at kernel/irq/manage.c:520 irq_set_irq_wake+0xc4/0xf8() Unbalanced IRQ 342 wake disable ... WARNING: at kernel/irq/manage.c:520 irq_set_irq_wake+0xc4/0xf8() Unbalanced IRQ 337 wake disable ... WARNING: at kernel/irq/manage.c:520 irq_set_irq_wake+0xc4/0xf8() Unbalanced IRQ 339 wake disable ... This patch adds a irq_set_wake() handler to the mfd/asic3 driver. Signed-off-by: Paul Parsons Cc: Philipp Zabel Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index 4c3ec81..9d4a492 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c @@ -353,12 +353,28 @@ static int asic3_gpio_irq_type(struct irq_data *data, unsigned int type) return 0; } +static int asic3_gpio_irq_set_wake(struct irq_data *data, unsigned int on) +{ + struct asic3 *asic = irq_data_get_irq_chip_data(data); + u32 bank, index; + u16 bit; + + bank = asic3_irq_to_bank(asic, data->irq); + index = asic3_irq_to_index(asic, data->irq); + bit = 1<