From: Kevin Hilman <khilman@deeprootsystems.com>
To: Abraham Arce <x0066660@ti.com>
Cc: linux-input@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH v6 8/8] Input: omap4 - pm runtime
Date: Thu, 30 Sep 2010 06:51:25 -0700 [thread overview]
Message-ID: <87aamzl4pu.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1285825000-25622-1-git-send-email-x0066660@ti.com> (Abraham Arce's message of "Thu, 30 Sep 2010 00:36:40 -0500")
Abraham Arce <x0066660@ti.com> writes:
> Enable pm runtime in driver
So power is enabled on probe and cut on _remove(). Did you consider
doing any more fine grained PM for this device? For example, cutting
power after some inactivity timer and re-enabling on a
keypress/interrupt?
Kevin
> Reviewed-by: Basak, Partha <p-basak2@ti.com>
> Signed-off-by: Abraham Arce <x0066660@ti.com>
> ---
> drivers/input/keyboard/omap4-keypad.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
> index 45bd097..ed47e9a 100644
> --- a/drivers/input/keyboard/omap4-keypad.c
> +++ b/drivers/input/keyboard/omap4-keypad.c
> @@ -29,6 +29,7 @@
> #include <linux/io.h>
> #include <linux/input.h>
> #include <linux/slab.h>
> +#include <linux/pm_runtime.h>
>
> #include <plat/omap4-keypad.h>
>
> @@ -239,6 +240,9 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev)
> matrix_keypad_build_keymap(pdata->keymap_data, row_shift,
> input_dev->keycode, input_dev->keybit);
>
> + pm_runtime_enable(&pdev->dev);
> + pm_runtime_get_sync(&pdev->dev);
> +
> omap4_keypad_config(keypad_data);
>
> error = request_irq(keypad_data->irq, omap4_keypad_interrupt,
> @@ -277,6 +281,9 @@ static int __devexit omap4_keypad_remove(struct platform_device *pdev)
> struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
> struct resource *res;
>
> + pm_runtime_put_sync(&pdev->dev);
> + pm_runtime_disable(&pdev->dev);
> +
> free_irq(keypad_data->irq, keypad_data);
> input_unregister_device(keypad_data->input);
next prev parent reply other threads:[~2010-09-30 13:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-30 5:36 [PATCH v6 8/8] Input: omap4 - pm runtime Abraham Arce
2010-09-30 13:51 ` Kevin Hilman [this message]
2010-10-01 5:31 ` Varadarajan, Charulatha
2010-12-06 13:00 ` Datta, Shubhrajyoti
2010-12-08 6:45 ` Basak, Partha
2010-12-08 21:11 ` Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aamzl4pu.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=x0066660@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox