Skip to contentSkip to conversation

Prepare various SH/R Mobile/Car drivers for CCF migration

PATCH In review Laurent Pinchart 16 participants 77 messages Oct 28, 2013 – Dec 14, 2013

Subsystems (12)
lore
Share & tools
lore
#0 lore raw

cover Prepare various SH/R Mobile/Car drivers for CCF migration

Hello,

This patch series, based on v3.12-rc7, prepares various Renesas SH-Mobile, R-Mobile and R-Car drivers for migration to CCF by adding clock prepare and unprepare support.

The patches are pretty straightforward. Most of the drivers called clk_enable and clk_disable in sleepable context, I've thus just converted them to clk_prepare_enable and clk_disable_unprepare.

The clocksource drivers were slightly more complex to handle as clk_enable and clk_disable were called in non-sleepable context. As the clocksource framework architecture doesn't provide any sleepable callback in which clocks could be prepared and unprepared, I've added clk_prepare and clk_unprepare calls in the probe and suspend/resume handlers (clocksources can't be removed so the remove handler doesn't need a clk_unprepare call).

I'd like to get all these patches merged in v3.14. As they will need to go through their respective subsystems' trees, I would appreciate if all maintainers involved could notify me when they merge patches from this series in their tree to help me tracking the merge status. I don't plan to send pull requests individually for these patches, and I will repost patches individually if changes are requested during review.

Cc Daniel Lezcano <[email protected]>
Cc Tejun Heo <[email protected]>
Cc David Airlie <[email protected]>
Cc Wolfram Sang <[email protected]>
Cc Chris Ball <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Yoshihiro Shimoda <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>

Laurent Pinchart (12):
clocksource: sh_cmt: Add clk_prepare/unprepare support
clocksource: sh_mtu2: Add clk_prepare/unprepare support
clocksource: sh_tmu: Add clk_prepare/unprepare support
sata_rcar: Convert to clk_prepare/unprepare
drm: shmob_drm: Convert to clk_prepare/unprepare
i2c: sh_mobile: Convert to clk_prepare/unprepare
mmc: sh_mmcif: Convert to clk_prepare/unprepare
mmc: sh_mobile_sdhi: Convert to clk_prepare/unprepare
usb: gadget: r8a66597-udc: Convert to clk_prepare/unprepare
usb: r8a66597-hcd: Convert to clk_prepare/unprepare
fbdev: shmobile-hdmi: Convert to clk_prepare/unprepare
fbdev: shmobile-lcdcfb: Convert to clk_prepare/unprepare

 drivers/ata/sata_rcar.c                   | 10 +++++-----
 drivers/clocksource/sh_cmt.c              | 20 ++++++++++++++++----
 drivers/clocksource/sh_mtu2.c             | 16 ++++++++++++++--
 drivers/clocksource/sh_tmu.c              | 20 +++++++++++++++++---
 drivers/gpu/drm/shmobile/shmob_drm_crtc.c |  4 ++--
 drivers/i2c/busses/i2c-sh_mobile.c        |  8 ++++----
 drivers/mmc/host/sh_mmcif.c               | 12 ++++++------
 drivers/mmc/host/sh_mobile_sdhi.c         |  4 ++--
 drivers/usb/gadget/r8a66597-udc.c         |  6 +++---
 drivers/usb/host/r8a66597-hcd.c           |  4 ++--
 drivers/video/sh_mobile_hdmi.c            |  6 +++---
 drivers/video/sh_mobile_lcdcfb.c          |  4 ++--
 12 files changed, 76 insertions(+), 38 deletions(-)
Signature · 3 lines
Regards,

Laurent Pinchart
#1 lore raw

PATCH 1/12 clocksource: sh_cmt: Add clk_prepare/unprepare support

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

---
 drivers/clocksource/sh_cmt.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
drivers/clocksource/sh_cmt.c +16 -4
index 0965e98..940341a 100644
@@ -634,12 +634,18 @@ static int sh_cmt_clock_event_next(unsigned long delta,
 
 static void sh_cmt_clock_event_suspend(struct clock_event_device *ced)
 {
-	pm_genpd_syscore_poweroff(&ced_to_sh_cmt(ced)->pdev->dev);
+	struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
+
+	pm_genpd_syscore_poweroff(&p->pdev->dev);
+	clk_unprepare(p->clk);
 }
 
 static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
 {
-	pm_genpd_syscore_poweron(&ced_to_sh_cmt(ced)->pdev->dev);
+	struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
+
+	clk_prepare(p->clk);
+	pm_genpd_syscore_poweron(&p->pdev->dev);
 }
 
 static void sh_cmt_register_clockevent(struct sh_cmt_priv *p,
@@ -737,6 +743,10 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
 		goto err2;
 	}
 
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err3;
+
 	if (res2 && (resource_size(res2) == 4)) {
 		/* assume both CMSTR and CMCSR to be 32-bit */
 		p->read_control = sh_cmt_read32;
@@ -773,19 +783,21 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
 			      cfg->clocksource_rating);
 	if (ret) {
 		dev_err(&p->pdev->dev, "registration failed\n");
-		goto err3;
+		goto err4;
 	}
 	p->cs_enabled = false;
 
 	ret = setup_irq(irq, &p->irqaction);
 	if (ret) {
 		dev_err(&p->pdev->dev, "failed to request irq %d\n", irq);
-		goto err3;
+		goto err4;
 	}
 
 	platform_set_drvdata(pdev, p);
 
 	return 0;
+err4:
+	clk_unprepare(p->clk);
 err3:
 	clk_put(p->clk);
 err2:
Signature · 1 line
1.8.1.5
#2 lore raw

Re: [PATCH 01/12] clocksource: sh_cmt: Add clk_prepare/unprepare support

Quoted 6 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org

Thanks Laurent,

I have queued this up in the clocksources branch of my renesas tree. I will send a pull request to Mike once v3.13-rc1 has hit the shelves. Mike, please let me know if you would prefer something earlier than that.

Quoted 72 lines
---
 drivers/clocksource/sh_cmt.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
drivers/clocksource/sh_cmt.c +16 -4
index 0965e98..940341a 100644
@@ -634,12 +634,18 @@ static int sh_cmt_clock_event_next(unsigned long delta,
 
 static void sh_cmt_clock_event_suspend(struct clock_event_device *ced)
 {
-	pm_genpd_syscore_poweroff(&ced_to_sh_cmt(ced)->pdev->dev);
+	struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
+
+	pm_genpd_syscore_poweroff(&p->pdev->dev);
+	clk_unprepare(p->clk);
 }
 
 static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
 {
-	pm_genpd_syscore_poweron(&ced_to_sh_cmt(ced)->pdev->dev);
+	struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
+
+	clk_prepare(p->clk);
+	pm_genpd_syscore_poweron(&p->pdev->dev);
 }
 
 static void sh_cmt_register_clockevent(struct sh_cmt_priv *p,
@@ -737,6 +743,10 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
 		goto err2;
 	}
 
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err3;
+
 	if (res2 && (resource_size(res2) == 4)) {
 		/* assume both CMSTR and CMCSR to be 32-bit */
 		p->read_control = sh_cmt_read32;
@@ -773,19 +783,21 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
 			      cfg->clocksource_rating);
 	if (ret) {
 		dev_err(&p->pdev->dev, "registration failed\n");
-		goto err3;
+		goto err4;
 	}
 	p->cs_enabled = false;
 
 	ret = setup_irq(irq, &p->irqaction);
 	if (ret) {
 		dev_err(&p->pdev->dev, "failed to request irq %d\n", irq);
-		goto err3;
+		goto err4;
 	}
 
 	platform_set_drvdata(pdev, p);
 
 	return 0;
+err4:
+	clk_unprepare(p->clk);
 err3:
 	clk_put(p->clk);
 err2:
Signature · 6 lines
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

Re: [PATCH 01/12] clocksource: sh_cmt: Add clk_prepare/unprepare support

Hi Simon,

Quoted 9 lines · On Tuesday 29 October 2013 14:55:35 Simon Horman wrote:
Quoted 7 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc: Daniel Lezcano <[email protected]>
Cc: [email protected]
Signed-off-by: Laurent Pinchart
<[email protected]>

Quoted 5 lines

Thanks Laurent,

I have queued this up in the clocksources branch of my renesas tree. I will send a pull request to Mike once v3.13-rc1 has hit the shelves. Mike, please let me know if you would prefer something earlier than that.

I thought the clocksource patches had to go through Daniel's tree. If you can take them directly that's easier, so I'm fine with that. Does this imply your Acked-by (for patches 01 to 03) ?

Quoted 69 lines
Quoted 69 lines

---

 drivers/clocksource/sh_cmt.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
drivers/clocksource/sh_cmt.c +0 -0
index 0965e98..940341a 100644
@@ -634,12 +634,18 @@ static int sh_cmt_clock_event_next(unsigned long

delta,>
static void sh_cmt_clock_event_suspend(struct clock_event_device *ced) {

drivers/clocksource/sh_cmt.c +8 -2
-	pm_genpd_syscore_poweroff(&ced_to_sh_cmt(ced)->pdev->dev);
+	struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
+
+	pm_genpd_syscore_poweroff(&p->pdev->dev);
+	clk_unprepare(p->clk);
 }
 
 static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
 {
-	pm_genpd_syscore_poweron(&ced_to_sh_cmt(ced)->pdev->dev);
+	struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
+
+	clk_prepare(p->clk);
+	pm_genpd_syscore_poweron(&p->pdev->dev);
 }
 
 static void sh_cmt_register_clockevent(struct sh_cmt_priv *p,
@@ -737,6 +743,10 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct

platform_device *pdev)>

drivers/clocksource/sh_cmt.c +4 -0
 		goto err2;
 	}
 
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err3;
+
 	if (res2 && (resource_size(res2) == 4)) {
 		/* assume both CMSTR and CMCSR to be 32-bit */
 		p->read_control = sh_cmt_read32;
@@ -773,19 +783,21 @@ static int sh_cmt_setup(struct sh_cmt_priv *p,

struct platform_device *pdev)>

drivers/clocksource/sh_cmt.c +4 -2
 			      cfg->clocksource_rating);
 	if (ret) {
 		dev_err(&p->pdev->dev, "registration failed\n");
-		goto err3;
+		goto err4;
 	}
 	p->cs_enabled = false;
 
 	ret = setup_irq(irq, &p->irqaction);
 	if (ret) {
 		dev_err(&p->pdev->dev, "failed to request irq %d\n", irq);
-		goto err3;
+		goto err4;
 	}
 
 	platform_set_drvdata(pdev, p);
 
 	return 0;
 
+err4:
+	clk_unprepare(p->clk);
 err3:
 	clk_put(p->clk);
 err2:
Signature · 3 lines
Regards,

Laurent Pinchart
Acked-by
#4 lore raw

Re: [PATCH 01/12] clocksource: sh_cmt: Add clk_prepare/unprepare support

Quoted 14 lines · Laurent Pinchart

Hi Simon,

Quoted 11 lines · On Tuesday 29 October 2013 14:55:35 Simon Horman wrote:
Quoted 7 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc: Daniel Lezcano <[email protected]>
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Thanks Laurent,

Quoted 7 lines
Quoted 3 lines

I have queued this up in the clocksources branch of my renesas tree. I will send a pull request to Mike once v3.13-rc1 has hit the shelves. Mike, please let me know if you would prefer something earlier than that.

I thought the clocksource patches had to go through Daniel's tree. If you can take them directly that's easier, so I'm fine with that. Does this imply your Acked-by (for patches 01 to 03) ?

Sorry, my mistake. The do go through Daniel. As a convenience I have been picking up Renesas clocksource patches and passing them on to Daniel. I'm happy to keep doing this. And I'm happy to go the next step and add some entries to MAINTAINERS if that is useful to others.

As I mentioned above I have queued these up (though not yet pushed them as I got bogged down yesterday afternoon). But if you would prefer Daniel to take them directly then please use the following:

Patches 01 - 03:

Quoted 80 lines
Quoted 70 lines
Quoted 70 lines

---

 drivers/clocksource/sh_cmt.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
drivers/clocksource/sh_cmt.c +0 -0
index 0965e98..940341a 100644
@@ -634,12 +634,18 @@ static int sh_cmt_clock_event_next(unsigned long

delta,>
static void sh_cmt_clock_event_suspend(struct clock_event_device *ced) {

drivers/clocksource/sh_cmt.c +8 -2
-	pm_genpd_syscore_poweroff(&ced_to_sh_cmt(ced)->pdev->dev);
+	struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
+
+	pm_genpd_syscore_poweroff(&p->pdev->dev);
+	clk_unprepare(p->clk);
 }
 
 static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
 {
-	pm_genpd_syscore_poweron(&ced_to_sh_cmt(ced)->pdev->dev);
+	struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
+
+	clk_prepare(p->clk);
+	pm_genpd_syscore_poweron(&p->pdev->dev);
 }
 
 static void sh_cmt_register_clockevent(struct sh_cmt_priv *p,
@@ -737,6 +743,10 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct

platform_device *pdev)>

drivers/clocksource/sh_cmt.c +4 -0
 		goto err2;
 	}
 
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err3;
+
 	if (res2 && (resource_size(res2) == 4)) {
 		/* assume both CMSTR and CMCSR to be 32-bit */
 		p->read_control = sh_cmt_read32;
@@ -773,19 +783,21 @@ static int sh_cmt_setup(struct sh_cmt_priv *p,

struct platform_device *pdev)>

drivers/clocksource/sh_cmt.c +4 -2
 			      cfg->clocksource_rating);
 	if (ret) {
 		dev_err(&p->pdev->dev, "registration failed\n");
-		goto err3;
+		goto err4;
 	}
 	p->cs_enabled = false;
 
 	ret = setup_irq(irq, &p->irqaction);
 	if (ret) {
 		dev_err(&p->pdev->dev, "failed to request irq %d\n", irq);
-		goto err3;
+		goto err4;
 	}
 
 	platform_set_drvdata(pdev, p);
 
 	return 0;
 
+err4:
+	clk_unprepare(p->clk);
 err3:
 	clk_put(p->clk);
 err2:
Signature · 8 lines
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

Re: [PATCH 01/12] clocksource: sh_cmt: Add clk_prepare/unprepare support

Hi Simon,

Quoted 28 lines · On Wednesday 30 October 2013 09:10:19 Simon Horman wrote:
Quoted 12 lines · Laurent Pinchart
Quoted 11 lines · On Tuesday 29 October 2013 14:55:35 Simon Horman wrote:
Quoted 7 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc: Daniel Lezcano <[email protected]>
Cc: [email protected]
Signed-off-by: Laurent Pinchart
<[email protected]>

Thanks Laurent,

Quoted 8 lines
Quoted 4 lines

I have queued this up in the clocksources branch of my renesas tree. I will send a pull request to Mike once v3.13-rc1 has hit the shelves. Mike, please let me know if you would prefer something earlier than that.

I thought the clocksource patches had to go through Daniel's tree. If you can take them directly that's easier, so I'm fine with that. Does this imply your Acked-by (for patches 01 to 03) ?

Sorry, my mistake. The do go through Daniel. As a convenience I have been picking up Renesas clocksource patches and passing them on to Daniel. I'm happy to keep doing this. And I'm happy to go the next step and add some entries to MAINTAINERS if that is useful to others.

Quoted 7 lines

As I mentioned above I have queued these up (though not yet pushed them as I got bogged down yesterday afternoon). But if you would prefer Daniel to take them directly then please use the following:

Patches 01 - 03:

I'm certainly fine with you picking the patches up, that would be helpful. Could I ask you to pick v2 up instead though ? :-)

Quoted 92 lines
Quoted 92 lines
Quoted 92 lines
Quoted 92 lines

---

 drivers/clocksource/sh_cmt.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
drivers/clocksource/sh_cmt.c +0 -0
index 0965e98..940341a 100644
@@ -634,12 +634,18 @@ static int sh_cmt_clock_event_next(unsigned long

delta,>

static void sh_cmt_clock_event_suspend(struct clock_event_device *ced)
{

drivers/clocksource/sh_cmt.c +8 -2
-	pm_genpd_syscore_poweroff(&ced_to_sh_cmt(ced)->pdev->dev);
+	struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
+
+	pm_genpd_syscore_poweroff(&p->pdev->dev);
+	clk_unprepare(p->clk);
 
 }
 
 static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
 {
 
-	pm_genpd_syscore_poweron(&ced_to_sh_cmt(ced)->pdev->dev);
+	struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
+
+	clk_prepare(p->clk);
+	pm_genpd_syscore_poweron(&p->pdev->dev);
 
 }
 
 static void sh_cmt_register_clockevent(struct sh_cmt_priv *p,
@@ -737,6 +743,10 @@ static int sh_cmt_setup(struct sh_cmt_priv *p,

struct
platform_device *pdev)>

drivers/clocksource/sh_cmt.c +4 -0
 		goto err2;
 
 	}
 
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err3;
+
 
 	if (res2 && (resource_size(res2) == 4)) {
 
 		/* assume both CMSTR and CMCSR to be 32-bit */
 		p->read_control = sh_cmt_read32;
@@ -773,19 +783,21 @@ static int sh_cmt_setup(struct sh_cmt_priv *p,

struct platform_device *pdev)>

drivers/clocksource/sh_cmt.c +4 -2
 			      cfg->clocksource_rating);
 
 	if (ret) {
 
 		dev_err(&p->pdev->dev, "registration failed\n");
 
-		goto err3;
+		goto err4;
 
 	}
 	p->cs_enabled = false;
 
 	ret = setup_irq(irq, &p->irqaction);
 	if (ret) {
 
 		dev_err(&p->pdev->dev, "failed to request irq %d\n", irq);
 
-		goto err3;
+		goto err4;
 
 	}
 
 	platform_set_drvdata(pdev, p);
 
 	return 0;
 
+err4:
+	clk_unprepare(p->clk);
 
 err3:
 	clk_put(p->clk);
 
 err2:
Signature · 3 lines
Regards,

Laurent Pinchart
#6 lore raw

Re: [PATCH 01/12] clocksource: sh_cmt: Add clk_prepare/unprepare support

Quoted 35 lines · Laurent Pinchart

Hi Simon,

Quoted 32 lines · On Wednesday 30 October 2013 09:10:19 Simon Horman wrote:
Quoted 12 lines · Laurent Pinchart
Quoted 11 lines · On Tuesday 29 October 2013 14:55:35 Simon Horman wrote:
Quoted 7 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc: Daniel Lezcano <[email protected]>
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Thanks Laurent,

Quoted 8 lines
Quoted 4 lines

I have queued this up in the clocksources branch of my renesas tree. I will send a pull request to Mike once v3.13-rc1 has hit the shelves. Mike, please let me know if you would prefer something earlier than that.

I thought the clocksource patches had to go through Daniel's tree. If you can take them directly that's easier, so I'm fine with that. Does this imply your Acked-by (for patches 01 to 03) ?

Sorry, my mistake. The do go through Daniel. As a convenience I have been picking up Renesas clocksource patches and passing them on to Daniel. I'm happy to keep doing this. And I'm happy to go the next step and add some entries to MAINTAINERS if that is useful to others.

As I mentioned above I have queued these up (though not yet pushed them as I got bogged down yesterday afternoon). But if you would prefer Daniel to take them directly then please use the following:

Quoted 6 lines
Quoted 3 lines

Patches 01 - 03:

I'm certainly fine with you picking the patches up, that would be helpful. Could I ask you to pick v2 up instead though ? :-)

Sure. I have dropped v1 and will pick up v2 when I see them.

#7 lore raw

PATCH 2/12 clocksource: sh_mtu2: Add clk_prepare/unprepare support

In reply to Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

---
 drivers/clocksource/sh_mtu2.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
drivers/clocksource/sh_mtu2.c +14 -2
index 4aac9ee..3cf1283 100644
@@ -313,8 +313,20 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
 		goto err1;
 	}
 
-	return sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
-				cfg->clockevent_rating);
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err2;
+
+	ret = sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
+			       cfg->clockevent_rating);
+	if (ret < 0)
+		goto err3;
+
+	return 0;
+ err3:
+	clk_unprepare(p->clk);
+ err2:
+	clk_put(p->clk);
  err1:
 	iounmap(p->mapbase);
  err0:
