LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/1] [INPUT/KEYBOARD] Blackfin BF54x: Add infrastructure for keypad wakeups
@ 2008-03-27 1:24 Bryan Wu
0 siblings, 0 replies; 4+ messages in thread
From: Bryan Wu @ 2008-03-27 1:24 UTC (permalink / raw)
To: dmitry.torokhov, linux-input, linux-kernel; +Cc: Michael Hennerich, Bryan Wu
From: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/input/keyboard/bf54x-keys.c | 36 ++++++++++++++++++++++++++++++++--
1 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c
index 05e3494..2db5d37 100644
--- a/drivers/input/keyboard/bf54x-keys.c
+++ b/drivers/input/keyboard/bf54x-keys.c
@@ -312,6 +312,8 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)
bfin_write_KPAD_CTL(bfin_read_KPAD_CTL() | KPAD_EN);
+ device_init_wakeup(&pdev->dev, 1);
+
printk(KERN_ERR DRV_NAME
": Blackfin BF54x Keypad registered IRQ %d\n", bf54x_kpad->irq);
@@ -354,12 +356,40 @@ static int __devexit bfin_kpad_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM
+static int bfin_kpad_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev);
+
+ if (device_may_wakeup(&pdev->dev))
+ enable_irq_wake(bf54x_kpad->irq);
+
+ return 0;
+}
+
+static int bfin_kpad_resume(struct platform_device *pdev)
+{
+ struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev);
+
+ if (device_may_wakeup(&pdev->dev))
+ disable_irq_wake(bf54x_kpad->irq);
+
+ return 0;
+}
+#else
+# define bfin_kpad_suspend NULL
+# define bfin_kpad_resume NULL
+#endif
+
struct platform_driver bfin_kpad_device_driver = {
- .probe = bfin_kpad_probe,
- .remove = __devexit_p(bfin_kpad_remove),
.driver = {
.name = DRV_NAME,
- }
+ .owner = THIS_MODULE,
+ },
+ .probe = bfin_kpad_probe,
+ .remove = __devexit_p(bfin_kpad_remove),
+ .suspend = bfin_kpad_suspend,
+ .resume = bfin_kpad_resume,
};
static int __init bfin_kpad_init(void)
--
1.5.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] [INPUT/KEYBOARD] Blackfin BF54x: Add infrastructure for keypad wakeups
2008-04-25 4:06 ` Bryan Wu
@ 2008-04-25 4:14 ` Dmitry Torokhov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2008-04-25 4:14 UTC (permalink / raw)
To: Bryan Wu; +Cc: linux-input, linux-kernel, Michael Hennerich
On Fri, Apr 25, 2008 at 12:06:13PM +0800, Bryan Wu wrote:
> On Fri, Apr 25, 2008 at 11:55 AM, Bryan Wu <cooloney@kernel.org> wrote:
> > From: Michael Hennerich <michael.hennerich@analog.com>
> >
> > Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
> > Signed-off-by: Bryan Wu <cooloney@kernel.org>
> > ---
> > drivers/input/keyboard/bf54x-keys.c | 36 ++++++++++++++++++++++++++++++++--
> > 1 files changed, 33 insertions(+), 3 deletions(-)
> >
>
> Hi Dmitry,
>
> Sorry for resending this patch, I forget it was accept by you.
> Please ignore this.
>
No worries. Thanks Bryan.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] [INPUT/KEYBOARD] Blackfin BF54x: Add infrastructure for keypad wakeups
2008-04-25 3:55 Bryan Wu
@ 2008-04-25 4:06 ` Bryan Wu
2008-04-25 4:14 ` Dmitry Torokhov
0 siblings, 1 reply; 4+ messages in thread
From: Bryan Wu @ 2008-04-25 4:06 UTC (permalink / raw)
To: dmitry.torokhov, linux-input, linux-kernel; +Cc: Michael Hennerich, Bryan Wu
On Fri, Apr 25, 2008 at 11:55 AM, Bryan Wu <cooloney@kernel.org> wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
>
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
> Signed-off-by: Bryan Wu <cooloney@kernel.org>
> ---
> drivers/input/keyboard/bf54x-keys.c | 36 ++++++++++++++++++++++++++++++++--
> 1 files changed, 33 insertions(+), 3 deletions(-)
>
Hi Dmitry,
Sorry for resending this patch, I forget it was accept by you.
Please ignore this.
Thanks
-Bryan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] [INPUT/KEYBOARD] Blackfin BF54x: Add infrastructure for keypad wakeups
@ 2008-04-25 3:55 Bryan Wu
2008-04-25 4:06 ` Bryan Wu
0 siblings, 1 reply; 4+ messages in thread
From: Bryan Wu @ 2008-04-25 3:55 UTC (permalink / raw)
To: dmitry.torokhov, linux-input, linux-kernel; +Cc: Michael Hennerich, Bryan Wu
From: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/input/keyboard/bf54x-keys.c | 36 ++++++++++++++++++++++++++++++++--
1 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c
index 05e3494..2db5d37 100644
--- a/drivers/input/keyboard/bf54x-keys.c
+++ b/drivers/input/keyboard/bf54x-keys.c
@@ -312,6 +312,8 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)
bfin_write_KPAD_CTL(bfin_read_KPAD_CTL() | KPAD_EN);
+ device_init_wakeup(&pdev->dev, 1);
+
printk(KERN_ERR DRV_NAME
": Blackfin BF54x Keypad registered IRQ %d\n", bf54x_kpad->irq);
@@ -354,12 +356,40 @@ static int __devexit bfin_kpad_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM
+static int bfin_kpad_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev);
+
+ if (device_may_wakeup(&pdev->dev))
+ enable_irq_wake(bf54x_kpad->irq);
+
+ return 0;
+}
+
+static int bfin_kpad_resume(struct platform_device *pdev)
+{
+ struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev);
+
+ if (device_may_wakeup(&pdev->dev))
+ disable_irq_wake(bf54x_kpad->irq);
+
+ return 0;
+}
+#else
+# define bfin_kpad_suspend NULL
+# define bfin_kpad_resume NULL
+#endif
+
struct platform_driver bfin_kpad_device_driver = {
- .probe = bfin_kpad_probe,
- .remove = __devexit_p(bfin_kpad_remove),
.driver = {
.name = DRV_NAME,
- }
+ .owner = THIS_MODULE,
+ },
+ .probe = bfin_kpad_probe,
+ .remove = __devexit_p(bfin_kpad_remove),
+ .suspend = bfin_kpad_suspend,
+ .resume = bfin_kpad_resume,
};
static int __init bfin_kpad_init(void)
--
1.5.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-04-25 4:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-27 1:24 [PATCH 1/1] [INPUT/KEYBOARD] Blackfin BF54x: Add infrastructure for keypad wakeups Bryan Wu
2008-04-25 3:55 Bryan Wu
2008-04-25 4:06 ` Bryan Wu
2008-04-25 4:14 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).