summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBrian Ruley <[email protected]>2026-06-16 15:51:40 +0300
committerFabio Estevam <[email protected]>2026-06-26 23:02:46 -0300
commit3c9cb48b4757f631e30a6cba634d62be815ac066 (patch)
treec240d1bd7742cbee46f28552e06080fcbbfe5294 /include/linux
parentd8673fd3b5998ceb2ba3552a9d579c14566ffec7 (diff)
clk: clk-divider: add clk_register_divider_table()
The existing clk_register_divider() only supports linear or power-of-two divider mappings. Some hardware (e.g. i.MX6 PLL5 post_div and video_div) uses non-linear register-value-to-divisor mappings that require a lookup table. Add clk_register_divider_table() which accepts a clk_div_table, and reimplement clk_register_divider() as a wrapper passing table=NULL. Signed-off-by: Brian Ruley <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/clk-provider.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 2d754fa4287..366f2d968a3 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -246,6 +246,11 @@ struct clk *clk_register_fixed_factor(struct udevice *dev, const char *name,
const char *parent_name, unsigned long flags,
unsigned int mult, unsigned int div);
+struct clk *clk_register_divider_table(struct udevice *dev, const char *name,
+ const char *parent_name, unsigned long flags,
+ void __iomem *reg, u8 shift, u8 width,
+ u8 clk_divider_flags, const struct clk_div_table *table);
+
struct clk *clk_register_divider(struct udevice *dev, const char *name,
const char *parent_name, unsigned long flags,
void __iomem *reg, u8 shift, u8 width,