Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
Subsystems (3)
PATCH 1/1 Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
Use clk_prepare_enable/clk_disable_unprepare to make the driver work properly with common clock framework.
--- drivers/input/touchscreen/s3c2410_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/input/touchscreen/s3c2410_ts.c +4 -4
@@ -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 */
Signature · 1 line
2.0.0
PATCH 1/1 Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
Hi Vasily,
Quoted 8 lines · Vasily Khoruzhick
Use clk_prepare_enable/clk_disable_unprepare to make the driver work properly with common clock framework.
Signed-off-by Vasily Khoruzhick <[email protected]>--- drivers/input/touchscreen/s3c2410_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
--
Best regards,
Tomasz
Dmitry Torokhov
maintainerPATCH 1/1 Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
In reply to Vasily KhoruzhickQuoted 31 lines · Vasily Khoruzhick
Use clk_prepare_enable/clk_disable_unprepare to make the driver work properly with common clock framework.
Signed-off-by Vasily Khoruzhick <[email protected]>--- drivers/input/touchscreen/s3c2410_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/input/touchscreen/s3c2410_ts.c +2
-2@@ -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);
drivers/input/touchscreen/s3c2410_ts.c static int s3c2410ts_suspend(struct device *dev) · line 386
Quoted 5 lines
drivers/input/touchscreen/s3c2410_ts.c +1
-1@@ -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.
Quoted 15 lines
drivers/input/touchscreen/s3c2410_ts.c +1
-1return 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 */ Signature · 1 line
2.0.0
Signature · 1 line
Dmitry
PATCH 1/1 Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
On 8 July 2014 18:00:49 Dmitry Torokhov wrote:
Hi Dmitry,
Quoted 6 lines
Review
Quoted 3 lines
(quoted diff) +1
-1- 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
Dmitry Torokhov
maintainerPATCH 1/1 Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
Hi Vasily,
Quoted 5 lines · Vasily Khoruzhick
On 8 July 2014 18:00:49 Dmitry Torokhov wrote:
Hi Dmitry,
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +1
-1- 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.
Signature · 1 line
Dmitry
PATCH 1/1 Input: s3c2410_ts: Move to clk_prepare_enable/clk_disable_unprepare
Quoted 13 lines · On 22 July 2014 23:09:14 Dmitry Torokhov wrote:
Hi Vasily,
Quoted 10 lines · Vasily Khoruzhick
On 8 July 2014 18:00:49 Dmitry Torokhov wrote:
Hi Dmitry,
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +1
-1- clk_disable(ts.clock); + clk_disable_unprepare(ts.clock);Do we really need to unprepare on suspend? Why simply disabling is not enough here?
Quoted 4 lines
Quoted 2 lines
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
Quoted 2 lines
Thanks.