* [PATCH] mmc: host: tmio: disable clocks when unbinding
@ 2017-01-17 20:26 Wolfram Sang
2017-01-18 8:29 ` Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Wolfram Sang @ 2017-01-17 20:26 UTC (permalink / raw)
To: linux-mmc
Cc: linux-renesas-soc, Simon Horman, Geert Uytterhoeven,
Chris Brandt, Wolfram Sang
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
Create a helper function to disable clocks and use it in remove(), too.
Now, clk_summary in debugfs reports the clocks as disabled and
unprepared after unbinding.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/mmc/host/tmio_mmc_pio.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index ddba7b833f2c52..db3bde716b3eed 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -947,6 +947,12 @@ static int tmio_mmc_clk_enable(struct tmio_mmc_host *host)
return host->clk_enable(host);
}
+static void tmio_mmc_clk_disable(struct tmio_mmc_host *host)
+{
+ if (host->clk_disable)
+ host->clk_disable(host);
+}
+
static void tmio_mmc_power_on(struct tmio_mmc_host *host, unsigned short vdd)
{
struct mmc_host *mmc = host->mmc;
@@ -1332,6 +1338,8 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
+
+ tmio_mmc_clk_disable(host);
}
EXPORT_SYMBOL(tmio_mmc_host_remove);
@@ -1346,8 +1354,7 @@ int tmio_mmc_host_runtime_suspend(struct device *dev)
if (host->clk_cache)
tmio_mmc_clk_stop(host);
- if (host->clk_disable)
- host->clk_disable(host);
+ tmio_mmc_clk_disable(host);
return 0;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: host: tmio: disable clocks when unbinding
2017-01-17 20:26 [PATCH] mmc: host: tmio: disable clocks when unbinding Wolfram Sang
@ 2017-01-18 8:29 ` Geert Uytterhoeven
2017-01-18 17:20 ` Chris Brandt
2017-01-19 21:19 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2017-01-18 8:29 UTC (permalink / raw)
To: Wolfram Sang
Cc: Linux MMC List, Linux-Renesas, Simon Horman, Chris Brandt, Wolfram Sang
On Tue, Jan 17, 2017 at 9:26 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> Create a helper function to disable clocks and use it in remove(), too.
> Now, clk_summary in debugfs reports the clocks as disabled and
> unprepared after unbinding.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] mmc: host: tmio: disable clocks when unbinding
2017-01-17 20:26 [PATCH] mmc: host: tmio: disable clocks when unbinding Wolfram Sang
2017-01-18 8:29 ` Geert Uytterhoeven
@ 2017-01-18 17:20 ` Chris Brandt
2017-01-19 21:19 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Chris Brandt @ 2017-01-18 17:20 UTC (permalink / raw)
To: Wolfram Sang, linux-mmc
Cc: linux-renesas-soc, Simon Horman, Geert Uytterhoeven, Wolfram Sang
Hi Wolfram,
On Tuesday, January 17, 2017, Wolfram Sang wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> Create a helper function to disable clocks and use it in remove(), too.
> Now, clk_summary in debugfs reports the clocks as disabled and unprepared
> after unbinding.
Just tried it, now sh_mobile_sdhi_clk_disable() is called when unbinding.
Thanks,
Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: host: tmio: disable clocks when unbinding
2017-01-17 20:26 [PATCH] mmc: host: tmio: disable clocks when unbinding Wolfram Sang
2017-01-18 8:29 ` Geert Uytterhoeven
2017-01-18 17:20 ` Chris Brandt
@ 2017-01-19 21:19 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2017-01-19 21:19 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-mmc, Linux-Renesas, Simon Horman, Geert Uytterhoeven,
Chris Brandt, Wolfram Sang
On 17 January 2017 at 21:26, Wolfram Sang <wsa@the-dreams.de> wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> Create a helper function to disable clocks and use it in remove(), too.
> Now, clk_summary in debugfs reports the clocks as disabled and
> unprepared after unbinding.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Thanks, applied for next!
Kind regards
Uffe
> ---
> drivers/mmc/host/tmio_mmc_pio.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
> index ddba7b833f2c52..db3bde716b3eed 100644
> --- a/drivers/mmc/host/tmio_mmc_pio.c
> +++ b/drivers/mmc/host/tmio_mmc_pio.c
> @@ -947,6 +947,12 @@ static int tmio_mmc_clk_enable(struct tmio_mmc_host *host)
> return host->clk_enable(host);
> }
>
> +static void tmio_mmc_clk_disable(struct tmio_mmc_host *host)
> +{
> + if (host->clk_disable)
> + host->clk_disable(host);
> +}
> +
> static void tmio_mmc_power_on(struct tmio_mmc_host *host, unsigned short vdd)
> {
> struct mmc_host *mmc = host->mmc;
> @@ -1332,6 +1338,8 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
>
> pm_runtime_put_sync(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
> +
> + tmio_mmc_clk_disable(host);
> }
> EXPORT_SYMBOL(tmio_mmc_host_remove);
>
> @@ -1346,8 +1354,7 @@ int tmio_mmc_host_runtime_suspend(struct device *dev)
> if (host->clk_cache)
> tmio_mmc_clk_stop(host);
>
> - if (host->clk_disable)
> - host->clk_disable(host);
> + tmio_mmc_clk_disable(host);
>
> return 0;
> }
> --
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-19 21:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-17 20:26 [PATCH] mmc: host: tmio: disable clocks when unbinding Wolfram Sang
2017-01-18 8:29 ` Geert Uytterhoeven
2017-01-18 17:20 ` Chris Brandt
2017-01-19 21:19 ` Ulf Hansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.