Signature · 1 line
1.8.1.5
#8 lore raw

Re: [PATCH 02/12] clocksource: sh_mtu2: Add clk_prepare/unprepare support

Quoted 9 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org
---
 drivers/clocksource/sh_mtu2.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

Thanks Laurent,

I have queued this up in the clocksources branch of my renesas tree. I will send a pull request to Mike once v3.13-rc1 has hit the shelves. Mike, please let me know if you would prefer something earlier than that.

#9 lore raw

Re: [PATCH 02/12] clocksource: sh_mtu2: Add clk_prepare/unprepare support

In reply to Laurent Pinchart

Hello.

Quoted 24 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org
---
  drivers/clocksource/sh_mtu2.c | 16 ++++++++++++++--
  1 file changed, 14 insertions(+), 2 deletions(-)
drivers/clocksource/sh_mtu2.c +4 -2
index 4aac9ee..3cf1283 100644
@@ -313,8 +313,20 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
  		goto err1;
  	}
 
-	return sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
-				cfg->clockevent_rating);
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err2;
+

drivers/clocksource/sh_mtu2.c static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev) · line 329

Quoted 10 lines
drivers/clocksource/sh_mtu2.c +10 -0
+	ret = sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
+			       cfg->clockevent_rating);
+	if (ret < 0)
+		goto err3;
+
+	return 0;
+ err3:
+	clk_unprepare(p->clk);
+ err2:
+	clk_put(p->clk);

This one seems to be a fix and so needs to be in a separate patch...

WBR, Sergei

#10 lore raw

Re: [PATCH 02/12] clocksource: sh_mtu2: Add clk_prepare/unprepare support

Hi Sergei,

Quoted 32 lines · On Tuesday 29 October 2013 15:15:09 Sergei Shtylyov wrote:
Quoted 31 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc: Daniel Lezcano <[email protected]>
Cc: [email protected]
Signed-off-by: Laurent Pinchart
<[email protected]>
---

  drivers/clocksource/sh_mtu2.c | 16 ++++++++++++++--
  1 file changed, 14 insertions(+), 2 deletions(-)
drivers/clocksource/sh_mtu2.c +0 -0
index 4aac9ee..3cf1283 100644
@@ -313,8 +313,20 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p,

struct platform_device *pdev)>
goto err1;
}

drivers/clocksource/sh_mtu2.c +8 -2
-	return sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
-				cfg->clockevent_rating);
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err2;
+
+	ret = sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
+			       cfg->clockevent_rating);
+	if (ret < 0)
+		goto err3;
Quoted 8 lines

drivers/clocksource/sh_mtu2.c static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev) · line 329

Quoted 6 lines
drivers/clocksource/sh_mtu2.c +6 -0
+
+	return 0;
+ err3:
+	clk_unprepare(p->clk);
+ err2:
+	clk_put(p->clk);

This one seems to be a fix and so needs to be in a separate patch...

I'll split the patch and repost (same for 03/12)

Signature · 3 lines
Regards,

Laurent Pinchart
#11 lore raw

PATCH v2 1/2 clocksource: sh_mtu2: Release clock when sh_mtu2_register() fails

In reply to Laurent Pinchart

Fix the probe error path to release the clock resource when the sh_mtu2_register() call fails.

---
 drivers/clocksource/sh_mtu2.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/clocksource/sh_mtu2.c +9 -2
index 4aac9ee..e6cfb32 100644
@@ -313,8 +313,15 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
 		goto err1;
 	}
 
-	return sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
-				cfg->clockevent_rating);
+	ret = sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
+			       cfg->clockevent_rating);
+	if (ret < 0)
+		goto err2;
+
+	return 0;
+
+ err2:
+	clk_put(p->clk);
  err1:
 	iounmap(p->mapbase);
  err0:
Signature · 1 line
1.8.1.5
#12 lore raw

PATCH v2 2/2 clocksource: sh_mtu2: Add clk_prepare/unprepare support

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

---
 drivers/clocksource/sh_mtu2.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/clocksource/sh_mtu2.c +7 -2
index e6cfb32..3cf1283 100644
@@ -313,13 +313,18 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
 		goto err1;
 	}
 
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err2;
+
 	ret = sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
 			       cfg->clockevent_rating);
 	if (ret < 0)
