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>
This commit is contained in:
Jerome Brunet
2018-02-14 14:43:33 +01:00
committed by Stephen Boyd
parent 04bf9ab335
commit e6d3cc7b1f
2 changed files with 12 additions and 13 deletions

View File

@@ -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)