Lines Matching refs:hw
221 int (*prepare)(struct clk_hw *hw);
222 void (*unprepare)(struct clk_hw *hw);
223 int (*is_prepared)(struct clk_hw *hw);
224 void (*unprepare_unused)(struct clk_hw *hw);
225 int (*enable)(struct clk_hw *hw);
226 void (*disable)(struct clk_hw *hw);
227 int (*is_enabled)(struct clk_hw *hw);
228 void (*disable_unused)(struct clk_hw *hw);
229 int (*save_context)(struct clk_hw *hw);
230 void (*restore_context)(struct clk_hw *hw);
231 unsigned long (*recalc_rate)(struct clk_hw *hw, unsigned long parent_rate);
232 long (*round_rate)(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate);
233 int (*determine_rate)(struct clk_hw *hw, struct clk_rate_request *req);
234 int (*set_parent)(struct clk_hw *hw, u8 index);
235 u8 (*get_parent)(struct clk_hw *hw);
236 int (*set_rate)(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate);
237 int (*set_rate_and_parent)(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index);
238 unsigned long (*recalc_accuracy)(struct clk_hw *hw, unsigned long parent_accuracy);
239 int (*get_phase)(struct clk_hw *hw);
240 int (*set_phase)(struct clk_hw *hw, int degrees);
241 int (*get_duty_cycle)(struct clk_hw *hw, struct clk_duty *duty);
242 int (*set_duty_cycle)(struct clk_hw *hw, struct clk_duty *duty);
243 int (*init)(struct clk_hw *hw);
244 void (*terminate)(struct clk_hw *hw);
245 void (*debug_init)(struct clk_hw *hw, struct dentry *dentry);
250 * @hw: parent clk_hw pointer (used for clk providers with internal clks)
256 const struct clk_hw *hw;
320 * @hw: handle between common and hardware-specific interfaces
330 struct clk_hw hw;
421 void clk_hw_unregister_fixed_rate(struct clk_hw *hw);
428 * @hw: handle between common and hardware-specific interfaces
449 struct clk_hw hw;
456 #define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw)
514 void clk_hw_unregister_gate(struct clk_hw *hw);
515 int clk_gate_is_enabled(struct clk_hw *hw);
525 * @hw: handle between common and hardware-specific interfaces
563 struct clk_hw hw;
574 #define to_clk_divider(_hw) container_of(_hw, struct clk_divider, hw)
588 unsigned long divider_recalc_rate(struct clk_hw *hw, unsigned long parent_rate, unsigned int val,
590 long divider_round_rate_parent(struct clk_hw *hw, struct clk_hw *parent, unsigned long rate, unsigned long *prate,
592 long divider_ro_round_rate_parent(struct clk_hw *hw, struct clk_hw *parent, unsigned long rate, unsigned long *prate,
723 void clk_hw_unregister_divider(struct clk_hw *hw);
728 * @hw: handle between common and hardware-specific interfaces
755 struct clk_hw hw;
764 #define to_clk_mux(_hw) container_of(_hw, struct clk_mux, hw)
802 int clk_mux_val_to_index(struct clk_hw *hw, u32 *table, unsigned int flags, unsigned int val);
806 void clk_hw_unregister_mux(struct clk_hw *hw);
813 * @hw: handle between common and hardware-specific interfaces
823 struct clk_hw hw;
828 #define to_clk_fixed_factor(_hw) container_of(_hw, struct clk_fixed_factor, hw)
836 void clk_hw_unregister_fixed_factor(struct clk_hw *hw);
841 * @hw: handle between common and hardware-specific interfaces
863 struct clk_hw hw;
873 void (*approximation)(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate, unsigned long *m,
878 #define to_clk_fd(_hw) container_of(_hw, struct clk_fractional_divider, hw)
891 void clk_hw_unregister_fractional_divider(struct clk_hw *hw);
896 * @hw: handle between common and hardware-specific interfaces
918 struct clk_hw hw;
926 #define to_clk_multiplier(_hw) container_of(_hw, struct clk_multiplier, hw)
937 * @hw: handle between common and hardware-specific interfaces
949 struct clk_hw hw;
962 #define to_clk_composite(_hw) container_of(_hw, struct clk_composite, hw)
984 void clk_hw_unregister_composite(struct clk_hw *hw);
986 struct clk *clk_register(struct device *dev, struct clk_hw *hw);
987 struct clk *devm_clk_register(struct device *dev, struct clk_hw *hw);
989 int __must_check clk_hw_register(struct device *dev, struct clk_hw *hw);
990 int __must_check devm_clk_hw_register(struct device *dev, struct clk_hw *hw);
991 int __must_check of_clk_hw_register(struct device_node *node, struct clk_hw *hw);
996 void clk_hw_unregister(struct clk_hw *hw);
997 void devm_clk_hw_unregister(struct device *dev, struct clk_hw *hw);
1001 const char *clk_hw_get_name(const struct clk_hw *hw);
1010 unsigned int clk_hw_get_num_parents(const struct clk_hw *hw);
1011 struct clk_hw *clk_hw_get_parent(const struct clk_hw *hw);
1012 struct clk_hw *clk_hw_get_parent_by_index(const struct clk_hw *hw, unsigned int index);
1013 int clk_hw_get_parent_index(struct clk_hw *hw);
1014 int clk_hw_set_parent(struct clk_hw *hw, struct clk_hw *new_parent);
1016 unsigned long clk_hw_get_rate(const struct clk_hw *hw);
1017 unsigned long clk_hw_get_flags(const struct clk_hw *hw);
1018 #define clk_hw_can_set_rate_parent(hw) (clk_hw_get_flags((hw)) & CLK_SET_RATE_PARENT)
1020 bool clk_hw_is_prepared(const struct clk_hw *hw);
1021 bool clk_hw_rate_is_protected(const struct clk_hw *hw);
1022 bool clk_hw_is_enabled(const struct clk_hw *hw);
1025 int __clk_mux_determine_rate(struct clk_hw *hw, struct clk_rate_request *req);
1027 int __clk_mux_determine_rate_closest(struct clk_hw *hw, struct clk_rate_request *req);
1028 int clk_mux_determine_rate_flags(struct clk_hw *hw, struct clk_rate_request *req, unsigned long flags);
1029 void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent);
1030 void clk_hw_set_rate_range(struct clk_hw *hw, unsigned long min_rate, unsigned long max_rate);
1038 static inline long divider_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate,
1041 return divider_round_rate_parent(hw, clk_hw_get_parent(hw), rate, prate, table, width, flags);
1044 static inline long divider_ro_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate,
1048 return divider_ro_round_rate_parent(hw, clk_hw_get_parent(hw), rate, prate, table, width, flags, val);
1054 unsigned long clk_hw_round_rate(struct clk_hw *hw, unsigned long rate);
1164 .hw.init = CLK_HW_INIT(_name, _parent, &clk_fixed_factor_ops, _flags), \
1171 .hw.init = CLK_HW_INIT_HW(_name, _parent, &clk_fixed_factor_ops, _flags), \
1182 .hw.init = CLK_HW_INIT_HWS(_name, _parent, &clk_fixed_factor_ops, _flags), \
1189 .hw.init = CLK_HW_INIT_FW_NAME(_name, _parent, &clk_fixed_factor_ops, _flags), \
1258 void clk_gate_restore_context(struct clk_hw *hw);