Re: [PATCH 2/2] clk: Convert __clk_get_name(hw-clk) to clk_hw_get_name(hw)

2015-08-13 Thread Heiko Stübner
Am Mittwoch, 12. August 2015, 16:12:41 schrieb Stephen Boyd:
 Use the provider based method to get a clock's name so that we
 can get rid of the clk member in struct clk_hw one day. Mostly
 converted with the following coccinelle script.
 
 @@
 struct clk_hw *E;
 @@
 
 -__clk_get_name(E-clk)
 +clk_hw_get_name(E)
 

For the Rockchip part
Reviewed-by: Heiko Stuebner he...@sntech.de


Heiko

 diff --git a/drivers/clk/rockchip/clk-inverter.c
 b/drivers/clk/rockchip/clk-inverter.c index 8054fdb5effb..7cbf43beb3c6
 100644
 --- a/drivers/clk/rockchip/clk-inverter.c
 +++ b/drivers/clk/rockchip/clk-inverter.c
 @@ -50,7 +50,7 @@ static int rockchip_inv_set_phase(struct clk_hw *hw, int
 degrees) val = !!degrees;
   } else {
   pr_err(%s: unsupported phase %d for %s\n,
 -__func__, degrees, __clk_get_name(hw-clk));
 +__func__, degrees, clk_hw_get_name(hw));
   return -EINVAL;
   }
 
 diff --git a/drivers/clk/rockchip/clk-mmc-phase.c
 b/drivers/clk/rockchip/clk-mmc-phase.c index 77e19097bdc7..9b613426e968
 100644
 --- a/drivers/clk/rockchip/clk-mmc-phase.c
 +++ b/drivers/clk/rockchip/clk-mmc-phase.c
 @@ -108,7 +108,7 @@ static int rockchip_mmc_set_phase(struct clk_hw *hw, int
 degrees) writel(HIWORD_UPDATE(raw_value, 0x07ff, mmc_clock-shift),
 mmc_clock-reg);
 
   pr_debug(%s-set_phase(%d) delay_nums=%u reg[0x%p]=0x%03x
 actual_degrees=%d\n, -   __clk_get_name(hw-clk), degrees, 
 delay_num,
 + clk_hw_get_name(hw), degrees, delay_num,
   mmc_clock-reg, raw_value(mmc_clock-shift),
   rockchip_mmc_get_phase(hw)
   );

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


Re: [PATCH 2/2] clk: Convert __clk_get_name(hw-clk) to clk_hw_get_name(hw)

2015-08-13 Thread Thierry Reding
On Wed, Aug 12, 2015 at 04:12:41PM -0700, Stephen Boyd wrote:
 Use the provider based method to get a clock's name so that we
 can get rid of the clk member in struct clk_hw one day. Mostly
 converted with the following coccinelle script.
 
 @@
 struct clk_hw *E;
 @@
 
 -__clk_get_name(E-clk)
 +clk_hw_get_name(E)
 
[...]
  drivers/clk/tegra/clk-pll.c  |  8 

Acked-by: Thierry Reding tred...@nvidia.com


signature.asc
Description: PGP signature


Re: [PATCH 2/2] clk: Convert __clk_get_name(hw-clk) to clk_hw_get_name(hw)

