]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/clk-provider.h
Merge tag 'clk-for-linus-3.16' of git://git.linaro.org/people/mike.turquette/linux...
[karo-tx-linux.git] / include / linux / clk-provider.h
index c7135dbbcd6523abf3b86e1699b6925afa4f3909..0c287dbbb1441eb85391f235a5cd80d4818c22d2 100644 (file)
@@ -426,6 +426,37 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
                const char *parent_name, unsigned long flags,
                unsigned int mult, unsigned int div);
 
+/**
+ * struct clk_fractional_divider - adjustable fractional divider clock
+ *
+ * @hw:                handle between common and hardware-specific interfaces
+ * @reg:       register containing the divider
+ * @mshift:    shift to the numerator bit field
+ * @mwidth:    width of the numerator bit field
+ * @nshift:    shift to the denominator bit field
+ * @nwidth:    width of the denominator bit field
+ * @lock:      register lock
+ *
+ * Clock with adjustable fractional divider affecting its output frequency.
+ */
+
+struct clk_fractional_divider {
+       struct clk_hw   hw;
+       void __iomem    *reg;
+       u8              mshift;
+       u32             mmask;
+       u8              nshift;
+       u32             nmask;
+       u8              flags;
+       spinlock_t      *lock;
+};
+
+extern const struct clk_ops clk_fractional_divider_ops;
+struct clk *clk_register_fractional_divider(struct device *dev,
+               const char *name, const char *parent_name, unsigned long flags,
+               void __iomem *reg, u8 mshift, u8 mwidth, u8 nshift, u8 nwidth,
+               u8 clk_divider_flags, spinlock_t *lock);
+
 /***
  * struct clk_composite - aggregate clock of mux, divider and gate clocks
  *
@@ -511,10 +542,7 @@ struct clk_onecell_data {
 
 extern struct of_device_id __clk_of_table;
 
-#define CLK_OF_DECLARE(name, compat, fn)                       \
-       static const struct of_device_id __clk_of_table_##name  \
-               __used __section(__clk_of_table)                \
-               = { .compatible = compat, .data = fn };
+#define CLK_OF_DECLARE(name, compat, fn) OF_DECLARE_1(clk, name, compat, fn)
 
 #ifdef CONFIG_OF
 int of_clk_add_provider(struct device_node *np,