linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andreas Kemnade <andreas@kemnade.info>
Cc: tony@atomide.com, frank.li@vivo.com,
	u.kleine-koenig@pengutronix.de, Jonathan.Cameron@huawei.com,
	robh@kernel.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] Input: omap4-keypad: react on keypresses if device is runtime-suspended
Date: Sat, 9 Dec 2023 22:42:37 -0800	[thread overview]
Message-ID: <ZXVd3RcTdHi3MifB@google.com> (raw)
In-Reply-To: <20231209112058.453030-1-andreas@kemnade.info>

Hi Andreas,

On Sat, Dec 09, 2023 at 12:20:58PM +0100, Andreas Kemnade wrote:
> According to SWPU235AB, table 26-6, fclk is required to generate events
> at least on OMAP4460, so keep fclk enabled all the time the device
> is opened.
> 
> Suggested-by: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> Reviewed-by: Tony Lindgren <tony@atomide.com>
> ---
> Changes since RFC:
> - add R-by:
> 
>  drivers/input/keyboard/omap4-keypad.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
> index d3f8688fdd9c3..7d83aff95617f 100644
> --- a/drivers/input/keyboard/omap4-keypad.c
> +++ b/drivers/input/keyboard/omap4-keypad.c
> @@ -11,6 +11,7 @@
>  #include <linux/module.h>
>  #include <linux/interrupt.h>
>  #include <linux/platform_device.h>
> +#include <linux/clk.h>
>  #include <linux/errno.h>
>  #include <linux/io.h>
>  #include <linux/of.h>
> @@ -83,6 +84,7 @@ struct omap4_keypad {
>  	bool no_autorepeat;
>  	u64 keys;
>  	unsigned short *keymap;
> +	struct clk *fck;
>  };
>  
>  static int kbd_readl(struct omap4_keypad *keypad_data, u32 offset)
> @@ -211,6 +213,8 @@ static int omap4_keypad_open(struct input_dev *input)
>  
>  	disable_irq(keypad_data->irq);
>  
> +	clk_prepare_enable(keypad_data->fck);

I believe this needs error handling.

Thanks.

-- 
Dmitry

      reply	other threads:[~2023-12-10  6:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-09 11:20 [PATCH RESEND] Input: omap4-keypad: react on keypresses if device is runtime-suspended Andreas Kemnade
2023-12-10  6:42 ` Dmitry Torokhov [this message]

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=ZXVd3RcTdHi3MifB@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andreas@kemnade.info \
    --cc=frank.li@vivo.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=tony@atomide.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).