2015-08-13 Thread Geert Uytterhoeven
On Thu, Aug 13, 2015 at 1:12 AM, Stephen Boyd sb...@codeaurora.org wrote:
 Use the provider based method to get a clock's name so that we
 can get rid of the clk member in struct clk_hw one day. Mostly
 converted with the following coccinelle script.

 @@
 struct clk_hw *E;
 @@

 -__clk_get_name(E-clk)
 +clk_hw_get_name(E)

 Cc: Heiko Stuebner he...@sntech.de
 Cc: Sylwester Nawrocki s.nawro...@samsung.com
 Cc: Tomasz Figa tomasz.f...@gmail.com
 Cc: Peter De Schrijver pdeschrij...@nvidia.com
 Cc: Prashant Gaikwad pgaik...@nvidia.com
 Cc: Stephen Warren swar...@wwwdotorg.org
 Cc: Thierry Reding thierry.red...@gmail.com
 Cc: Alexandre Courbot gnu...@gmail.com
 Cc: Tero Kristo t-kri...@ti.com
 Cc: Ulf Hansson ulf.hans...@linaro.org
 Cc: Sebastian Hesselbarth sebastian.hesselba...@gmail.com
 Cc: Andrew Bresticker abres...@chromium.org
 Cc: Ezequiel Garcia ezequiel.gar...@imgtec.com
 Cc: Ralf Baechle r...@linux-mips.org
 Cc: Kevin Cernekee cerne...@chromium.org
 Cc: Geert Uytterhoeven geert+rene...@glider.be
 Cc: Ulrich Hecht ulrich.hecht+rene...@gmail.com
 Cc: linux-arm-ker...@lists.infradead.org
 Cc: linux-rockc...@lists.infradead.org
 Cc: linux-samsung-...@vger.kernel.org
 Cc: linux-te...@vger.kernel.org
 Cc: linux-omap@vger.kernel.org
 Signed-off-by: Stephen Boyd sb...@codeaurora.org

  drivers/clk/shmobile/clk-div6.c  |  2 +-

For the shmobile part:

Acked-by: Geert Uytterhoeven geert+rene...@glider.be

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@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
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] clk: Convert __clk_get_name(hw-clk) to clk_hw_get_name(hw)

2015-08-13 Thread Sebastian Hesselbarth

On 08/13/2015 01:12 AM, Stephen Boyd wrote:

Use the provider based method to get a clock's name so that we
can get rid of the clk member in struct clk_hw one day. Mostly
converted with the following coccinelle script.

@@
struct clk_hw *E;
@@

-__clk_get_name(E-clk)
+clk_hw_get_name(E)

[...]

Signed-off-by: Stephen Boyd sb...@codeaurora.org
---
  drivers/clk/berlin/berlin2-pll.c |  4 ++--


For Berlin,

Acked-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com

Thanks!

[...]

diff --git a/drivers/clk/berlin/berlin2-pll.c b/drivers/clk/berlin/berlin2-pll.c
index f4b8d324b083..1c2294d3ba85 100644
--- a/drivers/clk/berlin/berlin2-pll.c
+++ b/drivers/clk/berlin/berlin2-pll.c
@@ -61,7 +61,7 @@ berlin2_pll_recalc_rate(struct clk_hw *hw, unsigned long 
parent_rate)
fbdiv = (val  map-fbdiv_shift)  FBDIV_MASK;
rfdiv = (val  map-rfdiv_shift)  RFDIV_MASK;
if (rfdiv == 0) {
-   pr_warn(%s has zero rfdiv\n, __clk_get_name(hw-clk));
+   pr_warn(%s has zero rfdiv\n, clk_hw_get_name(hw));
rfdiv = 1;
}

@@ -70,7 +70,7 @@ berlin2_pll_recalc_rate(struct clk_hw *hw, unsigned long 
parent_rate)
vcodiv = map-vcodiv[vcodivsel];
if (vcodiv == 0) {
pr_warn(%s has zero vcodiv (index %d)\n,
-   __clk_get_name(hw-clk), vcodivsel);
+   clk_hw_get_name(hw), vcodivsel);
vcodiv = 1;
}


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


Re: [PATCH 2/2] clk: Convert __clk_get_name(hw-clk) to clk_hw_get_name(hw)

