summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d852f95)
raw | patch | inline | side by side (parent: d852f95)
author | Deepak Sikri <deepak.sikri@st.com> | |
Fri, 9 Nov 2012 00:35:27 +0000 (16:35 -0800) | ||
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | |
Sat, 10 Nov 2012 08:29:39 +0000 (00:29 -0800) |
This patch handles the fix for unbalanced irq for the cases when
enable_irq_wake fails, and a warning related to same is displayed
on the console. The workaround is handled at the driver level.
Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
enable_irq_wake fails, and a warning related to same is displayed
on the console. The workaround is handled at the driver level.
Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/spear-keyboard.c | patch | blob | history |
index c7ca97f44bfb0f106edd549e9edb0ed6eb4d0221..7685b476d6c19fcb01c4fdeb781b5ec2ce5c59c1 100644 (file)
struct clk *clk;
unsigned int irq;
unsigned int mode;
+ unsigned int suspended_rate;
unsigned short last_key;
unsigned short keycodes[NUM_ROWS * NUM_COLS];
bool rep;
- unsigned int suspended_rate;
+ bool irq_wake_enabled;
u32 mode_ctl_reg;
};
mode_ctl_reg = readl_relaxed(kbd->io_base + MODE_CTL_REG);
if (device_may_wakeup(&pdev->dev)) {
- enable_irq_wake(kbd->irq);
+ if (!enable_irq_wake(kbd->irq))
+ kbd->irq_wake_enabled = true;
/*
* reprogram the keyboard operating frequency as on some
mutex_lock(&input_dev->mutex);
if (device_may_wakeup(&pdev->dev)) {
- disable_irq_wake(kbd->irq);
+ if (kbd->irq_wake_enabled) {
+ kbd->irq_wake_enabled = false;
+ disable_irq_wake(kbd->irq);
+ }
} else {
if (input_dev->users)
clk_enable(kbd->clk);