* [PATCH] Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
@ 2014-06-30 19:09 Vasily Khoruzhick
2014-07-08 11:50 ` Tomasz Figa
2014-07-09 1:00 ` Dmitry Torokhov
0 siblings, 2 replies; 6+ messages in thread
From: Vasily Khoruzhick @ 2014-06-30 19:09 UTC (permalink / raw)
To: linux-arm-kernel
Use clk_prepare_enable/clk_disable_unprepare to make the driver
work properly with common clock framework.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
drivers/input/touchscreen/s3c2410_ts.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index 19cb247..c0e0baa 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -264,7 +264,7 @@ static int s3c2410ts_probe(struct platform_device *pdev)
return -ENOENT;
}
- clk_enable(ts.clock);
+ clk_prepare_enable(ts.clock);
dev_dbg(dev, "got and enabled clocks\n");
ts.irq_tc = ret = platform_get_irq(pdev, 0);
@@ -369,7 +369,7 @@ static int s3c2410ts_remove(struct platform_device *pdev)
free_irq(ts.irq_tc, ts.input);
del_timer_sync(&touch_timer);
- clk_disable(ts.clock);
+ clk_disable_unprepare(ts.clock);
clk_put(ts.clock);
input_unregister_device(ts.input);
@@ -383,7 +383,7 @@ static int s3c2410ts_suspend(struct device *dev)
{
writel(TSC_SLEEP, ts.io + S3C2410_ADCTSC);
disable_irq(ts.irq_tc);
- clk_disable(ts.clock);
+ clk_disable_unprepare(ts.clock);
return 0;
}
@@ -393,7 +393,7 @@ static int s3c2410ts_resume(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct s3c2410_ts_mach_info *info = dev_get_platdata(&pdev->dev);
- clk_enable(ts.clock);
+ clk_prepare_enable(ts.clock);
enable_irq(ts.irq_tc);
/* Initialise registers */
--
2.0.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
2014-06-30 19:09 [PATCH] Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare Vasily Khoruzhick
@ 2014-07-08 11:50 ` Tomasz Figa
2014-07-09 1:00 ` Dmitry Torokhov
1 sibling, 0 replies; 6+ messages in thread
From: Tomasz Figa @ 2014-07-08 11:50 UTC (permalink / raw)
To: linux-arm-kernel
Hi Vasily,
On 30.06.2014 21:09, Vasily Khoruzhick wrote:
> Use clk_prepare_enable/clk_disable_unprepare to make the driver
> work properly with common clock framework.
>
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> ---
> drivers/input/touchscreen/s3c2410_ts.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
--
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
2014-06-30 19:09 [PATCH] Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare Vasily Khoruzhick
2014-07-08 11:50 ` Tomasz Figa
@ 2014-07-09 1:00 ` Dmitry Torokhov
2014-07-09 9:13 ` Vasily Khoruzhick
1 sibling, 1 reply; 6+ messages in thread
From: Dmitry Torokhov @ 2014-07-09 1:00 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jun 30, 2014 at 10:09:37PM +0300, Vasily Khoruzhick wrote:
> Use clk_prepare_enable/clk_disable_unprepare to make the driver
> work properly with common clock framework.
>
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> ---
> drivers/input/touchscreen/s3c2410_ts.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
> index 19cb247..c0e0baa 100644
> --- a/drivers/input/touchscreen/s3c2410_ts.c
> +++ b/drivers/input/touchscreen/s3c2410_ts.c
> @@ -264,7 +264,7 @@ static int s3c2410ts_probe(struct platform_device *pdev)
> return -ENOENT;
> }
>
> - clk_enable(ts.clock);
> + clk_prepare_enable(ts.clock);
> dev_dbg(dev, "got and enabled clocks\n");
>
> ts.irq_tc = ret = platform_get_irq(pdev, 0);
> @@ -369,7 +369,7 @@ static int s3c2410ts_remove(struct platform_device *pdev)
> free_irq(ts.irq_tc, ts.input);
> del_timer_sync(&touch_timer);
>
> - clk_disable(ts.clock);
> + clk_disable_unprepare(ts.clock);
> clk_put(ts.clock);
>
> input_unregister_device(ts.input);
> @@ -383,7 +383,7 @@ static int s3c2410ts_suspend(struct device *dev)
> {
> writel(TSC_SLEEP, ts.io + S3C2410_ADCTSC);
> disable_irq(ts.irq_tc);
> - clk_disable(ts.clock);
> + clk_disable_unprepare(ts.clock);
Do we really need to unprepare on suspend? Why simply disabling is not
enough here?
Thanks.
>
> return 0;
> }
> @@ -393,7 +393,7 @@ static int s3c2410ts_resume(struct device *dev)
> struct platform_device *pdev = to_platform_device(dev);
> struct s3c2410_ts_mach_info *info = dev_get_platdata(&pdev->dev);
>
> - clk_enable(ts.clock);
> + clk_prepare_enable(ts.clock);
> enable_irq(ts.irq_tc);
>
> /* Initialise registers */
> --
> 2.0.0
>
--
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
2014-07-09 1:00 ` Dmitry Torokhov
@ 2014-07-09 9:13 ` Vasily Khoruzhick
2014-07-23 6:09 ` Dmitry Torokhov
0 siblings, 1 reply; 6+ messages in thread
From: Vasily Khoruzhick @ 2014-07-09 9:13 UTC (permalink / raw)
To: linux-arm-kernel
On 8 July 2014 18:00:49 Dmitry Torokhov wrote:
Hi Dmitry,
> >
> > - clk_disable(ts.clock);
> > + clk_disable_unprepare(ts.clock);
>
> Do we really need to unprepare on suspend? Why simply disabling is not
> enough here?
You're right, disabling should be enough here. I'll resend a patch after
testing on a hardware.
Regards
Vasily
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
2014-07-09 9:13 ` Vasily Khoruzhick
@ 2014-07-23 6:09 ` Dmitry Torokhov
2014-07-23 7:59 ` Vasily Khoruzhick
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Torokhov @ 2014-07-23 6:09 UTC (permalink / raw)
To: linux-arm-kernel
Hi Vasily,
On Wed, Jul 09, 2014 at 12:13:41PM +0300, Vasily Khoruzhick wrote:
> On 8 July 2014 18:00:49 Dmitry Torokhov wrote:
>
> Hi Dmitry,
>
> > >
> > > - clk_disable(ts.clock);
> > > + clk_disable_unprepare(ts.clock);
> >
> > Do we really need to unprepare on suspend? Why simply disabling is not
> > enough here?
>
> You're right, disabling should be enough here. I'll resend a patch after
> testing on a hardware.
I ended up cutting out suspend/resume parts and applying.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
2014-07-23 6:09 ` Dmitry Torokhov
@ 2014-07-23 7:59 ` Vasily Khoruzhick
0 siblings, 0 replies; 6+ messages in thread
From: Vasily Khoruzhick @ 2014-07-23 7:59 UTC (permalink / raw)
To: linux-arm-kernel
On 22 July 2014 23:09:14 Dmitry Torokhov wrote:
> Hi Vasily,
>
> On Wed, Jul 09, 2014 at 12:13:41PM +0300, Vasily Khoruzhick wrote:
> > On 8 July 2014 18:00:49 Dmitry Torokhov wrote:
> >
> > Hi Dmitry,
> >
> > > > - clk_disable(ts.clock);
> > > > + clk_disable_unprepare(ts.clock);
> > >
> > > Do we really need to unprepare on suspend? Why simply disabling is not
> > > enough here?
> >
> > You're right, disabling should be enough here. I'll resend a patch after
> > testing on a hardware.
>
> I ended up cutting out suspend/resume parts and applying.
Ah, I was about to send v2. I've tested a version with clk_disable/clk_enable
in suspend/resume parts, and it works OK for me.
Thanks!
Regards,
Vasily
>
> Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-23 7:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-30 19:09 [PATCH] Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare Vasily Khoruzhick
2014-07-08 11:50 ` Tomasz Figa
2014-07-09 1:00 ` Dmitry Torokhov
2014-07-09 9:13 ` Vasily Khoruzhick
2014-07-23 6:09 ` Dmitry Torokhov
2014-07-23 7:59 ` Vasily Khoruzhick
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).