Lines Matching refs:struct

21 details of its counterpart.  First is the common definition of struct
25 drivers/clk/clk.c. Finally there is struct clk_ops, whose operations
29 callbacks registered with struct clk_ops and the corresponding
31 the remainder of this document any reference to a callback in struct
33 implementation of that code. Likewise, references to struct clk_foo
37 Tying the two halves of this interface together is struct clk_hw, which
38 is defined in struct clk_foo and pointed to within struct clk_core. This
45 Below is the common struct clk_core definition from
48 struct clk_core {
50 const struct clk_ops *ops;
51 struct clk_hw *hw;
52 struct module *owner;
53 struct clk_core *parent;
55 struct clk_core **parents;
63 struct clk. That api is documented in include/linux/clk.h.
65 Platforms and devices utilizing the common struct clk_core use the struct
66 clk_ops pointer in struct clk_core to perform the hardware-specific parts of
69 struct clk_ops {
70 int (*prepare)(struct clk_hw *hw);
71 void (*unprepare)(struct clk_hw *hw);
72 int (*is_prepared)(struct clk_hw *hw);
73 void (*unprepare_unused)(struct clk_hw *hw);
74 int (*enable)(struct clk_hw *hw);
75 void (*disable)(struct clk_hw *hw);
76 int (*is_enabled)(struct clk_hw *hw);
77 void (*disable_unused)(struct clk_hw *hw);
78 unsigned long (*recalc_rate)(struct clk_hw *hw,
80 long (*round_rate)(struct clk_hw *hw,
83 int (*determine_rate)(struct clk_hw *hw,
84 struct clk_rate_request *req);
85 int (*set_parent)(struct clk_hw *hw, u8 index);
86 u8 (*get_parent)(struct clk_hw *hw);
87 int (*set_rate)(struct clk_hw *hw,
90 int (*set_rate_and_parent)(struct clk_hw *hw,
94 unsigned long (*recalc_accuracy)(struct clk_hw *hw,
96 int (*get_phase)(struct clk_hw *hw);
97 int (*set_phase)(struct clk_hw *hw, int degrees);
98 void (*init)(struct clk_hw *hw);
99 void (*debug_init)(struct clk_hw *hw,
100 struct dentry *dentry);
106 The strength of the common struct clk_core comes from its .ops and .hw pointers
107 which abstract the details of struct clk from the hardware-specific bits, and
111 struct clk_gate {
112 struct clk_hw hw;
118 struct clk_gate contains struct clk_hw hw as well as hardware-specific
122 framework code and struct clk_core.
126 struct clk *clk;
138 [resolves struct clk gate with to_clk_gate(hw)]
143 static void clk_gate_set_bit(struct clk_gate *gate)
154 #define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw)
170 struct clk_foo {
171 struct clk_hw hw;
178 struct clk_ops clk_foo_ops = {
185 #define to_clk_foo(_hw) container_of(_hw, struct clk_foo, hw)
187 int clk_foo_enable(struct clk_hw *hw)
189 struct clk_foo *foo;
244 registration function. This function simply populates struct clk_foo's
245 data and then passes the common struct clk parameters to the framework