1 #ifndef __MACH_SUNXI_CLK_FACTORS_H
2 #define __MACH_SUNXI_CLK_FACTORS_H
4 #include <linux/clk-provider.h>
5 #include <linux/spinlock.h>
7 #define SUNXI_FACTORS_NOT_APPLICABLE (0)
9 struct clk_factors_config
{
21 struct factors_request
{
23 unsigned long parent_rate
;
35 const struct clk_factors_config
*table
;
36 void (*getter
)(struct factors_request
*req
);
37 void (*recalc
)(struct factors_request
*req
);
44 const struct clk_factors_config
*config
;
45 void (*get_factors
)(struct factors_request
*req
);
46 void (*recalc
)(struct factors_request
*req
);
50 struct clk_gate
*gate
;
53 struct clk
*sunxi_factors_register(struct device_node
*node
,
54 const struct factors_data
*data
,
58 void sunxi_factors_unregister(struct device_node
*node
, struct clk
*clk
);