From: Fabio Estevam <festevam@gmail.com>
To: kernel@pengutronix.de
Cc: shawn.guo@freescale.com,
Fabio Estevam <fabio.estevam@freescale.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org
Subject: [PATCH 05/15] keyboard: imx_keypad: Use clk_prepare_enable/clk_disable_unprepare
Date: Fri, 25 May 2012 20:14:46 -0300 [thread overview]
Message-ID: <1337987696-31728-5-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1337987696-31728-1-git-send-email-festevam@gmail.com>
From: Fabio Estevam <fabio.estevam@freescale.com>
Prepare the clock before enabling it.
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: <linux-input@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/input/keyboard/imx_keypad.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
index 6ee7421..9d57945 100644
--- a/drivers/input/keyboard/imx_keypad.c
+++ b/drivers/input/keyboard/imx_keypad.c
@@ -378,7 +378,7 @@ static void imx_keypad_close(struct input_dev *dev)
imx_keypad_inhibit(keypad);
/* Disable clock unit */
- clk_disable(keypad->clk);
+ clk_disable_unprepare(keypad->clk);
}
static int imx_keypad_open(struct input_dev *dev)
@@ -391,7 +391,7 @@ static int imx_keypad_open(struct input_dev *dev)
keypad->enabled = true;
/* Enable the kpp clock */
- clk_enable(keypad->clk);
+ clk_prepare_enable(keypad->clk);
imx_keypad_config(keypad);
/* Sanity control, not all the rows must be actived now. */
@@ -581,7 +581,7 @@ static int imx_kbd_suspend(struct device *dev)
mutex_lock(&input_dev->mutex);
if (input_dev->users)
- clk_disable(kbd->clk);
+ clk_disable_unprepare(kbd->clk);
mutex_unlock(&input_dev->mutex);
@@ -603,7 +603,7 @@ static int imx_kbd_resume(struct device *dev)
mutex_lock(&input_dev->mutex);
if (input_dev->users)
- clk_enable(kbd->clk);
+ clk_prepare_enable(kbd->clk);
mutex_unlock(&input_dev->mutex);
--
1.7.1
next prev parent reply other threads:[~2012-05-25 23:15 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 23:14 [PATCH 01/15] ARM: mx5: Use clk_prepare_enable/clk_disable_unprepare Fabio Estevam
2012-05-25 23:14 ` [PATCH 02/15] ata: " Fabio Estevam
2012-05-29 9:17 ` Sascha Hauer
2012-06-06 3:40 ` Fabio Estevam
2012-06-08 15:49 ` Jeff Garzik
2012-05-25 23:14 ` [PATCH 03/15] hw_random: mxc-rnga: " Fabio Estevam
2012-05-26 11:29 ` Sascha Hauer
2012-05-25 23:14 ` [PATCH 04/15] dma: imx-sdma: " Fabio Estevam
2012-05-26 11:30 ` Sascha Hauer
2012-05-26 16:03 ` [PATCH v2 03/15] hw_random: mxc-rnga: " Fabio Estevam
2012-05-29 9:17 ` Sascha Hauer
2012-06-06 3:41 ` Fabio Estevam
2012-06-06 5:24 ` Herbert Xu
2012-05-25 23:14 ` Fabio Estevam [this message]
2012-05-29 9:18 ` [PATCH 05/15] keyboard: imx_keypad: " Sascha Hauer
2012-06-06 3:41 ` Fabio Estevam
2012-05-25 23:14 ` [PATCH 06/15] video: mx1_camera: " Fabio Estevam
2012-05-29 9:20 ` Sascha Hauer
2012-06-06 3:43 ` Fabio Estevam
2012-06-06 16:04 ` Guennadi Liakhovetski
2012-06-06 16:37 ` Fabio Estevam
2012-05-25 23:14 ` [PATCH 07/15] video: mx2_camera: " Fabio Estevam
2012-05-29 9:21 ` Sascha Hauer
2012-05-25 23:14 ` [PATCH 08/15] video: mx2_emmaprp: " Fabio Estevam
2012-05-29 9:21 ` Sascha Hauer
2012-05-25 23:14 ` [PATCH 09/15] nand: mxc_nand: " Fabio Estevam
2012-05-27 12:36 ` Artem Bityutskiy
2012-05-25 23:14 ` [PATCH 11/15] serial: mxs-auart: " Fabio Estevam
2012-06-11 2:36 ` Shawn Guo
2012-05-25 23:14 ` [PATCH 15/15] ASoC: mxs-saif: " Fabio Estevam
2012-05-28 14:51 ` Mark Brown
2012-05-28 15:21 ` Fabio Estevam
2012-05-28 15:24 ` Mark Brown
2012-05-26 11:28 ` [PATCH 01/15] ARM: mx5: " Sascha Hauer
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=1337987696-31728-5-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=fabio.estevam@freescale.com \
--cc=kernel@pengutronix.de \
--cc=linux-input@vger.kernel.org \
--cc=shawn.guo@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.