2015-08-13 Thread Andrew Bresticker
On Wed, Aug 12, 2015 at 4:12 PM, Stephen Boyd sb...@codeaurora.org wrote:
 Use the provider based method to get a clock's name so that we
 can get rid of the clk member in struct clk_hw one day. Mostly
 converted with the following coccinelle script.

 @@
 struct clk_hw *E;
 @@

 -__clk_get_name(E-clk)
 +clk_hw_get_name(E)

 Cc: Heiko Stuebner he...@sntech.de
 Cc: Sylwester Nawrocki s.nawro...@samsung.com
 Cc: Tomasz Figa tomasz.f...@gmail.com
 Cc: Peter De Schrijver pdeschrij...@nvidia.com
 Cc: Prashant Gaikwad pgaik...@nvidia.com
 Cc: Stephen Warren swar...@wwwdotorg.org
 Cc: Thierry Reding thierry.red...@gmail.com
 Cc: Alexandre Courbot gnu...@gmail.com
 Cc: Tero Kristo t-kri...@ti.com
 Cc: Ulf Hansson ulf.hans...@linaro.org
 Cc: Sebastian Hesselbarth sebastian.hesselba...@gmail.com
 Cc: Andrew Bresticker abres...@chromium.org
 Cc: Ezequiel Garcia ezequiel.gar...@imgtec.com
 Cc: Ralf Baechle r...@linux-mips.org
 Cc: Kevin Cernekee cerne...@chromium.org
 Cc: Geert Uytterhoeven geert+rene...@glider.be
 Cc: Ulrich Hecht ulrich.hecht+rene...@gmail.com
 Cc: linux-arm-ker...@lists.infradead.org
 Cc: linux-rockc...@lists.infradead.org
 Cc: linux-samsung-...@vger.kernel.org
 Cc: linux-te...@vger.kernel.org
 Cc: linux-omap@vger.kernel.org
 Signed-off-by: Stephen Boyd sb...@codeaurora.org

  drivers/clk/pistachio/clk-pll.c  |  4 ++--

For Pistachio,

Acked-by: Andrew Bresticker abres...@chromium.org
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] clk: Convert __clk_get_name(hw-clk) to clk_hw_get_name(hw)

2015-08-12 Thread Stephen Boyd
Use the provider based method to get a clock's name so that we
can get rid of the clk member in struct clk_hw one day. Mostly
converted with the following coccinelle script.

@@
struct clk_hw *E;
@@

-__clk_get_name(E-clk)
+clk_hw_get_name(E)

Cc: Heiko Stuebner he...@sntech.de
Cc: Sylwester Nawrocki s.nawro...@samsung.com
Cc: Tomasz Figa tomasz.f...@gmail.com
Cc: Peter De Schrijver pdeschrij...@nvidia.com
Cc: Prashant Gaikwad pgaik...@nvidia.com
Cc: Stephen Warren swar...@wwwdotorg.org
Cc: Thierry Reding thierry.red...@gmail.com
Cc: Alexandre Courbot gnu...@gmail.com
Cc: Tero Kristo t-kri...@ti.com
Cc: Ulf Hansson ulf.hans...@linaro.org
Cc: Sebastian Hesselbarth sebastian.hesselba...@gmail.com
Cc: Andrew Bresticker abres...@chromium.org
Cc: Ezequiel Garcia ezequiel.gar...@imgtec.com
Cc: Ralf Baechle r...@linux-mips.org
Cc: Kevin Cernekee cerne...@chromium.org
Cc: Geert Uytterhoeven geert+rene...@glider.be
Cc: Ulrich Hecht ulrich.hecht+rene...@gmail.com
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-rockc...@lists.infradead.org
Cc: linux-samsung-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Signed-off-by: Stephen Boyd sb...@codeaurora.org
---
 drivers/clk/berlin/berlin2-pll.c |  4 ++--
 drivers/clk/clk-xgene.c  | 22 +++---
 drivers/clk/pistachio/clk-pll.c  |  4 ++--
 drivers/clk/qcom/clk-branch.c|  2 +-
 drivers/clk/rockchip/clk-inverter.c  |  2 +-
 drivers/clk/rockchip/clk-mmc-phase.c |  2 +-
 drivers/clk/samsung/clk-pll.c| 18 +-
 drivers/clk/shmobile/clk-div6.c  |  2 +-
 drivers/clk/st/clk-flexgen.c |  4 ++--
 drivers/clk/st/clkgen-fsyn.c | 18 +-
 drivers/clk/st/clkgen-mux.c  |  2 +-
 drivers/clk/st/clkgen-pll.c  |  8 
 drivers/clk/tegra/clk-pll.c  |  8 
 drivers/clk/ti/apll.c|  4 ++--
 drivers/clk/ti/clkt_dflt.c   |  8 
 drivers/clk/ti/clockdomain.c | 14 +++---
 drivers/clk/ux500/clk-prcmu.c| 16 
 drivers/clk/ux500/clk-sysctrl.c  |  2 +-
 18 files changed, 70 insertions(+), 70 deletions(-)