-		goto err2;
+		goto err3;
 
 	return 0;
-
+ err3:
+	clk_unprepare(p->clk);
  err2:
 	clk_put(p->clk);
  err1:
Signature · 1 line
1.8.1.5
#13 lore raw

Re: [PATCH v2 2/2] clocksource: sh_mtu2: Add clk_prepare/unprepare support

Quoted 6 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org

Thanks, I have queued this up.

#14 lore raw

Re: [PATCH v2 2/2] clocksource: sh_mtu2: Add clk_prepare/unprepare support

In reply to Laurent Pinchart
Quoted 6 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org

Applied in my tree as 3.13 fixes

Quoted 30 lines
---
  drivers/clocksource/sh_mtu2.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)
drivers/clocksource/sh_mtu2.c +7 -2
index e6cfb32..3cf1283 100644
@@ -313,13 +313,18 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
  		goto err1;
  	}
 
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err2;
+
  	ret = sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
  			       cfg->clockevent_rating);
  	if (ret < 0)
-		goto err2;
+		goto err3;
 
  	return 0;
-
+ err3:
+	clk_unprepare(p->clk);
   err2:
  	clk_put(p->clk);
   err1:
Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#16 lore raw

Re: [PATCH v2 1/2] clocksource: sh_mtu2: Release clock when sh_mtu2_register() fails

In reply to Laurent Pinchart
Quoted 6 lines · Laurent Pinchart

Fix the probe error path to release the clock resource when the sh_mtu2_register() call fails.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org

Applied in my tree as 3.13 fixes

Quoted 27 lines
---
  drivers/clocksource/sh_mtu2.c | 11 +++++++++--
  1 file changed, 9 insertions(+), 2 deletions(-)
drivers/clocksource/sh_mtu2.c +9 -2
index 4aac9ee..e6cfb32 100644
@@ -313,8 +313,15 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
  		goto err1;
  	}
 
-	return sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
-				cfg->clockevent_rating);
+	ret = sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
+			       cfg->clockevent_rating);
+	if (ret < 0)
+		goto err2;
+
+	return 0;
+
+ err2:
+	clk_put(p->clk);
   err1:
  	iounmap(p->mapbase);
   err0:
Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#17 lore raw

PATCH 3/12 clocksource: sh_tmu: Add clk_prepare/unprepare support

In reply to Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

---
 drivers/clocksource/sh_tmu.c | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
drivers/clocksource/sh_tmu.c +17 -3
index 78b8dae..63557cd 100644
@@ -472,12 +472,26 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
 		ret = PTR_ERR(p->clk);
 		goto err1;
 	}
+
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err2;
+
 	p->cs_enabled = false;
 	p->enable_count = 0;
 
-	return sh_tmu_register(p, (char *)dev_name(&p->pdev->dev),
-			       cfg->clockevent_rating,
-			       cfg->clocksource_rating);
+	ret = sh_tmu_register(p, (char *)dev_name(&p->pdev->dev),
+			      cfg->clockevent_rating,
+			      cfg->clocksource_rating);
+	if (ret < 0)
+		goto err3;
+
+	return 0;
+
+ err3:
+	clk_unprepare(p->clk);
+ err2:
+	clk_put(p->clk);
  err1:
 	iounmap(p->mapbase);
  err0:
Signature · 1 line
1.8.1.5
#18 lore raw

Re: [PATCH 03/12] clocksource: sh_tmu: Add clk_prepare/unprepare support

Quoted 9 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org
---
 drivers/clocksource/sh_tmu.c | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

Thanks Laurent,

I have queued this up in the clocksources branch of my renesas tree. I will send a pull request to Mike once v3.13-rc1 has hit the shelves. Mike, please let me know if you would prefer something earlier than that.

#19 lore raw

Re: [PATCH 03/12] clocksource: sh_tmu: Add clk_prepare/unprepare support

In reply to Laurent Pinchart
Quoted 31 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org
---
  drivers/clocksource/sh_tmu.c | 20 +++++++++++++++++---
  1 file changed, 17 insertions(+), 3 deletions(-)
drivers/clocksource/sh_tmu.c +7 -3
index 78b8dae..63557cd 100644
@@ -472,12 +472,26 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
  		ret = PTR_ERR(p->clk);
  		goto err1;
  	}
+
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err2;
+
  	p->cs_enabled = false;
  	p->enable_count = 0;
 
-	return sh_tmu_register(p, (char *)dev_name(&p->pdev->dev),
-			       cfg->clockevent_rating,
-			       cfg->clocksource_rating);
+	ret = sh_tmu_register(p, (char *)dev_name(&p->pdev->dev),
+			      cfg->clockevent_rating,

drivers/clocksource/sh_tmu.c static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev) · line 494

Quoted 10 lines
drivers/clocksource/sh_tmu.c +10 -0
+			      cfg->clocksource_rating);
+	if (ret < 0)
+		goto err3;
+
+	return 0;
+
+ err3:
+	clk_unprepare(p->clk);
+ err2:
+	clk_put(p->clk);

This one seems to be a fix, and should be done separately.

WBR, Sergei

#20 lore raw

PATCH v2 1/2 clocksource: sh_tmu: Release clock when sh_tmu_register() fails

In reply to Laurent Pinchart

Fix the probe error path to release the clock resource when the sh_tmu_register() call fails.

---
 drivers/clocksource/sh_tmu.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/clocksource/sh_tmu.c +10 -3
index 78b8dae..1597837 100644
@@ -475,9 +475,16 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
 	p->cs_enabled = false;
 	p->enable_count = 0;
 
-	return sh_tmu_register(p, (char *)dev_name(&p->pdev->dev),
-			       cfg->clockevent_rating,
-			       cfg->clocksource_rating);
+	ret = sh_tmu_register(p, (char *)dev_name(&p->pdev->dev),
+			      cfg->clockevent_rating,
+			      cfg->clocksource_rating);
+	if (ret < 0)
+		goto err2;
+
+	return 0;
+
+ err2:
+	clk_put(p->clk);
  err1:
 	iounmap(p->mapbase);
  err0:
Signature · 1 line
1.8.1.5
#21 lore raw

PATCH v2 2/2 clocksource: sh_tmu: Add clk_prepare/unprepare support

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

---
 drivers/clocksource/sh_tmu.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/clocksource/sh_tmu.c +8 -1
index 1597837..63557cd 100644
@@ -472,6 +472,11 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
 		ret = PTR_ERR(p->clk);
 		goto err1;
 	}
+
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err2;
+
 	p->cs_enabled = false;
 	p->enable_count = 0;
 
@@ -479,10 +484,12 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
 			      cfg->clockevent_rating,
 			      cfg->clocksource_rating);
 	if (ret < 0)
-		goto err2;
+		goto err3;
 
 	return 0;
 
+ err3:
+	clk_unprepare(p->clk);
  err2:
 	clk_put(p->clk);
  err1:
Signature · 1 line
1.8.1.5
#22 lore raw

Re: [PATCH v2 2/2] clocksource: sh_tmu: Add clk_prepare/unprepare support

Quoted 6 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org

Thanks, I have queued this up.

#23 lore raw

Re: [PATCH v2 2/2] clocksource: sh_tmu: Add clk_prepare/unprepare support

Quoted 9 lines · Simon Horman
Quoted 6 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org

Thanks, I have queued this up.

Ok, so those patches go through your tree, right ?

I have been out for the Linaro connect but I saw you picked them. In the future, I would prefer to take them in my tree as they fall under the drivers/clocksource maintainer's umbrella.

Thanks
-- Daniel

Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Acked-by
#24 lore raw

Re: [PATCH v2 2/2] clocksource: sh_tmu: Add clk_prepare/unprepare support

Quoted 9 lines · Daniel Lezcano
Quoted 8 lines · Simon Horman
Quoted 6 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org
Quoted 7 lines
Quoted 1 line

Thanks, I have queued this up.

Ok, so those patches go through your tree, right ?

I have been out for the Linaro connect but I saw you picked them. In the future, I would prefer to take them in my tree as they fall under the drivers/clocksource maintainer's umbrella.

I was planning to send a pull request to you.
But if you would rather just pick them up directly that is quite fine by me.

#25 lore raw

Re: [PATCH v2 2/2] clocksource: sh_tmu: Add clk_prepare/unprepare support

In reply to Laurent Pinchart
Quoted 6 lines · Laurent Pinchart

Prepare the clock at probe time, as there is no other appropriate place in the driver where we're allowed to sleep.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org

Applied in my tree as 3.13 fixes

Thanks Laurent.

-- Daniel

Quoted 35 lines
---
  drivers/clocksource/sh_tmu.c | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
drivers/clocksource/sh_tmu.c +8 -1
index 1597837..63557cd 100644
@@ -472,6 +472,11 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
  		ret = PTR_ERR(p->clk);
  		goto err1;
  	}
+
+	ret = clk_prepare(p->clk);
+	if (ret < 0)
+		goto err2;
+
  	p->cs_enabled = false;
  	p->enable_count = 0;
 
@@ -479,10 +484,12 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
  			      cfg->clockevent_rating,
  			      cfg->clocksource_rating);
  	if (ret < 0)
-		goto err2;
+		goto err3;
 
  	return 0;
 
+ err3:
+	clk_unprepare(p->clk);
   err2:
  	clk_put(p->clk);
   err1:
Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#27 lore raw

Re: [PATCH v2 1/2] clocksource: sh_tmu: Release clock when sh_tmu_register() fails

In reply to Laurent Pinchart
Quoted 6 lines · Laurent Pinchart

Fix the probe error path to release the clock resource when the sh_tmu_register() call fails.

Cc Daniel Lezcano <[email protected]>
Cc linux-kernel at vger.kernel.org

Applied in my tree as 3.13 fixes

Quoted 29 lines
---
  drivers/clocksource/sh_tmu.c | 13 ++++++++++---
  1 file changed, 10 insertions(+), 3 deletions(-)
drivers/clocksource/sh_tmu.c +10 -3
index 78b8dae..1597837 100644
@@ -475,9 +475,16 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
  	p->cs_enabled = false;
  	p->enable_count = 0;
 
-	return sh_tmu_register(p, (char *)dev_name(&p->pdev->dev),
-			       cfg->clockevent_rating,
-			       cfg->clocksource_rating);
+	ret = sh_tmu_register(p, (char *)dev_name(&p->pdev->dev),
+			      cfg->clockevent_rating,
+			      cfg->clocksource_rating);
+	if (ret < 0)
+		goto err2;
+
+	return 0;
+
+ err2:
+	clk_put(p->clk);
   err1:
  	iounmap(p->mapbase);
   err0:
Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#28 lore raw

PATCH 4/12 sata_rcar: Convert to clk_prepare/unprepare

In reply to Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Tejun Heo <[email protected]>
Cc linux-ide at vger.kernel.org
---
 drivers/ata/sata_rcar.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/ata/sata_rcar.c +5 -5
index c2d95e9..1dae9a9 100644
@@ -792,7 +792,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev, "failed to get access to sata clock\n");
 		return PTR_ERR(priv->clk);
 	}
-	clk_enable(priv->clk);
+	clk_prepare_enable(priv->clk);
 
 	host = ata_host_alloc(&pdev->dev, 1);
 	if (!host) {
@@ -822,7 +822,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
 		return 0;
 
 cleanup:
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);
 
 	return ret;
 }
@@ -841,7 +841,7 @@ static int sata_rcar_remove(struct platform_device *pdev)
 	iowrite32(0, base + SATAINTSTAT_REG);
 	iowrite32(0x7ff, base + SATAINTMASK_REG);
 
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);
 
 	return 0;
 }
@@ -861,7 +861,7 @@ static int sata_rcar_suspend(struct device *dev)
 		/* mask */
 		iowrite32(0x7ff, base + SATAINTMASK_REG);
 
-		clk_disable(priv->clk);
+		clk_disable_unprepare(priv->clk);
 	}
 
 	return ret;
@@ -873,7 +873,7 @@ static int sata_rcar_resume(struct device *dev)
 	struct sata_rcar_priv *priv = host->private_data;
 	void __iomem *base = priv->base;
 
-	clk_enable(priv->clk);
+	clk_prepare_enable(priv->clk);
 
 	/* ack and mask */
 	iowrite32(0, base + SATAINTSTAT_REG);
