aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@kernel.org>2019-04-12 11:31:49 -0700
committerStephen Boyd <sboyd@kernel.org>2019-04-19 14:53:19 -0700
commit601b6e93304a65f8f7c37168763ab9ba5b195ce5 (patch)
tree614df84355a990933b5b07955761c7fcb568ca03 /include/linux/clk-provider.h
parentclk: Look for parents with clkdev based clk_lookups (diff)
downloadwireguard-linux-601b6e93304a65f8f7c37168763ab9ba5b195ce5.tar.xz
wireguard-linux-601b6e93304a65f8f7c37168763ab9ba5b195ce5.zip
clk: Allow parents to be specified via clkspec index
Some clk providers are simple DT nodes that only have a 'clocks' property without having an associated 'clock-names' property. In these cases, we want to let these clk providers point to their parent clks without having to dereference the 'clocks' property at probe time to figure out the parent's globally unique clk name. Let's add an 'index' property to the parent_data structure so that clk providers can indicate that their parent is a particular index in the 'clocks' DT property. Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Jerome Brunet <jbrunet@baylibre.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Jeffrey Hugo <jhugo@codeaurora.org> Cc: Chen-Yu Tsai <wens@csie.org> Tested-by: Jeffrey Hugo <jhugo@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r--include/linux/clk-provider.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 4c58dbdb0e66..27d8f96dd283 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -255,11 +255,13 @@ struct clk_ops {
* @hw: parent clk_hw pointer (used for clk providers with internal clks)
* @fw_name: parent name local to provider registering clk
* @name: globally unique parent name (used as a fallback)
+ * @index: parent index local to provider registering clk (if @fw_name absent)
*/
struct clk_parent_data {
const struct clk_hw *hw;
const char *fw_name;
const char *name;
+ int index;
};
/**