aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2018-02-14 14:43:33 +0100
committerStephen Boyd <sboyd@kernel.org>2018-03-12 15:10:23 -0700
commite6d3cc7b1fac3d7f1313faf8ac9b23830113e3ec (patch)
tree5627c49752b2bb12d0c535d23a84f0cf3f583c6e /include/linux/clk-provider.h
parentclk: fix determine rate error with pass-through clock (diff)
downloadlinux-dev-e6d3cc7b1fac3d7f1313faf8ac9b23830113e3ec.tar.xz
linux-dev-e6d3cc7b1fac3d7f1313faf8ac9b23830113e3ec.zip
clk: divider: export clk_div_mask() helper
Export clk_div_mask() in clk-provider header so every clock providers derived from the generic clock divider may share the definition instead of redefining it. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Michael Turquette <mturquette@baylibre.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r--include/linux/clk-provider.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index f711be6e8c44..d8ba26d03332 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -399,6 +399,7 @@ struct clk_divider {
spinlock_t *lock;
};
+#define clk_div_mask(width) ((1 << (width)) - 1)
#define to_clk_divider(_hw) container_of(_hw, struct clk_divider, hw)
#define CLK_DIVIDER_ONE_BASED BIT(0)