summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2018-02-14 16:43:33 +0300
committerStephen Boyd <sboyd@kernel.org>2018-03-13 01:10:23 +0300
commite6d3cc7b1fac3d7f1313faf8ac9b23830113e3ec (patch)
tree5627c49752b2bb12d0c535d23a84f0cf3f583c6e /include/linux
parent04bf9ab3359ff89059509ee5c35446c45b9cdaaa (diff)
downloadlinux-e6d3cc7b1fac3d7f1313faf8ac9b23830113e3ec.tar.xz
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')
-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)