History log of /linux-master/drivers/clk/clk-conf.c
Revision Date Author Comments
# 27a6e1b0 31-Jan-2023 Clément Léger <clement.leger@bootlin.com>

clk: add missing of_node_put() in "assigned-clocks" property parsing

When returning from of_parse_phandle_with_args(), the np member of the
of_phandle_args structure should be put after usage. Add missing
of_node_put() calls in both __set_clk_parents() and __set_clk_rates().

Fixes: 86be408bfbd8 ("clk: Support for clock parents and rates assigned from device tree")
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Link: https://lore.kernel.org/r/20230131083227.10990-1-clement.leger@bootlin.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>


# ebafb63d 11-Dec-2018 Stephen Boyd <sboyd@kernel.org>

clk: Tag clk core files with SPDX

These are all GPL-2.0 files per the existing license text. Replace the
boiler plate with the tag.

Signed-off-by: Stephen Boyd <sboyd@kernel.org>


# 16673931 18-Jul-2017 Rob Herring <robh@kernel.org>

clk: Convert to using %pOF instead of full_name

Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: "Emilio López" <emilio@elopez.com.ar>
Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Prashant Gaikwad <pgaikwad@nvidia.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: linux-clk@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: James Liao <jamesjj.liao@mediatek.com>
Acked-by: Alexandre TORGUE <alexandre.torgue@st.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>


# ee177c5d 15-May-2017 Bryan O'Donoghue <pure.logic@nexus-software.ie>

clk: Fix __set_clk_rates error print-string

When failing to set a clock the printout emitted is incorrect.
"u32 rate" is formatted as %d and should be %u whereas "unsigned long
clk_set_rate()" is formatted as %ld and should be %lu as per
Documentation/printk-formats.txt.

Fixes: 2885c3b2a3da ("clk: Show correct information when fail to set clock rate")
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>


# e2d79333 04-Jan-2017 Geert Uytterhoeven <geert+renesas@glider.be>

clk: clk-conf: Do not print error messages if EPROBE_DEFER

EPROBE_DEFER is not an error, hence printing an error message like

clk: couldn't get clock 0 for /soc/display@feb00000

may confuse the user.

Suppress error messages in case of probe deferral to fix this.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>


# c200c39b 08-Jul-2016 Tomeu Vizoso <tomeu.vizoso@collabora.com>

clk: clk-conf: Fix error message when clock isn't found

When failing to lookup the assigned clock for setting its parents, we
were previously printing a misleading error message that lead to think
that it was the parent clock what couldn't be found.

Change error message to make clear that it's the assigned clock what
couldn't be found in this case.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/1467962078-30405-1-git-send-email-tomeu.vizoso@collabora.com


# 004cbb47 21-May-2015 Shailendra Verma <shailendra.capricorn@gmail.com>

clk: clk-conf: Fix typo in comment

Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>


# 2885c3b2 27-Apr-2015 Chanwoo Choi <cw00.choi@samsung.com>

clk: Show correct information when fail to set clock rate

This patch shows the correct information for debugging when fail
to set clock rate because original error message shows the error
value instead of current clock rate.

Cc: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>


# 306c342f 05-Feb-2015 Stephen Boyd <sboyd@codeaurora.org>

clk: Replace of_clk_get_by_clkspec() with of_clk_get_from_provider()

of_clk_get_by_clkspec() has the same function signature as
of_clk_get_from_provider()

struct clk *of_clk_get_by_clkspec(struct of_phandle_args
*clkspec)
struct clk *of_clk_get_from_provider(struct of_phandle_args
*clkspec)

except of_clk_get_by_clkspec() checks to make sure clkspec is not
NULL. Let's remove of_clk_get_by_clkspec() and replace the
callers of it (clkconf.c) with of_clk_get_from_provider().

Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>


# b11a6fac 03-Aug-2014 Sylwester Nawrocki <s.nawrocki@samsung.com>

clk: Add missing of_clk_set_defaults export

The of_clk_set_defaults() function is used in subsystems which can
be built as module. Add the missing symbol export entry so there
is no build errors like:
"ERROR: "of_clk_set_defaults" [drivers/i2c/i2c-core.ko] undefined!".

Fixes commit: 86be408bfbd846fab3c4ac21d6f9298bd2e4b790
"clk: Support for clock parents and rates assigned from device tree"

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Mike Turquette <mturquette@linaro.org>


# 6ba19bf0 01-Aug-2014 Dan Carpenter <dan.carpenter@oracle.com>

clk: checking wrong variable in __set_clk_parents()

There is a cut and paste bug so we check "pclk" instead of "clk".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>


# 86be408b 18-Jun-2014 Sylwester Nawrocki <s.nawrocki@samsung.com>

clk: Support for clock parents and rates assigned from device tree

This patch adds helper functions to configure clock parents and rates
as specified through 'assigned-clock-parents', 'assigned-clock-rates'
DT properties for a clock provider or clock consumer device.
The helpers are now being called by the bus code for the platform, I2C
and SPI busses, before the driver probing and also in the clock core
after registration of a clock provider.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>