From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
spear-devel@list.st.com,
Vipul Kumar Samar <vipulkumar.samar@st.com>
Subject: Re: [PATCH 2/3] Input: spear-keyboard: Add clk_{un}prepare() support
Date: Mon, 26 Nov 2012 08:56:09 -0800 [thread overview]
Message-ID: <20121126165609.GC14623@core.coreip.homeip.net> (raw)
In-Reply-To: <CAKohpon44N8uhEiPEp0Sp8rKAE597Y8A3-YsRFTAZZz4XE8hDw@mail.gmail.com>
On Mon, Nov 26, 2012 at 09:57:45PM +0530, Viresh Kumar wrote:
> On 20 November 2012 14:17, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> > No, not really, it just does not work well with devm_* patches that got
> > applied: on removal you unprepare clock as the very first operation and
> > then devm_* does the rest which is wrong order.
> >
> > I am looking at adding dem_* for clocks.
>
> I haven't seen your clock patch in your tree. I am asking because i want to
> push this patch :)
Yeah, I think I am not going to rush it and let it take its normal
course instead of short-cutting through my tree. I am going to apply the
patcch below in the meantime.
Thanks.
--
Dmitry
Input: spear-keyboard - Add clk_{un}prepare() support
From: Vipul Kumar Samar <vipulkumar.samar@st.com>
clk_{un}prepare is mandatory for platforms using common clock framework.
Because for SPEAr we don't do anything in clk_{un}prepare() calls, just
call them once in probe/remove.
Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/keyboard/spear-keyboard.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c
index d70093b..695d237 100644
--- a/drivers/input/keyboard/spear-keyboard.c
+++ b/drivers/input/keyboard/spear-keyboard.c
@@ -267,9 +267,14 @@ static int spear_kbd_probe(struct platform_device *pdev)
return error;
}
+ error = clk_prepare(kbd->clk);
+ if (error)
+ return error;
+
error = input_register_device(input_dev);
if (error) {
dev_err(&pdev->dev, "Unable to register keyboard device\n");
+ clk_unprepare(kbd->clk);
return error;
}
@@ -281,6 +286,11 @@ static int spear_kbd_probe(struct platform_device *pdev)
static int spear_kbd_remove(struct platform_device *pdev)
{
+ struct spear_kbd *kbd = platform_get_drvdata(pdev);
+
+ input_unregister_device(kbd->input);
+ clk_unprepare(kbd->clk);
+
device_init_wakeup(&pdev->dev, 0);
platform_set_drvdata(pdev, NULL);
next prev parent reply other threads:[~2012-11-26 16:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 13:40 [PATCH 1/3] input: spear-keyboard: Use devm_*() routines Viresh Kumar
2012-11-08 13:40 ` [PATCH 2/3] Input: spear-keyboard: Add clk_{un}prepare() support Viresh Kumar
2012-11-12 5:57 ` Viresh Kumar
2012-11-20 7:56 ` Viresh Kumar
2012-11-20 8:47 ` Dmitry Torokhov
2012-11-20 8:54 ` Viresh Kumar
2012-11-26 16:27 ` Viresh Kumar
2012-11-26 16:56 ` Dmitry Torokhov [this message]
2012-11-08 13:40 ` [PATCH 3/3] input: spear-keyboard: Fix for balancing the enable_irq_wake Viresh Kumar
2012-11-08 16:38 ` [PATCH 1/3] input: spear-keyboard: Use devm_*() routines Dmitry Torokhov
2012-11-09 2:36 ` Viresh Kumar
2012-11-09 3:03 ` Viresh Kumar
2012-11-09 5:33 ` Dmitry Torokhov
2012-11-09 17:05 ` Viresh Kumar
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=20121126165609.GC14623@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=spear-devel@list.st.com \
--cc=vipulkumar.samar@st.com \
--cc=viresh.kumar@linaro.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).