linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alberto Panizzo <maramaopercheseimorto@gmail.com>
To: "Eric Bénard" <eric@eukrea.com>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] input/imx_keypad: add PM support
Date: Fri, 18 Jun 2010 12:16:26 +0200	[thread overview]
Message-ID: <1276856186.3146.5.camel@realization> (raw)
In-Reply-To: <1276801147-4103-1-git-send-email-eric@eukrea.com>

Hi Eric,

On gio, 2010-06-17 at 20:59 +0200, Eric Bénard wrote:
> We use keypad_data to enable wakeup from platform data
> 
> suspend/resume is tested on an i.MX27 when keypad is not
> in use and when it's is in use (in which case we immediatly
> get the key pressed at wakeup)
> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> Cc: maramaopercheseimorto@gmail.com
> Cc: linux-input@vger.kernel.org
> Cc: dmitry.torokhov@gmail.com
> Cc: linux-arm-kernel@lists.infradead.org
> ---
> v2 :
> 	- simplify suspend & resume functions
> 	- convert to pm_ops
> 
>  drivers/input/keyboard/imx_keypad.c |   40 +++++++++++++++++++++++++++++++++-
>  1 files changed, 38 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
> index d92c15c..9aa0005 100644
> --- a/drivers/input/keyboard/imx_keypad.c
> +++ b/drivers/input/keyboard/imx_keypad.c
> @@ -364,6 +364,38 @@ static void imx_keypad_inhibit(struct imx_keypad *keypad)
>  	writew(0xff00, keypad->mmio_base + KPCR);
>  }
>  
> +#ifdef CONFIG_PM
> +static int mxc_kpp_suspend(struct device *dev)
> +{
> +	struct platform_device *pdev = to_platform_device(dev);
> +	struct imx_keypad *keypad = platform_get_drvdata(pdev);
> +
> +	keypad->enabled = false;
> +	synchronize_irq(keypad->irq);
> +	disable_irq(keypad->irq);
> +	clk_disable(keypad->clk);
> +
> +	return 0;
> +}
> +
> +static int mxc_kpp_resume(struct device *dev)
> +{
> +	struct platform_device *pdev = to_platform_device(dev);
> +	struct imx_keypad *keypad = platform_get_drvdata(pdev);
> +
> +	keypad->enabled = true;
> +	clk_enable(keypad->clk);
> +	enable_irq(keypad->irq);
> +
> +	return 0;
> +}

Ok, so with this patch the keypad cannot wake the system?
It is scheduled another patch?


-- 
Alberto!

        Be Persistent!
                - Greg Kroah-Hartman (FOSDEM 2010)

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-06-18 10:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-17 18:59 [PATCH v2] input/imx_keypad: add PM support Eric Bénard
2010-06-18 10:16 ` Alberto Panizzo [this message]
2010-06-18 14:37   ` Eric Bénard
2010-06-18 17:40     ` Alberto Panizzo
2010-06-18 17:50       ` Eric Bénard
2010-06-24 16:39 ` Dmitry Torokhov

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=1276856186.3146.5.camel@realization \
    --to=maramaopercheseimorto@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=eric@eukrea.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).