diff --git a/drivers/clk/berlin/berlin2-pll.c b/drivers/clk/berlin/berlin2-pll.c
index f4b8d324b083..1c2294d3ba85 100644
--- a/drivers/clk/berlin/berlin2-pll.c
+++ b/drivers/clk/berlin/berlin2-pll.c
@@ -61,7 +61,7 @@ berlin2_pll_recalc_rate(struct clk_hw *hw, unsigned long 
parent_rate)
fbdiv = (val  map-fbdiv_shift)  FBDIV_MASK;
rfdiv = (val  map-rfdiv_shift)  RFDIV_MASK;
if (rfdiv == 0) {
-   pr_warn(%s has zero rfdiv\n, __clk_get_name(hw-clk));
+   pr_warn(%s has zero rfdiv\n, clk_hw_get_name(hw));
rfdiv = 1;
}
 
@@ -70,7 +70,7 @@ berlin2_pll_recalc_rate(struct clk_hw *hw, unsigned long 
parent_rate)
vcodiv = map-vcodiv[vcodivsel];
if (vcodiv == 0) {
pr_warn(%s has zero vcodiv (index %d)\n,
-   __clk_get_name(hw-clk), vcodivsel);
+   clk_hw_get_name(hw), vcodivsel);
vcodiv = 1;
}
 
diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c
index 4caee9356407..96a6190acac2 100644
--- a/drivers/clk/clk-xgene.c
+++ b/drivers/clk/clk-xgene.c
@@ -74,7 +74,7 @@ static int xgene_clk_pll_is_enabled(struct clk_hw *hw)
u32 data;
 
data = xgene_clk_read(pllclk-reg + pllclk-pll_offset);
-   pr_debug(%s pll %s\n, __clk_get_name(hw-clk),
+   pr_debug(%s pll %s\n, clk_hw_get_name(hw),
data  REGSPEC_RESET_F1_MASK ? disabled : enabled);
 
return data  REGSPEC_RESET_F1_MASK ? 0 : 1;
@@ -112,7 +112,7 @@ static unsigned long xgene_clk_pll_recalc_rate(struct 
clk_hw *hw,
fref = parent_rate / nref;
fvco = fref * nfb;
}
-   pr_debug(%s pll recalc rate %ld parent %ld\n, __clk_get_name(hw-clk),
+   pr_debug(%s pll recalc rate %ld parent %ld\n, clk_hw_get_name(hw),
fvco / nout, parent_rate);
 
return fvco / nout;
@@ -225,7 +225,7 @@ static int xgene_clk_enable(struct clk_hw *hw)
spin_lock_irqsave(pclk-lock, flags);
 
if (pclk-param.csr_reg != NULL) {
-   pr_debug(%s clock enabled\n, __clk_get_name(hw-clk));
+   pr_debug(%s clock enabled\n, clk_hw_get_name(hw));
reg = __pa(pclk-param.csr_reg);
/* First enable the clock */
data = xgene_clk_read(pclk-param.csr_reg +
@@ -234,7 +234,7 @@ static int xgene_clk_enable(struct clk_hw *hw)
xgene_clk_write(data, pclk-param.csr_reg +
pclk-param.reg_clk_offset);
pr_debug(%s clock PADDR base %pa clk offset 0x%08X mask 0x%08X 
value 0x%08X\n,
-   __clk_get_name(hw-clk), reg,
+   clk_hw_get_name(hw), reg,
pclk-param.reg_clk_offset,