Signature · 1 line
1.8.1.5
Applied
#29 lore raw

PATCH 4/12 sata_rcar: Convert to clk_prepare/unprepare

Quoted 7 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Tejun Heo <[email protected]>
Cc linux-ide at vger.kernel.org

Applied to libata/for-3.13.

Thanks.

Signature · 1 line
tejun
#30 lore raw

PATCH 5/12 drm: shmob_drm: Convert to clk_prepare/unprepare

In reply to Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

---
 drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/shmobile/shmob_drm_crtc.c +2 -2
index 54bad98..562f9a4 100644
@@ -40,7 +40,7 @@
 static void shmob_drm_clk_on(struct shmob_drm_device *sdev)
 {
 	if (sdev->clock)
-		clk_enable(sdev->clock);
+		clk_prepare_enable(sdev->clock);
 #if 0
 	if (sdev->meram_dev && sdev->meram_dev->pdev)
 		pm_runtime_get_sync(&sdev->meram_dev->pdev->dev);
@@ -54,7 +54,7 @@ static void shmob_drm_clk_off(struct shmob_drm_device *sdev)
 		pm_runtime_put_sync(&sdev->meram_dev->pdev->dev);
 #endif
 	if (sdev->clock)
-		clk_disable(sdev->clock);
+		clk_disable_unprepare(sdev->clock);
 }
 
 /* -----------------------------------------------------------------------------
Signature · 1 line
1.8.1.5
#31 lore raw

Re: [PATCH 05/12] drm: shmob_drm: Convert to clk_prepare/unprepare

Hi Dave,

Could you please pick this patch up ?

Quoted 34 lines · On Monday 28 October 2013 23:49:22 Laurent Pinchart wrote:

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

---
 drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 54bad98..562f9a4 100644

drivers/gpu/drm/shmobile/shmob_drm_crtc.c +2 -3
@@ -40,7 +40,7 @@
 static void shmob_drm_clk_on(struct shmob_drm_device *sdev)
 {
 	if (sdev->clock)
-		clk_enable(sdev->clock);
+		clk_prepare_enable(sdev->clock);
 #if 0
 	if (sdev->meram_dev && sdev->meram_dev->pdev)
 		pm_runtime_get_sync(&sdev->meram_dev->pdev->dev);
@@ -54,7 +54,7 @@ static void shmob_drm_clk_off(struct shmob_drm_device
 *sdev) pm_runtime_put_sync(&sdev->meram_dev->pdev->dev);
 #endif
 	if (sdev->clock)
-		clk_disable(sdev->clock);
+		clk_disable_unprepare(sdev->clock);
 }
 
 /*
---------------------------------------------------------------------------
Signature · 3 lines
Regards,

Laurent Pinchart
#32 lore raw

Re: [PATCH 05/12] drm: shmob_drm: Convert to clk_prepare/unprepare

Quoted 16 lines · Laurent Pinchart

Hi Dave,

Could you please pick this patch up ?

Quoted 11 lines · On Monday 28 October 2013 23:49:22 Laurent Pinchart wrote:

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

---
 drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 10 lines

drivers/gpu/drm/shmobile/shmob_drm_crtc.c line 43

Quoted 10 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 54bad98..562f9a4 100644

drivers/gpu/drm/shmobile/shmob_drm_crtc.c +1 -1
@@ -40,7 +40,7 @@
 static void shmob_drm_clk_on(struct shmob_drm_device *sdev)
 {
 	if (sdev->clock)
-		clk_enable(sdev->clock);
+		clk_prepare_enable(sdev->clock);

Sorry for jumping in so late, but shouldn't this be split into two separate calls, clk_prepare() in .probe() and clk_enable() here?

Also note that both clk_prepare() and clk_enable() (and therefore clk_prepare_enable() as well) can fail, so you should really check the return values here.

Quoted 9 lines

drivers/gpu/drm/shmobile/shmob_drm_crtc.c static void shmob_drm_clk_off(struct shmob_drm_device · line 57

Quoted 9 lines
drivers/gpu/drm/shmobile/shmob_drm_crtc.c +1 -1
 #if 0
 	if (sdev->meram_dev && sdev->meram_dev->pdev)
 		pm_runtime_get_sync(&sdev->meram_dev->pdev->dev);
@@ -54,7 +54,7 @@ static void shmob_drm_clk_off(struct shmob_drm_device
 *sdev) pm_runtime_put_sync(&sdev->meram_dev->pdev->dev);
 #endif
 	if (sdev->clock)
-		clk_disable(sdev->clock);
+		clk_disable_unprepare(sdev->clock);

Similarily I'd expect this to be clk_disable() only, with the clk_unprepare() in .remove(). Or perhaps there's a very good reason to do both here?

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#33 lore raw

Re: [PATCH 05/12] drm: shmob_drm: Convert to clk_prepare/unprepare

Hi Thierry,

Quoted 19 lines · On Monday 11 November 2013 09:55:24 Thierry Reding wrote:
Quoted 18 lines · Laurent Pinchart

Hi Dave,

Could you please pick this patch up ?

Quoted 13 lines · On Monday 28 October 2013 23:49:22 Laurent Pinchart wrote:

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: David Airlie <[email protected]>
Cc: [email protected]
Signed-off-by: Laurent Pinchart
<[email protected]>
---

 drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 14 lines
Quoted 11 lines

drivers/gpu/drm/shmobile/shmob_drm_crtc.c line 43

Quoted 11 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 54bad98..562f9a4 100644

drivers/gpu/drm/shmobile/shmob_drm_crtc.c +1 -1
@@ -40,7 +40,7 @@
 static void shmob_drm_clk_on(struct shmob_drm_device *sdev)
 {
 	if (sdev->clock)
-		clk_enable(sdev->clock);
+		clk_prepare_enable(sdev->clock);

Sorry for jumping in so late, but shouldn't this be split into two separate calls, clk_prepare() in .probe() and clk_enable() here?

The clock prepare and enable operations are split to allow clock implementations to sleep. Clocks should be kept disable whenever possible, the clk_enable() and clk_disable() calls should be as close as possible to the time range during which the clock needs to be enabled. This means that those calls might happen in a context where sleeping isn't allowed. If a clock implementation needs to sleep to enable the clock (by performing an I2C access for instance), that operation should be performed at prepare time.

Quoted 1 line

From a clock user point of view, both clk_prepare() and clk_enable() should be

called as late as possible. If clk_enable() needs to be called in an atomic context clk_prepare() must be called earlier, in a non-atomic context(). Otherwise there'e no point in splitting the two calls.

Quoted 3 lines

Also note that both clk_prepare() and clk_enable() (and therefore clk_prepare_enable() as well) can fail, so you should really check the return values here.

Yes, that's a good point. I'd like to fix that in a separate patch in order to avoid delaying this one.

Quoted 14 lines
Quoted 10 lines

drivers/gpu/drm/shmobile/shmob_drm_crtc.c static void shmob_drm_clk_off(struct shmob_drm_device · line 58

Quoted 10 lines
drivers/gpu/drm/shmobile/shmob_drm_crtc.c +1 -1
 #if 0
 	if (sdev->meram_dev && sdev->meram_dev->pdev)
 		pm_runtime_get_sync(&sdev->meram_dev->pdev->dev);
@@ -54,7 +54,7 @@ static void shmob_drm_clk_off(struct shmob_drm_device
 *sdev)
 	pm_runtime_put_sync(&sdev->meram_dev->pdev->dev);
 #endif
 	if (sdev->clock)
-		clk_disable(sdev->clock);
+		clk_disable_unprepare(sdev->clock);

Similarily I'd expect this to be clk_disable() only, with the clk_unprepare() in .remove(). Or perhaps there's a very good reason to do both here?

Signature · 3 lines
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#34 lore raw

PATCH 6/12 i2c: sh_mobile: Convert to clk_prepare/unprepare

In reply to Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Wolfram Sang <[email protected]>
Cc linux-i2c at vger.kernel.org
---
 drivers/i2c/busses/i2c-sh_mobile.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/i2c/busses/i2c-sh_mobile.c +4 -4
index 55110dd..1d79585 100644
@@ -235,7 +235,7 @@ static void sh_mobile_i2c_init(struct sh_mobile_i2c_data *pd)
 	int offset;
 
 	/* Get clock rate after clock is enabled */
-	clk_enable(pd->clk);
+	clk_prepare_enable(pd->clk);
 	i2c_clk_khz = clk_get_rate(pd->clk) / 1000;
 	i2c_clk_khz /= pd->clks_per_count;
 
@@ -270,14 +270,14 @@ static void sh_mobile_i2c_init(struct sh_mobile_i2c_data *pd)
 		pd->icic &= ~ICIC_ICCHB8;
 
 out:
-	clk_disable(pd->clk);
+	clk_disable_unprepare(pd->clk);
 }
 
 static void activate_ch(struct sh_mobile_i2c_data *pd)
 {
 	/* Wake up device and enable clock */
 	pm_runtime_get_sync(pd->dev);
-	clk_enable(pd->clk);
+	clk_prepare_enable(pd->clk);
 
 	/* Enable channel and configure rx ack */
 	iic_set_clr(pd, ICCR, ICCR_ICE, 0);
@@ -300,7 +300,7 @@ static void deactivate_ch(struct sh_mobile_i2c_data *pd)
 	iic_set_clr(pd, ICCR, 0, ICCR_ICE);
 
 	/* Disable clock and mark device as idle */
-	clk_disable(pd->clk);
+	clk_disable_unprepare(pd->clk);
 	pm_runtime_put_sync(pd->dev);
 }
 
Signature · 1 line
1.8.1.5
#35 lore raw

PATCH 6/12 i2c: sh_mobile: Convert to clk_prepare/unprepare

Quoted 7 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Wolfram Sang <[email protected]>
Cc linux-i2c at vger.kernel.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131029/d0a42f57/attachment.sig>

#36 lore raw

PATCH 6/12 i2c: sh_mobile: Convert to clk_prepare/unprepare

Quoted 10 lines · Wolfram Sang
Quoted 7 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Wolfram Sang <[email protected]>
Cc linux-i2c at vger.kernel.org

Hi Wolfram, Hi Laurent,

correct me if I am wrong, but I think the plan was for Wolfram to take this patch.

#37 lore raw

PATCH 6/12 i2c: sh_mobile: Convert to clk_prepare/unprepare

Hi Simon,

Quoted 11 lines · On Tuesday 29 October 2013 14:58:07 Simon Horman wrote:
Quoted 10 lines · Wolfram Sang
Quoted 8 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Wolfram Sang <[email protected]>
Cc: linux-i2c at vger.kernel.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Quoted 6 lines
Quoted 1 line

Hi Wolfram, Hi Laurent,

correct me if I am wrong, but I think the plan was for Wolfram to take this patch.

That's correct. All patches in this series will need to go through their respective maintainers' git trees. It's going to be slightly painful to track on my side, but that means less work on your side :-)

As mentioned in the cover letter, I won't send a pull request for this series, so I expect all maintainers involved to pick their share of patches from the list.

Signature · 3 lines
Regards,

Laurent Pinchart
Applied
#38 lore raw

PATCH 6/12 i2c: sh_mobile: Convert to clk_prepare/unprepare

In reply to Laurent Pinchart
Quoted 7 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Wolfram Sang <[email protected]>
Cc linux-i2c at vger.kernel.org

Applied to for-next, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131031/e7f337c0/attachment.sig>

#39 lore raw

PATCH 7/12 mmc: sh_mmcif: Convert to clk_prepare/unprepare

In reply to Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

---
 drivers/mmc/host/sh_mmcif.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/mmc/host/sh_mmcif.c +6 -6
