aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2016-02-11 13:19:11 -0800
committerMichael Turquette <mturquette@baylibre.com>2016-04-09 11:58:11 -0700
commitd56f8994b6fb928f59481fabc25bcd1c2f9bd06d (patch)
treecbbd57d3e10ccea55b97af2fdcc199f22772e4b7 /include/linux/clk-provider.h
parentclk: WARN_ON about to disable a critical clock (diff)
downloadlinux-dev-d56f8994b6fb928f59481fabc25bcd1c2f9bd06d.tar.xz
linux-dev-d56f8994b6fb928f59481fabc25bcd1c2f9bd06d.zip
clk: Provide OF helper to mark clocks as CRITICAL
This call matches clocks which have been marked as critical in DT and sets the appropriate flag. These flags can then be used to mark the clock core flags appropriately prior to registration. Legacy bindings requiring this feature must add the clock-critical property to their binding descriptions, as it is not a part of common-clock binding. Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michael Turquette <mturquette@baylibre.com> Link: lkml.kernel.org/r/1455225554-13267-4-git-send-email-mturquette@baylibre.com
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r--include/linux/clk-provider.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 0638b4154502..156286445a25 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -721,7 +721,8 @@ unsigned int of_clk_get_parent_count(struct device_node *np);
int of_clk_parent_fill(struct device_node *np, const char **parents,
unsigned int size);
const char *of_clk_get_parent_name(struct device_node *np, int index);
-
+int of_clk_detect_critical(struct device_node *np, int index,
+ unsigned long *flags);
void of_clk_init(const struct of_device_id *matches);
#else /* !CONFIG_OF */
@@ -758,6 +759,11 @@ static inline const char *of_clk_get_parent_name(struct device_node *np,
{
return NULL;
}
+static inline int of_clk_detect_critical(struct device_node *np, int index,
+ unsigned long *flags)
+{
+ return 0;
+}
static inline void of_clk_init(const struct of_device_id *matches) {}
#endif /* CONFIG_OF */