lkml.org 
[lkml]   [2023]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND] Input: omap4-keypad: react on keypresses if device is runtime-suspended
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

\
 
 \ /
  Last update: 2023-12-10 07:43    [W:0.032 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site