index 36629a0..37a6c57 100644
@@ -964,7 +964,7 @@ static void sh_mmcif_request(struct mmc_host *mmc, struct mmc_request *mrq)
 
 static int sh_mmcif_clk_update(struct sh_mmcif_host *host)
 {
-	int ret = clk_enable(host->hclk);
+	int ret = clk_prepare_enable(host->hclk);
 
 	if (!ret) {
 		host->clk = clk_get_rate(host->hclk);
@@ -1018,7 +1018,7 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 		}
 		if (host->power) {
 			pm_runtime_put_sync(&host->pd->dev);
-			clk_disable(host->hclk);
+			clk_disable_unprepare(host->hclk);
 			host->power = false;
 			if (ios->power_mode == MMC_POWER_OFF)
 				sh_mmcif_set_power(host, ios);
@@ -1466,7 +1466,7 @@ static int sh_mmcif_probe(struct platform_device *pdev)
 
 	mutex_init(&host->thread_lock);
 
-	clk_disable(host->hclk);
+	clk_disable_unprepare(host->hclk);
 	ret = mmc_add_host(mmc);
 	if (ret < 0)
 		goto emmcaddh;
@@ -1487,7 +1487,7 @@ ereqirq1:
 ereqirq0:
 	pm_runtime_suspend(&pdev->dev);
 eresume:
-	clk_disable(host->hclk);
+	clk_disable_unprepare(host->hclk);
 eclkupdate:
 	clk_put(host->hclk);
 eclkget:
@@ -1505,7 +1505,7 @@ static int sh_mmcif_remove(struct platform_device *pdev)
 	int irq[2];
 
 	host->dying = true;
-	clk_enable(host->hclk);
+	clk_prepare_enable(host->hclk);
 	pm_runtime_get_sync(&pdev->dev);
 
 	dev_pm_qos_hide_latency_limit(&pdev->dev);
@@ -1530,7 +1530,7 @@ static int sh_mmcif_remove(struct platform_device *pdev)
 	if (irq[1] >= 0)
 		free_irq(irq[1], host);
 
-	clk_disable(host->hclk);
+	clk_disable_unprepare(host->hclk);
 	mmc_free_host(host->mmc);
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
Signature · 1 line
1.8.1.5
#40 lore raw

PATCH 7/12 mmc: sh_mmcif: Convert to clk_prepare/unprepare

Quoted 8 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Chris Ball <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc linux-mmc at vger.kernel.org

Thanks
Guennadi

Quoted 65 lines
---
 drivers/mmc/host/sh_mmcif.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/mmc/host/sh_mmcif.c +6 -6
index 36629a0..37a6c57 100644
@@ -964,7 +964,7 @@ static void sh_mmcif_request(struct mmc_host *mmc, struct mmc_request *mrq)
 
 static int sh_mmcif_clk_update(struct sh_mmcif_host *host)
 {
-	int ret = clk_enable(host->hclk);
+	int ret = clk_prepare_enable(host->hclk);
 
 	if (!ret) {
 		host->clk = clk_get_rate(host->hclk);
@@ -1018,7 +1018,7 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 		}
 		if (host->power) {
 			pm_runtime_put_sync(&host->pd->dev);
-			clk_disable(host->hclk);
+			clk_disable_unprepare(host->hclk);
 			host->power = false;
 			if (ios->power_mode == MMC_POWER_OFF)
 				sh_mmcif_set_power(host, ios);
@@ -1466,7 +1466,7 @@ static int sh_mmcif_probe(struct platform_device *pdev)
 
 	mutex_init(&host->thread_lock);
 
-	clk_disable(host->hclk);
+	clk_disable_unprepare(host->hclk);
 	ret = mmc_add_host(mmc);
 	if (ret < 0)
 		goto emmcaddh;
@@ -1487,7 +1487,7 @@ ereqirq1:
 ereqirq0:
 	pm_runtime_suspend(&pdev->dev);
 eresume:
-	clk_disable(host->hclk);
+	clk_disable_unprepare(host->hclk);
 eclkupdate:
 	clk_put(host->hclk);
 eclkget:
@@ -1505,7 +1505,7 @@ static int sh_mmcif_remove(struct platform_device *pdev)
 	int irq[2];
 
 	host->dying = true;
-	clk_enable(host->hclk);
+	clk_prepare_enable(host->hclk);
 	pm_runtime_get_sync(&pdev->dev);
 
 	dev_pm_qos_hide_latency_limit(&pdev->dev);
@@ -1530,7 +1530,7 @@ static int sh_mmcif_remove(struct platform_device *pdev)
 	if (irq[1] >= 0)
 		free_irq(irq[1], host);
 
-	clk_disable(host->hclk);
+	clk_disable_unprepare(host->hclk);
 	mmc_free_host(host->mmc);
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
Signature · 1 line
1.8.1.5

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#41 lore raw

PATCH 7/12 mmc: sh_mmcif: Convert to clk_prepare/unprepare

Quoted 6 lines · Guennadi Liakhovetski
Quoted 4 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Quoted 6 lines
Quoted 4 lines
Cc Chris Ball <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc linux-mmc at vger.kernel.org

Sorry, I just realised, that an identical patch

http://patches.linaro.org/21212/

has been submitted prior to this one, so, we should really take the other one.

Thanks
Guennadi

Quoted 58 lines
Quoted 58 lines
---
 drivers/mmc/host/sh_mmcif.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/mmc/host/sh_mmcif.c +5 -5
index 36629a0..37a6c57 100644
@@ -964,7 +964,7 @@ static void sh_mmcif_request(struct mmc_host *mmc, struct mmc_request *mrq)
 
 static int sh_mmcif_clk_update(struct sh_mmcif_host *host)
 {
-	int ret = clk_enable(host->hclk);
+	int ret = clk_prepare_enable(host->hclk);
 
 	if (!ret) {
 		host->clk = clk_get_rate(host->hclk);
@@ -1018,7 +1018,7 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 		}
 		if (host->power) {
 			pm_runtime_put_sync(&host->pd->dev);
-			clk_disable(host->hclk);
+			clk_disable_unprepare(host->hclk);
 			host->power = false;
 			if (ios->power_mode == MMC_POWER_OFF)
 				sh_mmcif_set_power(host, ios);
@@ -1466,7 +1466,7 @@ static int sh_mmcif_probe(struct platform_device *pdev)
 
 	mutex_init(&host->thread_lock);
 
-	clk_disable(host->hclk);
+	clk_disable_unprepare(host->hclk);
 	ret = mmc_add_host(mmc);
 	if (ret < 0)
 		goto emmcaddh;
@@ -1487,7 +1487,7 @@ ereqirq1:
 ereqirq0:
 	pm_runtime_suspend(&pdev->dev);
 eresume:
-	clk_disable(host->hclk);
+	clk_disable_unprepare(host->hclk);
 eclkupdate:
 	clk_put(host->hclk);
 eclkget:
@@ -1505,7 +1505,7 @@ static int sh_mmcif_remove(struct platform_device *pdev)
 	int irq[2];
 
 	host->dying = true;
-	clk_enable(host->hclk);
+	clk_prepare_enable(host->hclk);
 	pm_runtime_get_sync(&pdev->dev);
 
 	dev_pm_qos_hide_latency_limit(&pdev->dev);
@@ -1530,7 +1530,7 @@ static int sh_mmcif_remove(struct platform_device *pdev)
 	if (irq[1] >= 0)
 		free_irq(irq[1], host);
 
Quoted 14 lines
Quoted 8 lines
drivers/mmc/host/sh_mmcif.c +1 -1
-	clk_disable(host->hclk);
+	clk_disable_unprepare(host->hclk);
 	mmc_free_host(host->mmc);
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
Signature · 1 line
1.8.1.5

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#42 lore raw

PATCH 7/12 mmc: sh_mmcif: Convert to clk_prepare/unprepare

Hi Guennadi,

Quoted 12 lines · On Wednesday 30 October 2013 23:23:37 Guennadi Liakhovetski wrote:
Quoted 11 lines · Guennadi Liakhovetski
Quoted 9 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Chris Ball <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: linux-mmc at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>

Quoted 8 lines
Quoted 1 line

Sorry, I just realised, that an identical patch

http://patches.linaro.org/21212/

has been submitted prior to this one, so, we should really take the other one.

I'm fine with that, as long as one of the two patches hit mainline as soon as possible.

Signature · 3 lines
Regards,

Laurent Pinchart
#43 lore raw

PATCH 7/12 mmc: sh_mmcif: Convert to clk_prepare/unprepare

Quoted 19 lines · Laurent Pinchart

Hi Guennadi,

Quoted 16 lines · On Wednesday 30 October 2013 23:23:37 Guennadi Liakhovetski wrote:
Quoted 5 lines · Guennadi Liakhovetski
Quoted 4 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Quoted 7 lines
Quoted 5 lines

Cc: Chris Ball <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: linux-mmc at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>

Sorry, I just realised, that an identical patch

Quoted 7 lines
Quoted 4 lines

http://patches.linaro.org/21212/

has been submitted prior to this one, so, we should really take the other one.

I'm fine with that, as long as one of the two patches hit mainline as soon as possible.

I can put together a new pull request for Chris asap, but in the end it will be his call to take it now or later.

Kind regards
Ulf Hansson

Quoted 10 lines

--
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#44 lore raw

PATCH 7/12 mmc: sh_mmcif: Convert to clk_prepare/unprepare

Hi Uluf,

Quoted 20 lines · On Thursday 31 October 2013 00:27:23 Ulf Hansson wrote:
Quoted 19 lines · Laurent Pinchart
Quoted 18 lines · On Wednesday 30 October 2013 23:23:37 Guennadi Liakhovetski wrote:
Quoted 5 lines · Guennadi Liakhovetski
Quoted 4 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Quoted 7 lines
Quoted 5 lines

Cc: Chris Ball <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: [email protected]
Signed-off-by: Laurent Pinchart <[email protected]>

Sorry, I just realised, that an identical patch

http://patches.linaro.org/21212/

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

has been submitted prior to this one, so, we should really take the other one.

I'm fine with that, as long as one of the two patches hit mainline as soon as possible.

I can put together a new pull request for Chris asap, but in the end it will be his call to take it now or later.

That would be great. It can wait for v3.14 though, but having the patch in v3.13 would be nice.

Signature · 3 lines
Regards,

Laurent Pinchart
#45 lore raw

PATCH 8/12 mmc: sh_mobile_sdhi: Convert to clk_prepare/unprepare

In reply to Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Chris Ball <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc linux-mmc at vger.kernel.org
---
 drivers/mmc/host/sh_mobile_sdhi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/sh_mobile_sdhi.c +2 -2
index f344659..ed1718a 100644
@@ -54,7 +54,7 @@ static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data);
-	int ret = clk_enable(priv->clk);
+	int ret = clk_prepare_enable(priv->clk);
 	if (ret < 0)
 		return ret;
 
@@ -67,7 +67,7 @@ static void sh_mobile_sdhi_clk_disable(struct platform_device *pdev)
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data);
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);
 }
 
 static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host)
Signature · 1 line
1.8.1.5
#46 lore raw

PATCH 8/12 mmc: sh_mobile_sdhi: Convert to clk_prepare/unprepare

Quoted 8 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Chris Ball <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc linux-mmc at vger.kernel.org

Thanks
Guennadi

Quoted 29 lines
---
 drivers/mmc/host/sh_mobile_sdhi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/sh_mobile_sdhi.c +2 -2
index f344659..ed1718a 100644
@@ -54,7 +54,7 @@ static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data);
-	int ret = clk_enable(priv->clk);
+	int ret = clk_prepare_enable(priv->clk);
 	if (ret < 0)
 		return ret;
 
@@ -67,7 +67,7 @@ static void sh_mobile_sdhi_clk_disable(struct platform_device *pdev)
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data);
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);
 }
 
 static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host)
Signature · 1 line
1.8.1.5

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#47 lore raw

PATCH 8/12 mmc: sh_mobile_sdhi: Convert to clk_prepare/unprepare

Hi Chris,

Could you please pick this patch up ?

Quoted 50 lines · On Tuesday 29 October 2013 09:09:37 Guennadi Liakhovetski wrote:
Quoted 9 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Chris Ball <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: linux-mmc at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>

Thanks
Guennadi

Quoted 34 lines

---

 drivers/mmc/host/sh_mobile_sdhi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/mmc/host/sh_mobile_sdhi.c index f344659..ed1718a 100644

drivers/mmc/host/sh_mobile_sdhi.c +0 -0
@@ -54,7 +54,7 @@ static int sh_mobile_sdhi_clk_enable(struct

platform_device *pdev, unsigned int>

drivers/mmc/host/sh_mobile_sdhi.c +1 -1
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
 	sh_mobile_sdhi, mmc_data);> 
-	int ret = clk_enable(priv->clk);
+	int ret = clk_prepare_enable(priv->clk);
 
 	if (ret < 0)
 
 		return ret;
