Re: [PATCH] input: gpio_keys: Add IRQF_NO_SUSPEND flag to wake-up from freeze state

2014-05-25 Thread Sachin Kamat
Hi Chanwoo,


On 26 May 2014 10:27, Chanwoo Choi  wrote:
> This patch add IRQF_NO_SUSPEND flag before requesting interrupt handler
> if button->wakeup is true. If ther interrupt of gpio-keys hasn't included
> IRQF_NO_SUSPEND, wouldn't wake-up from freeze state when pressing button.

Please refer to the below thread. Looks like it was similar to what
you are proposing.
http://www.spinics.net/lists/linux-input/msg28780.html

-- 
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] input: gpio_keys: Add IRQF_NO_SUSPEND flag to wake-up from freeze state

2014-05-25 Thread Chanwoo Choi
This patch add IRQF_NO_SUSPEND flag before requesting interrupt handler
if button->wakeup is true. If ther interrupt of gpio-keys hasn't included
IRQF_NO_SUSPEND, wouldn't wake-up from freeze state when pressing button.

Signed-off-by: Chanwoo Choi 
Acked-by: Kyungmin Park 
Cc: Dmitry Torokhov 
Cc: Sachin Kamat 
Cc: Chanwoo Choi 
Cc: linux-in...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/input/keyboard/gpio_keys.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/input/keyboard/gpio_keys.c 
b/drivers/input/keyboard/gpio_keys.c
index 2db1324..40f3963 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -503,6 +503,9 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
if (!button->can_disable)
irqflags |= IRQF_SHARED;
 
+   if (button->wakeup)
+   irqflags |= IRQF_NO_SUSPEND;
+
error = request_any_context_irq(bdata->irq, isr, irqflags, desc, bdata);
if (error < 0) {
dev_err(dev, "Unable to claim irq %d; error %d\n",
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] input: gpio_keys: Add IRQF_NO_SUSPEND flag to wake-up from freeze state

2014-05-25 Thread Chanwoo Choi
This patch add IRQF_NO_SUSPEND flag before requesting interrupt handler
if button-wakeup is true. If ther interrupt of gpio-keys hasn't included
IRQF_NO_SUSPEND, wouldn't wake-up from freeze state when pressing button.

Signed-off-by: Chanwoo Choi cw00.c...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
Cc: Dmitry Torokhov dmitry.torok...@gmail.com
Cc: Sachin Kamat sachin.ka...@linaro.org
Cc: Chanwoo Choi cw00.c...@samsung.com
Cc: linux-in...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/input/keyboard/gpio_keys.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/input/keyboard/gpio_keys.c 
b/drivers/input/keyboard/gpio_keys.c
index 2db1324..40f3963 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -503,6 +503,9 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
if (!button-can_disable)
irqflags |= IRQF_SHARED;
 
+   if (button-wakeup)
+   irqflags |= IRQF_NO_SUSPEND;
+
error = request_any_context_irq(bdata-irq, isr, irqflags, desc, bdata);
if (error  0) {
dev_err(dev, Unable to claim irq %d; error %d\n,
-- 
1.8.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] input: gpio_keys: Add IRQF_NO_SUSPEND flag to wake-up from freeze state

2014-05-25 Thread Sachin Kamat
Hi Chanwoo,


On 26 May 2014 10:27, Chanwoo Choi cw00.c...@samsung.com wrote:
 This patch add IRQF_NO_SUSPEND flag before requesting interrupt handler
 if button-wakeup is true. If ther interrupt of gpio-keys hasn't included
 IRQF_NO_SUSPEND, wouldn't wake-up from freeze state when pressing button.

Please refer to the below thread. Looks like it was similar to what
you are proposing.
http://www.spinics.net/lists/linux-input/msg28780.html

-- 
With warm regards,
Sachin
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/