Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452254
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/5] mmc: sdhci-of-arasan: add power domain support |
| Date | 2016-07-29 06:30 +0200 |
| Message-ID | <s07AR-89U-11@gated-at.bofh.it> (permalink) |
| References | <s07rb-83j-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
We should enable power domain once provided. Otherwise we take risk of bus err as it's maybe in off state before probing. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> --- drivers/mmc/host/sdhci-of-arasan.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index e0f193f..e507e94 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -25,6 +25,8 @@ #include <linux/of_device.h> #include <linux/phy/phy.h> #include <linux/regmap.h> +#include <linux/pm_runtime.h> +#include <linux/pm_opp.h> #include "sdhci-pltfm.h" #define SDHCI_ARASAN_CLK_CTRL_OFFSET 0x2c @@ -515,6 +517,9 @@ static int sdhci_arasan_probe(struct platform_device *pdev) goto clk_dis_ahb; } + pm_runtime_enable(host->dev); + pm_runtime_get_sync(host->dev); + sdhci_get_of_property(pdev); pltfm_host->clk = clk_xin; @@ -577,6 +582,8 @@ clk_dis_ahb: clk_disable_unprepare(sdhci_arasan->clk_ahb); err_pltfm_free: sdhci_pltfm_free(pdev); + pm_runtime_put(host->dev); + pm_runtime_disable(host->dev); return ret; } @@ -599,6 +606,9 @@ static int sdhci_arasan_remove(struct platform_device *pdev) clk_disable_unprepare(clk_ahb); + pm_runtime_put(host->dev); + pm_runtime_disable(host->dev); + return ret; } -- 2.3.7
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] Add power domain support for dw_mmc/sdhci-of-arasan Shawn Lin <shawn.lin@rock-chips.com> - 2016-07-29 06:20 +0200
[PATCH 2/5] Documentation: mmc: sdhci-of-arasan: add power domain description Shawn Lin <shawn.lin@rock-chips.com> - 2016-07-29 06:20 +0200
Re: [PATCH 2/5] Documentation: mmc: sdhci-of-arasan: add power domain description Rob Herring <robh@kernel.org> - 2016-07-29 23:50 +0200
[PATCH 5/5] mmc: sdhci-of-arasan: add power domain support Shawn Lin <shawn.lin@rock-chips.com> - 2016-07-29 06:30 +0200
Re: [PATCH 0/5] Add power domain support for dw_mmc/sdhci-of-arasan Ulf Hansson <ulf.hansson@linaro.org> - 2016-07-29 11:30 +0200
Re: [PATCH 0/5] Add power domain support for dw_mmc/sdhci-of-arasan Shawn Lin <shawn.lin@rock-chips.com> - 2016-08-01 05:30 +0200
csiph-web