@@ -67,7 +67,7 @@ static void sh_mobile_sdhi_clk_disable(struct

platform_device *pdev)>

drivers/mmc/host/sh_mobile_sdhi.c +1 -1
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
 	sh_mobile_sdhi, mmc_data);> 
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);
 
 }
 
 static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host)
Signature · 3 lines
Regards,

Laurent Pinchart
#48 lore raw

PATCH 8/12 mmc: sh_mobile_sdhi: Convert to clk_prepare/unprepare

Hi Chris,

Quoted 3 lines · On Saturday 09 November 2013 13:56:40 Laurent Pinchart wrote:

Hi Chris,

Could you please pick this patch up ?

Ping ?

As this patch is a dependency for other series that will go through different trees, could you please provide a stable branch in your tree with this patch included that you will push to v3.14 ?

Quoted 48 lines · On Tuesday 29 October 2013 09:09:37 Guennadi Liakhovetski wrote:
Quoted 47 lines · Laurent Pinchart
Quoted 9 lines

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Chris Ball <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: [email protected]
Signed-off-by: Laurent Pinchart <[email protected]>

Thanks
Guennadi

Quoted 31 lines

---

 drivers/mmc/host/sh_mobile_sdhi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/mmc/host/sh_mobile_sdhi.c index f344659..ed1718a 100644

drivers/mmc/host/sh_mobile_sdhi.c +0 -0
@@ -54,7 +54,7 @@ static int sh_mobile_sdhi_clk_enable(struct

platform_device *pdev, unsigned int>

drivers/mmc/host/sh_mobile_sdhi.c +1 -1
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
 	sh_mobile_sdhi, mmc_data);
-	int ret = clk_enable(priv->clk);
+	int ret = clk_prepare_enable(priv->clk);
 	if (ret < 0)
 		return ret;
@@ -67,7 +67,7 @@ static void sh_mobile_sdhi_clk_disable(struct

platform_device *pdev)>

drivers/mmc/host/sh_mobile_sdhi.c +1 -1
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
 	sh_mobile_sdhi, mmc_data);
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);
 }
 
 static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host)
Signature · 3 lines
Regards,

Laurent Pinchart
#49 lore raw

PATCH 8/12 mmc: sh_mobile_sdhi: Convert to clk_prepare/unprepare

Hi Chris,

Quoted 6 lines · On Tuesday 26 November 2013 03:02:48 Laurent Pinchart wrote:
Quoted 3 lines · On Saturday 09 November 2013 13:56:40 Laurent Pinchart wrote:

Hi Chris,

Could you please pick this patch up ?

Ping ?

PING ?

Quoted 54 lines

As this patch is a dependency for other series that will go through different trees, could you please provide a stable branch in your tree with this patch included that you will push to v3.14 ?

Quoted 50 lines · On Tuesday 29 October 2013 09:09:37 Guennadi Liakhovetski wrote:
Quoted 49 lines · Laurent Pinchart
Quoted 9 lines

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Chris Ball <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: linux-mmc at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>

Thanks
Guennadi

Quoted 33 lines

---

 drivers/mmc/host/sh_mobile_sdhi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/mmc/host/sh_mobile_sdhi.c index f344659..ed1718a 100644

drivers/mmc/host/sh_mobile_sdhi.c +0 -0
@@ -54,7 +54,7 @@ static int sh_mobile_sdhi_clk_enable(struct

platform_device *pdev, unsigned int

drivers/mmc/host/sh_mobile_sdhi.c +2 -2
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
 	sh_mobile_sdhi, mmc_data);
 
-	int ret = clk_enable(priv->clk);
+	int ret = clk_prepare_enable(priv->clk);
 	if (ret < 0)
 		return ret;
@@ -67,7 +67,7 @@ static void sh_mobile_sdhi_clk_disable(struct
 platform_device *pdev)
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
 	sh_mobile_sdhi, mmc_data);
 
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);

}

static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host)

Signature · 3 lines
Regards,

Laurent Pinchart
#50 lore raw

PATCH 8/12 mmc: sh_mobile_sdhi: Convert to clk_prepare/unprepare

Hi Laurent,

Quoted 1 line · Laurent Pinchart

PING ?

I'm sorry about the delay -- it's in mmc-next for 3.14 now.

- Chris.

Signature · 1 line
Chris Ball   <[email protected]>   <http://printf.net/>
#51 lore raw

PATCH 8/12 mmc: sh_mobile_sdhi: Convert to clk_prepare/unprepare

Hi Chris,

Quoted 6 lines · On Wednesday 11 December 2013 20:29:56 Chris Ball wrote:

Hi Laurent,

Quoted 1 line · Laurent Pinchart

PING ?

I'm sorry about the delay -- it's in mmc-next for 3.14 now.

Thanks a lot and sorry about shouting. Don't worry about the delay, I only wanted to make sure the patch would get in v3.14.

Now, if you wanted to review (and hopefully apply) the following patches as well that would be perfect :-)

[PATCH v3 1/3] mmc: sh_mmcif: Factorize DMA channel request and configuration code
[PATCH v3 2/3] mmc: sh_mmcif: Fix compilation warning on 64-bit platforms
mmc: sdhi: Enable driver compilation with COMPILE_TEST
mmc: sh_mmcif: Enable driver compilation with COMPILE_TEST

(Please note that "[PATCH v3 3/3] mmc: sh_mmcif: Enable the driver on all ARM platforms" has been superseded by "mmc: sh_mmcif: Enable driver compilation with COMPILE_TEST")

Signature · 3 lines
Regards,

Laurent Pinchart
#52 lore raw

PATCH 8/12 mmc: sh_mobile_sdhi: Convert to clk_prepare/unprepare

Hi Laurent,

Quoted 4 lines · Laurent Pinchart
Quoted 1 line

I'm sorry about the delay -- it's in mmc-next for 3.14 now.

Thanks a lot and sorry about shouting. Don't worry about the delay, I only wanted to make sure the patch would get in v3.14.

No worries, it was deserved yelling. :-)

Quoted 3 lines

[PATCH v3 1/3] mmc: sh_mmcif: Factorize DMA channel request and configuration code
[PATCH v3 2/3] mmc: sh_mmcif: Fix compilation warning on 64-bit platforms

These two are in mmc-next now too. (I usually wait for someone with SH hardware to ACK, but I understand that Guennadi's not around as much anymore.)

- Chris.

Signature · 1 line
Chris Ball   <[email protected]>   <http://printf.net/>
#53 lore raw

PATCH 8/12 mmc: sh_mobile_sdhi: Convert to clk_prepare/unprepare

Quoted 10 lines · Chris Ball

Hi Laurent,

Quoted 4 lines · Laurent Pinchart
Quoted 1 line

I'm sorry about the delay -- it's in mmc-next for 3.14 now.

Thanks a lot and sorry about shouting. Don't worry about the delay, I only wanted to make sure the patch would get in v3.14.

No worries, it was deserved yelling. :-)

Quoted 7 lines
Quoted 3 lines

[PATCH v3 1/3] mmc: sh_mmcif: Factorize DMA channel request and configuration code
[PATCH v3 2/3] mmc: sh_mmcif: Fix compilation warning on 64-bit platforms

These two are in mmc-next now too. (I usually wait for someone with SH hardware to ACK, but I understand that Guennadi's not around as much anymore.)

I believe I can provide such Acks going forwards.

#54 lore raw

PATCH 9/12 usb: gadget: r8a66597-udc: Convert to clk_prepare/unprepare

In reply to Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Felipe Balbi <[email protected]>
Cc linux-usb at vger.kernel.org
---
 drivers/usb/gadget/r8a66597-udc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/gadget/r8a66597-udc.c +3 -3
index 68be48d..4728751 100644
@@ -1833,7 +1833,7 @@ static int __exit r8a66597_remove(struct platform_device *pdev)
 	r8a66597_free_request(&r8a66597->ep[0].ep, r8a66597->ep0_req);
 
 	if (r8a66597->pdata->on_chip) {
-		clk_disable(r8a66597->clk);
+		clk_disable_unprepare(r8a66597->clk);
 		clk_put(r8a66597->clk);
 	}
 
@@ -1931,7 +1931,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
 			ret = PTR_ERR(r8a66597->clk);
 			goto clean_up;
 		}
-		clk_enable(r8a66597->clk);
+		clk_prepare_enable(r8a66597->clk);
 	}
 
 	if (r8a66597->pdata->sudmac) {
@@ -1996,7 +1996,7 @@ clean_up3:
 	free_irq(irq, r8a66597);
 clean_up2:
 	if (r8a66597->pdata->on_chip) {
-		clk_disable(r8a66597->clk);
+		clk_disable_unprepare(r8a66597->clk);
 		clk_put(r8a66597->clk);
 	}
 clean_up:
Signature · 1 line
1.8.1.5
#55 lore raw

PATCH 9/12 usb: gadget: r8a66597-udc: Convert to clk_prepare/unprepare

Hi Laurent-san,

Quoted 7 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Felipe Balbi <[email protected]>
Cc linux-usb at vger.kernel.org

Thank you for the patch.

Best regards,
Yoshihro Shimoda

Quoted 36 lines
---
 drivers/usb/gadget/r8a66597-udc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/gadget/r8a66597-udc.c +3 -3
index 68be48d..4728751 100644
@@ -1833,7 +1833,7 @@ static int __exit r8a66597_remove(struct platform_device *pdev)
 	r8a66597_free_request(&r8a66597->ep[0].ep, r8a66597->ep0_req);
 
 	if (r8a66597->pdata->on_chip) {
-		clk_disable(r8a66597->clk);
+		clk_disable_unprepare(r8a66597->clk);
 		clk_put(r8a66597->clk);
 	}
 
@@ -1931,7 +1931,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
 			ret = PTR_ERR(r8a66597->clk);
 			goto clean_up;
 		}
-		clk_enable(r8a66597->clk);
+		clk_prepare_enable(r8a66597->clk);
 	}
 
 	if (r8a66597->pdata->sudmac) {
@@ -1996,7 +1996,7 @@ clean_up3:
 	free_irq(irq, r8a66597);
 clean_up2:
 	if (r8a66597->pdata->on_chip) {
-		clk_disable(r8a66597->clk);
+		clk_disable_unprepare(r8a66597->clk);
 		clk_put(r8a66597->clk);
 	}
 clean_up:
Signature · 2 lines
Yoshihiro Shimoda
EC No.
#56 lore raw

PATCH 9/12 usb: gadget: r8a66597-udc: Convert to clk_prepare/unprepare

Hi Felipe,

Quoted 7 lines · Yoshihiro

Hi Laurent-san,

Quoted 4 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Quoted 8 lines
Quoted 4 lines

Cc: Felipe Balbi <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Thank you for the patch.

Could you please pick this patch up ?

Quoted 50 lines
Quoted 50 lines

---

 drivers/usb/gadget/r8a66597-udc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/drivers/usb/gadget/r8a66597-udc.c index 68be48d..4728751 100644

drivers/usb/gadget/r8a66597-udc.c +0 -0
@@ -1833,7 +1833,7 @@ static int __exit r8a66597_remove(struct

platform_device *pdev)>

drivers/usb/gadget/r8a66597-udc.c +1 -1
 	r8a66597_free_request(&r8a66597->ep[0].ep, r8a66597->ep0_req);
 
 	if (r8a66597->pdata->on_chip) {
 
-		clk_disable(r8a66597->clk);
+		clk_disable_unprepare(r8a66597->clk);
 
 		clk_put(r8a66597->clk);
 
 	}
@@ -1931,7 +1931,7 @@ static int __init r8a66597_probe(struct

platform_device *pdev)>

drivers/usb/gadget/r8a66597-udc.c +2 -2
 			ret = PTR_ERR(r8a66597->clk);
 			goto clean_up;
 
 		}
 
