Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1334127 > unrolled thread
| Started by | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| First post | 2016-02-15 04:40 +0100 |
| Last post | 2016-02-15 22:40 +0100 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/6] Some trivial fixes for rockchip clk/pm stuff Shawn Lin <shawn.lin@rock-chips.com> - 2016-02-15 04:40 +0100
[PATCH 4/6] clk: rockchip: don't return NULL when registering mmc branch fails Shawn Lin <shawn.lin@rock-chips.com> - 2016-02-15 04:40 +0100
Re: [PATCH 4/6] clk: rockchip: don't return NULL when registering mmc branch fails Heiko Stuebner <heiko@sntech.de> - 2016-02-15 23:50 +0100
[PATCH 1/6] clk: rockchip: handle alt_parent in err cases when registering cpuclk Shawn Lin <shawn.lin@rock-chips.com> - 2016-02-15 04:40 +0100
Re: [PATCH 1/6] clk: rockchip: handle alt_parent in err cases when registering cpuclk Heiko Stuebner <heiko@sntech.de> - 2016-02-15 22:40 +0100
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2016-02-15 04:40 +0100 |
| Subject | [PATCH 0/6] Some trivial fixes for rockchip clk/pm stuff |
| Message-ID | <r2iaZ-3Gn-3@gated-at.bofh.it> |
Happy Chinese new year, Rockchipers! This patchset fix some trivial things for rockchip clk/pm driver when learning clk stuff which I'm interested in during the holiday. All of them is based on Heiko's tree(master branch): git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git Shawn Lin (6): clk: rockchip: handle alt_parent in err cases when registering cpuclk clk: rockchip: check grf when waiting pll lock clk: rockchip: don't return NULL when registering inverter fails clk: rockchip: don't return NULL when registering mmc branch fails clk: rockchip: fix coding style for clk-cpu.c soc: rockchip: power-domain: check the existing of regmap drivers/clk/rockchip/clk-cpu.c | 8 +++++--- drivers/clk/rockchip/clk-inverter.c | 8 ++------ drivers/clk/rockchip/clk-mmc-phase.c | 8 ++------ drivers/clk/rockchip/clk-pll.c | 8 +++++++- drivers/soc/rockchip/pm_domains.c | 4 ++++ 5 files changed, 20 insertions(+), 16 deletions(-) -- 2.3.7
[toc] | [next] | [standalone]
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2016-02-15 04:40 +0100 |
| Subject | [PATCH 4/6] clk: rockchip: don't return NULL when registering mmc branch fails |
| Message-ID | <r2ib0-3Gn-25@gated-at.bofh.it> |
| In reply to | #1334127 |
Avoid return NULL if rockchip_clk_register_mmc fails, otherwise rockchip_clk_register_branches print "unknown clock type". The acutal case is that it's a known clock type but we fail to regiser it, which may makes user confuse the reason of failure. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> --- drivers/clk/rockchip/clk-mmc-phase.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/clk/rockchip/clk-mmc-phase.c b/drivers/clk/rockchip/clk-mmc-phase.c index 2685644..e0dc7e8 100644 --- a/drivers/clk/rockchip/clk-mmc-phase.c +++ b/drivers/clk/rockchip/clk-mmc-phase.c @@ -150,7 +150,7 @@ struct clk *rockchip_clk_register_mmc(const char *name, mmc_clock = kmalloc(sizeof(*mmc_clock), GFP_KERNEL); if (!mmc_clock) - return NULL; + return ERR_PTR(-ENOMEM); init.name = name; init.num_parents = num_parents; @@ -172,11 +172,7 @@ struct clk *rockchip_clk_register_mmc(const char *name, clk = clk_register(NULL, &mmc_clock->hw); if (IS_ERR(clk)) - goto err_free; + kfree(mmc_clock); return clk; - -err_free: - kfree(mmc_clock); - return NULL; } -- 2.3.7
[toc] | [prev] | [next] | [standalone]
| From | Heiko Stuebner <heiko@sntech.de> |
|---|---|
| Date | 2016-02-15 23:50 +0100 |
| Subject | Re: [PATCH 4/6] clk: rockchip: don't return NULL when registering mmc branch fails |
| Message-ID | <r2A7U-7qB-11@gated-at.bofh.it> |
| In reply to | #1334128 |
Am Montag, 15. Februar 2016, 11:33:41 schrieb Shawn Lin: > Avoid return NULL if rockchip_clk_register_mmc fails, otherwise > rockchip_clk_register_branches print "unknown clock type". The acutal > case is that it's a known clock type but we fail to regiser it, which > may makes user confuse the reason of failure. > > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> applied to my clk-branch for 4.6
[toc] | [prev] | [next] | [standalone]
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2016-02-15 04:40 +0100 |
| Subject | [PATCH 1/6] clk: rockchip: handle alt_parent in err cases when registering cpuclk |
| Message-ID | <r2ib0-3Gn-27@gated-at.bofh.it> |
| In reply to | #1334127 |
Add clk_disable_unprepare to handle cpuclk->alt_parent if
rockchip_clk_register_cpuclk fails.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
drivers/clk/rockchip/clk-cpu.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/rockchip/clk-cpu.c b/drivers/clk/rockchip/clk-cpu.c
index d07374f..68a2a87 100644
--- a/drivers/clk/rockchip/clk-cpu.c
+++ b/drivers/clk/rockchip/clk-cpu.c
@@ -290,14 +290,14 @@ struct clk *rockchip_clk_register_cpuclk(const char *name,
pr_err("%s: could not lookup parent clock %s\n",
__func__, parent_names[0]);
ret = -EINVAL;
- goto free_cpuclk;
+ goto free_alt_parent;
}
ret = clk_notifier_register(clk, &cpuclk->clk_nb);
if (ret) {
pr_err("%s: failed to register clock notifier for %s\n",
__func__, name);
- goto free_cpuclk;
+ goto free_alt_parent;
}
if (nrates > 0) {
@@ -326,6 +326,8 @@ free_rate_table:
kfree(cpuclk->rate_table);
unregister_notifier:
clk_notifier_unregister(clk, &cpuclk->clk_nb);
+free_alt_parent:
+ clk_disable_unprepare(cpuclk->alt_parent);
free_cpuclk:
kfree(cpuclk);
return ERR_PTR(ret);
--
2.3.7
[toc] | [prev] | [next] | [standalone]
| From | Heiko Stuebner <heiko@sntech.de> |
|---|---|
| Date | 2016-02-15 22:40 +0100 |
| Subject | Re: [PATCH 1/6] clk: rockchip: handle alt_parent in err cases when registering cpuclk |
| Message-ID | <r2z29-6Jk-9@gated-at.bofh.it> |
| In reply to | #1334129 |
Am Montag, 15. Februar 2016, 11:33:15 schrieb Shawn Lin: > Add clk_disable_unprepare to handle cpuclk->alt_parent if > rockchip_clk_register_cpuclk fails. > > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> applied to my clk branch for 4.6
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web