diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/clk.h | 10 | ||||
-rw-r--r-- | include/linux/nvmem-consumer.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h index b9c5e0ab04..c3aeea80dd 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -340,6 +340,8 @@ struct clk_divider { int table_size; }; +#define clk_div_mask(width) ((1 << (width)) - 1) + #define CLK_DIVIDER_POWER_OF_TWO (1 << 1) #define CLK_DIVIDER_HIWORD_MASK (1 << 3) #define CLK_DIVIDER_READ_ONLY (1 << 5) @@ -354,6 +356,14 @@ unsigned long divider_recalc_rate(struct clk *clk, unsigned long parent_rate, const struct clk_div_table *table, unsigned long flags, unsigned long width); +long divider_round_rate(struct clk *clk, unsigned long rate, + unsigned long *prate, const struct clk_div_table *table, + u8 width, unsigned long flags); + +int divider_get_val(unsigned long rate, unsigned long parent_rate, + const struct clk_div_table *table, u8 width, + unsigned long flags); + struct clk *clk_divider_alloc(const char *name, const char *parent, unsigned clk_flags, void __iomem *reg, u8 shift, u8 width, unsigned div_flags); diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h index 32ea46e3bf..9e0fd4265e 100644 --- a/include/linux/nvmem-consumer.h +++ b/include/linux/nvmem-consumer.h @@ -103,6 +103,6 @@ static inline struct nvmem_device *of_nvmem_device_get(struct device_node *np, { return ERR_PTR(-ENOSYS); } -#endif /* CONFIG_NVMEM && CONFIG_OF */ +#endif /* CONFIG_NVMEM && CONFIG_OFTREE */ #endif /* ifndef _LINUX_NVMEM_CONSUMER_H */ |