-		clk_enable(r8a66597->clk);
+		clk_prepare_enable(r8a66597->clk);
 
 	}
 
 	if (r8a66597->pdata->sudmac) {
@@ -1996,7 +1996,7 @@ clean_up3:
 	free_irq(irq, r8a66597);
 
 clean_up2:
 	if (r8a66597->pdata->on_chip) {
 
-		clk_disable(r8a66597->clk);
+		clk_disable_unprepare(r8a66597->clk);
 
drivers/usb/gadget/r8a66597-udc.c +0 -0
 		clk_put(r8a66597->clk);
 
 	}
 
 clean_up:
Signature · 3 lines
Regards,

Laurent Pinchart
#57 lore raw

PATCH 9/12 usb: gadget: r8a66597-udc: Convert to clk_prepare/unprepare

Quoted 15 lines · Laurent Pinchart

Hi Felipe,

Quoted 12 lines · Yoshihiro

Hi Laurent-san,

Quoted 8 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Felipe Balbi <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Quoted 5 lines
Quoted 3 lines

Thank you for the patch.

Could you please pick this patch up ?

after -rc1 is out, I don't see why not.

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131111/c35ede67/attachment-0001.sig>
#58 lore raw

PATCH 9/12 usb: gadget: r8a66597-udc: Convert to clk_prepare/unprepare

Hi Felipe,

Quoted 16 lines · On Monday 11 November 2013 13:53:31 Felipe Balbi wrote:
Quoted 15 lines · Laurent Pinchart

Hi Felipe,

Quoted 12 lines · Yoshihiro

Hi Laurent-san,

Quoted 8 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Felipe Balbi <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Thank you for the patch.

Could you please pick this patch up ?

after -rc1 is out, I don't see why not.

Great then :-)

As this patch is a dependency for other series that will go through different trees, could you please provide a stable branch in your tree with this patch included that you will push to v3.14 ?

Signature · 10 lines
Regards,

Laurent Pinchart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131126/48349950/attachment.sig>
#59 lore raw

PATCH 9/12 usb: gadget: r8a66597-udc: Convert to clk_prepare/unprepare

Hi,

Quoted 16 lines · Laurent Pinchart
Quoted 16 lines
Quoted 15 lines
Quoted 5 lines
Quoted 4 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Quoted 8 lines
Quoted 4 lines

Cc: Felipe Balbi <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Thank you for the patch.

Could you please pick this patch up ?

Quoted 7 lines
Quoted 1 line

after -rc1 is out, I don't see why not.

Great then :-)

As this patch is a dependency for other series that will go through different trees, could you please provide a stable branch in your tree with this patch included that you will push to v3.14 ?

You guys are always killing me with those "stable branch" requests :-)

I'll get one up tomorrow. I guess I can avoid a topic branch altogether if I just make this the first patch in "next" branch. I could push only $subject for now until you merge then I'll push other stuff. Is that enough for you ? My 'next' is always immutable.

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131125/c950acae/attachment.sig>
#60 lore raw

PATCH 9/12 usb: gadget: r8a66597-udc: Convert to clk_prepare/unprepare

Hi Felipe,

Quoted 28 lines · On Monday 25 November 2013 20:12:39 Felipe Balbi wrote:

Hi,

Quoted 17 lines · Laurent Pinchart
Quoted 17 lines
Quoted 16 lines
Quoted 6 lines
Quoted 5 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable()
and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Quoted 8 lines
Quoted 4 lines

Cc: Felipe Balbi <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Thank you for the patch.

Could you please pick this patch up ?

Quoted 7 lines
Quoted 1 line

after -rc1 is out, I don't see why not.

Great then :-)

As this patch is a dependency for other series that will go through different trees, could you please provide a stable branch in your tree with this patch included that you will push to v3.14 ?

Quoted 6 lines

You guys are always killing me with those "stable branch" requests :-)

I'll get one up tomorrow. I guess I can avoid a topic branch altogether if I just make this the first patch in "next" branch. I could push only $subject for now until you merge then I'll push other stuff. Is that enough for you ? My 'next' is always immutable.

That sounds good, thank you. You can already push the other patches without waiting for me, I can dig the commit ID of the first patch in your next branch.

Signature · 10 lines
Regards,

Laurent Pinchart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131126/98b503eb/attachment.sig>
#61 lore raw

PATCH 9/12 usb: gadget: r8a66597-udc: Convert to clk_prepare/unprepare

Quoted 33 lines · Laurent Pinchart

Hi Felipe,

Quoted 30 lines · On Monday 25 November 2013 20:12:39 Felipe Balbi wrote:

Hi,

Quoted 17 lines · Laurent Pinchart
Quoted 17 lines
Quoted 16 lines
Quoted 6 lines
Quoted 5 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable()
and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Quoted 8 lines
Quoted 4 lines

Cc: Felipe Balbi <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Thank you for the patch.

Could you please pick this patch up ?

Quoted 7 lines
Quoted 1 line

after -rc1 is out, I don't see why not.

Great then :-)

As this patch is a dependency for other series that will go through different trees, could you please provide a stable branch in your tree with this patch included that you will push to v3.14 ?

You guys are always killing me with those "stable branch" requests :-)

Quoted 8 lines
Quoted 4 lines

I'll get one up tomorrow. I guess I can avoid a topic branch altogether if I just make this the first patch in "next" branch. I could push only $subject for now until you merge then I'll push other stuff. Is that enough for you ? My 'next' is always immutable.

That sounds good, thank you. You can already push the other patches without waiting for me, I can dig the commit ID of the first patch in your next branch.

pushed, btw. you should have received my automatic email. If you merge my next, you'll get only that commit. I believe tomorrow I'll be able to push more commits into next.

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131126/e3f14858/attachment.sig>
#62 lore raw

PATCH 9/12 usb: gadget: r8a66597-udc: Convert to clk_prepare/unprepare

Hi Felipe,

Quoted 36 lines · On Tuesday 26 November 2013 13:54:22 Felipe Balbi wrote:
Quoted 35 lines · Laurent Pinchart
Quoted 33 lines · On Monday 25 November 2013 20:12:39 Felipe Balbi wrote:
Quoted 18 lines · Laurent Pinchart
Quoted 18 lines
Quoted 17 lines
Quoted 7 lines
Quoted 6 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable()
and clk_disable_unprepare() to get ready for the migration to the
common clock framework.

Quoted 8 lines
Quoted 4 lines

Cc: Felipe Balbi <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Thank you for the patch.

Could you please pick this patch up ?

Quoted 7 lines
Quoted 1 line

after -rc1 is out, I don't see why not.

Great then :-)

As this patch is a dependency for other series that will go through different trees, could you please provide a stable branch in your tree with this patch included that you will push to v3.14 ?

You guys are always killing me with those "stable branch" requests :-)

I'll get one up tomorrow. I guess I can avoid a topic branch altogether if I just make this the first patch in "next" branch. I could push only $subject for now until you merge then I'll push other stuff. Is that enough for you ? My 'next' is always immutable.

Quoted 5 lines
Quoted 3 lines

That sounds good, thank you. You can already push the other patches without waiting for me, I can dig the commit ID of the first patch in your next branch.

pushed, btw. you should have received my automatic email.

I have, thank you.

Quoted 2 lines

If you merge my next, you'll get only that commit. I believe tomorrow I'll be able to push more commits into next.

I've asked Simon Horman (the Renesas SoC kernel maintainer) to merge your next branch in his tree.

Signature · 10 lines
Regards,

Laurent Pinchart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131126/b12b2a0e/attachment.sig>
#63 lore raw

PATCH 10/12 usb: r8a66597-hcd: Convert to clk_prepare/unprepare

In reply to Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Greg Kroah-Hartman <[email protected]>
Cc Yoshihiro Shimoda <[email protected]>
Cc linux-usb at vger.kernel.org
---
 drivers/usb/host/r8a66597-hcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/r8a66597-hcd.c +2 -2
