[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMfQR8iM9be5Qg8+@google.com>
Date: Mon, 14 Jun 2021 14:55:19 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Alexander Sverdlin <alexander.sverdlin@...il.com>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
Nikita Shubin <nikita.shubin@...uefel.me>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/7] Input: ep93xx_keypad: Prepare clock before using it
Hi Alexander,
On Mon, Jun 14, 2021 at 01:30:37AM +0200, Alexander Sverdlin wrote:
> Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> to Common Clock Framework.
Can this be merged standalone?
>
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@...il.com>
> ---
> drivers/input/keyboard/ep93xx_keypad.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c
> index c8194333d612..e0e931e796fa 100644
> --- a/drivers/input/keyboard/ep93xx_keypad.c
> +++ b/drivers/input/keyboard/ep93xx_keypad.c
> @@ -157,7 +157,7 @@ static int ep93xx_keypad_open(struct input_dev *pdev)
>
> if (!keypad->enabled) {
> ep93xx_keypad_config(keypad);
> - clk_enable(keypad->clk);
> + clk_prepare_enable(keypad->clk);
> keypad->enabled = true;
> }
>
> @@ -169,7 +169,7 @@ static void ep93xx_keypad_close(struct input_dev *pdev)
> struct ep93xx_keypad *keypad = input_get_drvdata(pdev);
>
> if (keypad->enabled) {
> - clk_disable(keypad->clk);
> + clk_disable_unprepare(keypad->clk);
> keypad->enabled = false;
While we are at it, I wonder about handling suspend/resume. I see that
we disable the clock even if keyboard is configured as a wakeup source.
Is it really capable of waking up the system when clock is off?
Thanks.
--
Dmitry
Powered by blists - more mailing lists