index 2ad004a..a2fdd85 100644
@@ -95,7 +95,7 @@ static int r8a66597_clock_enable(struct r8a66597 *r8a66597)
 	int i = 0;
 
 	if (r8a66597->pdata->on_chip) {
-		clk_enable(r8a66597->clk);
+		clk_prepare_enable(r8a66597->clk);
 		do {
 			r8a66597_write(r8a66597, SCKE, SYSCFG0);
 			tmp = r8a66597_read(r8a66597, SYSCFG0);
@@ -139,7 +139,7 @@ static void r8a66597_clock_disable(struct r8a66597 *r8a66597)
 	udelay(1);
 
 	if (r8a66597->pdata->on_chip) {
-		clk_disable(r8a66597->clk);
+		clk_disable_unprepare(r8a66597->clk);
 	} else {
 		r8a66597_bclr(r8a66597, PLLC, SYSCFG0);
 		r8a66597_bclr(r8a66597, XCKE, SYSCFG0);
Signature · 1 line
1.8.1.5
#64 lore raw

PATCH 10/12 usb: r8a66597-hcd: Convert to clk_prepare/unprepare

Hi Laurent-san,

Quoted 8 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Greg Kroah-Hartman <[email protected]>
Cc Yoshihiro Shimoda <[email protected]>
Cc linux-usb at vger.kernel.org

Thank you for the patch.

Best regards,
Yoshihro Shimoda

Quoted 27 lines
---
 drivers/usb/host/r8a66597-hcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/r8a66597-hcd.c +2 -2
index 2ad004a..a2fdd85 100644
@@ -95,7 +95,7 @@ static int r8a66597_clock_enable(struct r8a66597 *r8a66597)
 	int i = 0;
 
 	if (r8a66597->pdata->on_chip) {
-		clk_enable(r8a66597->clk);
+		clk_prepare_enable(r8a66597->clk);
 		do {
 			r8a66597_write(r8a66597, SCKE, SYSCFG0);
 			tmp = r8a66597_read(r8a66597, SYSCFG0);
@@ -139,7 +139,7 @@ static void r8a66597_clock_disable(struct r8a66597 *r8a66597)
 	udelay(1);
 
 	if (r8a66597->pdata->on_chip) {
-		clk_disable(r8a66597->clk);
+		clk_disable_unprepare(r8a66597->clk);
 	} else {
 		r8a66597_bclr(r8a66597, PLLC, SYSCFG0);
 		r8a66597_bclr(r8a66597, XCKE, SYSCFG0);
Signature · 2 lines
Yoshihiro Shimoda
EC No.
#65 lore raw

PATCH 10/12 usb: r8a66597-hcd: Convert to clk_prepare/unprepare

Hi Greg,

Quoted 13 lines · Yoshihiro

Hi Laurent-san,

Quoted 9 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Yoshihiro Shimoda <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>

Quoted 3 lines

Thank you for the patch.

Could you please pick this patch up ?

Quoted 36 lines
Quoted 36 lines

---

 drivers/usb/host/r8a66597-hcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/usb/host/r8a66597-hcd.c index 2ad004a..a2fdd85 100644

drivers/usb/host/r8a66597-hcd.c +1 -1
@@ -95,7 +95,7 @@ static int r8a66597_clock_enable(struct r8a66597
 *r8a66597)> 
 	int i = 0;
 
 	if (r8a66597->pdata->on_chip) {
 
-		clk_enable(r8a66597->clk);
+		clk_prepare_enable(r8a66597->clk);
 
drivers/usb/host/r8a66597-hcd.c +1 -1
 		do {
 
 			r8a66597_write(r8a66597, SCKE, SYSCFG0);
 			tmp = r8a66597_read(r8a66597, SYSCFG0);
@@ -139,7 +139,7 @@ static void r8a66597_clock_disable(struct r8a66597
 *r8a66597)> 
 	udelay(1);
 
 	if (r8a66597->pdata->on_chip) {
 
-		clk_disable(r8a66597->clk);
+		clk_disable_unprepare(r8a66597->clk);
 
drivers/usb/host/r8a66597-hcd.c +0 -0
 	} else {
 
 		r8a66597_bclr(r8a66597, PLLC, SYSCFG0);
 		r8a66597_bclr(r8a66597, XCKE, SYSCFG0);
Signature · 3 lines
Regards,

Laurent Pinchart
#66 lore raw

PATCH 10/12 usb: r8a66597-hcd: Convert to clk_prepare/unprepare

Quoted 16 lines · Laurent Pinchart

Hi Greg,

Quoted 13 lines · Yoshihiro

Hi Laurent-san,

Quoted 9 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Yoshihiro Shimoda <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>

Quoted 5 lines
Quoted 3 lines

Thank you for the patch.

Could you please pick this patch up ?

I'll pick things up after 3.13-rc1 is out, I can't do anything until then.

thanks,

greg k-h

#67 lore raw

PATCH 10/12 usb: r8a66597-hcd: Convert to clk_prepare/unprepare

Hi Greg,

Quoted 16 lines · On Saturday 09 November 2013 08:10:59 Greg Kroah-Hartman wrote:
Quoted 15 lines · Laurent Pinchart
Quoted 14 lines · Yoshihiro

Hi Laurent-san,

Quoted 10 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and
clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Yoshihiro Shimoda <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Thank you for the patch.

Could you please pick this patch up ?

I'll pick things up after 3.13-rc1 is out, I can't do anything until then.

Sure.

As this patch is a dependency for other series that will go through different trees, could you please provide a stable branch in your tree with this patch included that you will push to v3.14 ?

Signature · 3 lines
Regards,

Laurent Pinchart
#68 lore raw

PATCH 10/12 usb: r8a66597-hcd: Convert to clk_prepare/unprepare

Quoted 25 lines · Laurent Pinchart

Hi Greg,

Quoted 22 lines · On Saturday 09 November 2013 08:10:59 Greg Kroah-Hartman wrote:
Quoted 20 lines · Laurent Pinchart
Quoted 14 lines · Yoshihiro

Hi Laurent-san,

Quoted 10 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and
clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Yoshihiro Shimoda <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>

Quoted 3 lines

Thank you for the patch.

Could you please pick this patch up ?

Quoted 8 lines
Quoted 2 lines

I'll pick things up after 3.13-rc1 is out, I can't do anything until then.

Sure.

As this patch is a dependency for other series that will go through different trees, could you please provide a stable branch in your tree with this patch included that you will push to v3.14 ?

If you need this for other work, feel free to take it in your tree, I have no real need for it to go in mine.

#69 lore raw

PATCH 10/12 usb: r8a66597-hcd: Convert to clk_prepare/unprepare

Hi Greg,

Quoted 28 lines · On Monday 25 November 2013 18:36:08 Greg Kroah-Hartman wrote:
Quoted 27 lines · Laurent Pinchart
Quoted 15 lines · On Saturday 09 November 2013 08:10:59 Greg Kroah-Hartman wrote:
Quoted 14 lines · Laurent Pinchart
Quoted 13 lines · Yoshihiro

Hi Laurent-san,

Quoted 9 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Yoshihiro Shimoda <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Thank you for the patch.

Could you please pick this patch up ?

I'll pick things up after 3.13-rc1 is out, I can't do anything until then.

Sure.

Quoted 8 lines
Quoted 3 lines

As this patch is a dependency for other series that will go through different trees, could you please provide a stable branch in your tree with this patch included that you will push to v3.14 ?

If you need this for other work, feel free to take it in your tree, I have no real need for it to go in mine.

Sounds good to me, thanks.

Simon, could you please pick this patch then ?

Signature · 3 lines
Regards,

Laurent Pinchart
#70 lore raw

PATCH 10/12 usb: r8a66597-hcd: Convert to clk_prepare/unprepare

Quoted 35 lines · Laurent Pinchart

Hi Greg,

Quoted 32 lines · On Monday 25 November 2013 18:36:08 Greg Kroah-Hartman wrote:
Quoted 30 lines · Laurent Pinchart
Quoted 15 lines · On Saturday 09 November 2013 08:10:59 Greg Kroah-Hartman wrote:
Quoted 14 lines · Laurent Pinchart
Quoted 13 lines · Yoshihiro

Hi Laurent-san,

Quoted 9 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Yoshihiro Shimoda <[email protected]>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Thank you for the patch.

Could you please pick this patch up ?

I'll pick things up after 3.13-rc1 is out, I can't do anything until then.

Sure.

As this patch is a dependency for other series that will go through different trees, could you please provide a stable branch in your tree with this patch included that you will push to v3.14 ?

Quoted 8 lines
Quoted 4 lines

If you need this for other work, feel free to take it in your tree, I have no real need for it to go in mine.

Sounds good to me, thanks.

Simon, could you please pick this patch then ?

Sure. I have queued it up.
But I may not push it for a day or two.

#71 lore raw

PATCH 11/12 fbdev: shmobile-hdmi: Convert to clk_prepare/unprepare

In reply to Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc linux-fbdev at vger.kernel.org
---
 drivers/video/sh_mobile_hdmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/video/sh_mobile_hdmi.c +3 -3
index bfe4728..190145e 100644
@@ -1326,7 +1326,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
 		goto erate;
 	}
 
-	ret = clk_enable(hdmi->hdmi_clk);
+	ret = clk_prepare_enable(hdmi->hdmi_clk);
 	if (ret < 0) {
 		dev_err(hdmi->dev, "Cannot enable clock: %d\n", ret);
 		goto erate;
@@ -1404,7 +1404,7 @@ emap_htop1:
 emap:
 	release_mem_region(res->start, resource_size(res));
 ereqreg:
-	clk_disable(hdmi->hdmi_clk);
+	clk_disable_unprepare(hdmi->hdmi_clk);
 erate:
 	clk_put(hdmi->hdmi_clk);
 egetclk:
@@ -1427,7 +1427,7 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev)
 	cancel_delayed_work_sync(&hdmi->edid_work);
 	pm_runtime_put(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-	clk_disable(hdmi->hdmi_clk);
+	clk_disable_unprepare(hdmi->hdmi_clk);
 	clk_put(hdmi->hdmi_clk);
 	if (hdmi->htop1)
 		iounmap(hdmi->htop1);
Signature · 1 line
1.8.1.5
#72 lore raw

PATCH 11/12 fbdev: shmobile-hdmi: Convert to clk_prepare/unprepare

Quoted 6 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>

Bset Regards,
J.

Quoted 40 lines
Cc linux-fbdev at vger.kernel.org
---
 drivers/video/sh_mobile_hdmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/video/sh_mobile_hdmi.c +3 -3
index bfe4728..190145e 100644
@@ -1326,7 +1326,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
 		goto erate;
 	}
 
-	ret = clk_enable(hdmi->hdmi_clk);
+	ret = clk_prepare_enable(hdmi->hdmi_clk);
 	if (ret < 0) {
 		dev_err(hdmi->dev, "Cannot enable clock: %d\n", ret);
 		goto erate;
@@ -1404,7 +1404,7 @@ emap_htop1:
 emap:
 	release_mem_region(res->start, resource_size(res));
 ereqreg:
-	clk_disable(hdmi->hdmi_clk);
+	clk_disable_unprepare(hdmi->hdmi_clk);
 erate:
 	clk_put(hdmi->hdmi_clk);
 egetclk:
@@ -1427,7 +1427,7 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev)
 	cancel_delayed_work_sync(&hdmi->edid_work);
 	pm_runtime_put(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-	clk_disable(hdmi->hdmi_clk);
+	clk_disable_unprepare(hdmi->hdmi_clk);
 	clk_put(hdmi->hdmi_clk);
 	if (hdmi->htop1)
 		iounmap(hdmi->htop1);
Signature · 1 line
1.8.1.5
#73 lore raw

PATCH 11/12 fbdev: shmobile-hdmi: Convert to clk_prepare/unprepare

Hi Jean-Christophe,

Quoted 9 lines · On Thursday 31 October 2013 11:48:09 Jean-Christophe PLAGNIOL-VILLARD wrote:
Quoted 6 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>

Thank you. Could you please pick patches 11/12 and 12/12 up for v3.13 or v3.14 ?

Quoted 51 lines
Quoted 51 lines

Cc: linux-fbdev at vger.kernel.org
Signed-off-by: Laurent Pinchart
<[email protected]>
---

 drivers/video/sh_mobile_hdmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/drivers/video/sh_mobile_hdmi.c index bfe4728..190145e 100644

drivers/video/sh_mobile_hdmi.c +0 -0
@@ -1326,7 +1326,7 @@ static int __init sh_hdmi_probe(struct

platform_device *pdev)>

drivers/video/sh_mobile_hdmi.c +2 -2
 		goto erate;
 
 	}
 
-	ret = clk_enable(hdmi->hdmi_clk);
+	ret = clk_prepare_enable(hdmi->hdmi_clk);
 
 	if (ret < 0) {
 
 		dev_err(hdmi->dev, "Cannot enable clock: %d\n", ret);
 		goto erate;
@@ -1404,7 +1404,7 @@ emap_htop1:
 emap:
 	release_mem_region(res->start, resource_size(res));
 
 ereqreg:
-	clk_disable(hdmi->hdmi_clk);
+	clk_disable_unprepare(hdmi->hdmi_clk);
 
 erate:
drivers/video/sh_mobile_hdmi.c +0 -0
 	clk_put(hdmi->hdmi_clk);
 
 egetclk:
@@ -1427,7 +1427,7 @@ static int __exit sh_hdmi_remove(struct

platform_device *pdev)>

drivers/video/sh_mobile_hdmi.c +1 -1
 	cancel_delayed_work_sync(&hdmi->edid_work);
 	pm_runtime_put(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 
-	clk_disable(hdmi->hdmi_clk);
+	clk_disable_unprepare(hdmi->hdmi_clk);
 
 	clk_put(hdmi->hdmi_clk);
 	if (hdmi->htop1)
 
 		iounmap(hdmi->htop1);
Signature · 3 lines
Regards,

Laurent Pinchart
#74 lore raw

PATCH 11/12 fbdev: shmobile-hdmi: Convert to clk_prepare/unprepare

Quoted 8 lines · Laurent Pinchart

Hi Jean-Christophe,

Quoted 5 lines · On Thursday 31 October 2013 11:48:09 Jean-Christophe PLAGNIOL-VILLARD wrote:
Quoted 4 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>

Thank you. Could you please pick patches 11/12 and 12/12 up for v3.13 or v3.14 ?

Thanks, picked both for 3.13.

Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131111/4b2bc4fc/attachment.sig>

#75 lore raw

PATCH 12/12 fbdev: shmobile-lcdcfb: Convert to clk_prepare/unprepare

In reply to Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc linux-fbdev at vger.kernel.org
---
 drivers/video/sh_mobile_lcdcfb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/sh_mobile_lcdcfb.c +2 -2
index 0264704..eaeae0f 100644
@@ -344,7 +344,7 @@ static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv)
 {
 	if (atomic_inc_and_test(&priv->hw_usecnt)) {
 		if (priv->dot_clk)
-			clk_enable(priv->dot_clk);
+			clk_prepare_enable(priv->dot_clk);
 		pm_runtime_get_sync(priv->dev);
 		if (priv->meram_dev && priv->meram_dev->pdev)
 			pm_runtime_get_sync(&priv->meram_dev->pdev->dev);
@@ -358,7 +358,7 @@ static void sh_mobile_lcdc_clk_off(struct sh_mobile_lcdc_priv *priv)
 			pm_runtime_put_sync(&priv->meram_dev->pdev->dev);
 		pm_runtime_put(priv->dev);
 		if (priv->dot_clk)
-			clk_disable(priv->dot_clk);
+			clk_disable_unprepare(priv->dot_clk);
 	}
 }
 
Signature · 1 line
1.8.1.5
#76 lore raw

PATCH 12/12 fbdev: shmobile-lcdcfb: Convert to clk_prepare/unprepare

Quoted 5 lines · Laurent Pinchart

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework.

Cc Jean-Christophe Plagniol-Villard <[email protected]>

Best Regards,
J.

Quoted 32 lines
Cc Tomi Valkeinen <[email protected]>
Cc linux-fbdev at vger.kernel.org
---
 drivers/video/sh_mobile_lcdcfb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/sh_mobile_lcdcfb.c +2 -2
index 0264704..eaeae0f 100644
@@ -344,7 +344,7 @@ static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv)
 {
 	if (atomic_inc_and_test(&priv->hw_usecnt)) {
 		if (priv->dot_clk)
-			clk_enable(priv->dot_clk);
+			clk_prepare_enable(priv->dot_clk);
 		pm_runtime_get_sync(priv->dev);
 		if (priv->meram_dev && priv->meram_dev->pdev)
 			pm_runtime_get_sync(&priv->meram_dev->pdev->dev);
@@ -358,7 +358,7 @@ static void sh_mobile_lcdc_clk_off(struct sh_mobile_lcdc_priv *priv)
 			pm_runtime_put_sync(&priv->meram_dev->pdev->dev);
 		pm_runtime_put(priv->dev);
 		if (priv->dot_clk)
-			clk_disable(priv->dot_clk);
+			clk_disable_unprepare(priv->dot_clk);
 	}
 }
 
Signature · 1 line
1.8.1.5