Lines Matching refs:hw

50 static int clk_rcg2_is_enabled(struct clk_hw *hw)  in clk_rcg2_is_enabled()  argument
52 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_rcg2_is_enabled()
63 static u8 clk_rcg2_get_parent(struct clk_hw *hw) in clk_rcg2_get_parent() argument
65 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_rcg2_get_parent()
66 int num_parents = clk_hw_get_num_parents(hw); in clk_rcg2_get_parent()
83 __func__, clk_hw_get_name(hw)); in clk_rcg2_get_parent()
91 struct clk_hw *hw = &rcg->clkr.hw; in update_config() local
92 const char *name = clk_hw_get_name(hw); in update_config()
113 static int clk_rcg2_set_parent(struct clk_hw *hw, u8 index) in clk_rcg2_set_parent() argument
115 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_rcg2_set_parent()
153 clk_rcg2_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) in clk_rcg2_recalc_rate() argument
155 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_rcg2_recalc_rate()
179 static int _freq_tbl_determine_rate(struct clk_hw *hw, in _freq_tbl_determine_rate() argument
184 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in _freq_tbl_determine_rate()
191 index = qcom_find_src_index(hw, rcg->parent_map, f->src); in _freq_tbl_determine_rate()
195 clk_flags = clk_hw_get_flags(hw); in _freq_tbl_determine_rate()
196 p = clk_hw_get_parent_by_index(hw, index); in _freq_tbl_determine_rate()
219 static int clk_rcg2_determine_rate(struct clk_hw *hw, in clk_rcg2_determine_rate() argument
222 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_rcg2_determine_rate()
224 return _freq_tbl_determine_rate(hw, rcg->freq_tbl, req); in clk_rcg2_determine_rate()
230 struct clk_hw *hw = &rcg->clkr.hw; in clk_rcg2_configure() local
231 int ret, index = qcom_find_src_index(hw, rcg->parent_map, f->src); in clk_rcg2_configure()
268 static int __clk_rcg2_set_rate(struct clk_hw *hw, unsigned long rate) in __clk_rcg2_set_rate() argument
270 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in __clk_rcg2_set_rate()
280 static int clk_rcg2_set_rate(struct clk_hw *hw, unsigned long rate, in clk_rcg2_set_rate() argument
283 return __clk_rcg2_set_rate(hw, rate); in clk_rcg2_set_rate()
286 static int clk_rcg2_set_rate_and_parent(struct clk_hw *hw, in clk_rcg2_set_rate_and_parent() argument
289 return __clk_rcg2_set_rate(hw, rate); in clk_rcg2_set_rate_and_parent()
303 static int clk_rcg2_shared_force_enable(struct clk_hw *hw, unsigned long rate) in clk_rcg2_shared_force_enable() argument
305 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_rcg2_shared_force_enable()
306 const char *name = clk_hw_get_name(hw); in clk_rcg2_shared_force_enable()
317 ret = clk_rcg2_is_enabled(hw); in clk_rcg2_shared_force_enable()
326 ret = __clk_rcg2_set_rate(hw, rate); in clk_rcg2_shared_force_enable()
335 static int clk_rcg2_shared_set_rate(struct clk_hw *hw, unsigned long rate, in clk_rcg2_shared_set_rate() argument
338 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_rcg2_shared_set_rate()
343 if (!__clk_is_enabled(hw->clk)) in clk_rcg2_shared_set_rate()
346 return clk_rcg2_shared_force_enable(hw, rcg->current_freq); in clk_rcg2_shared_set_rate()
350 clk_rcg2_shared_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) in clk_rcg2_shared_recalc_rate() argument
352 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_rcg2_shared_recalc_rate()
354 return rcg->current_freq = clk_rcg2_recalc_rate(hw, parent_rate); in clk_rcg2_shared_recalc_rate()
357 static int clk_rcg2_shared_enable(struct clk_hw *hw) in clk_rcg2_shared_enable() argument
359 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_rcg2_shared_enable()
361 return clk_rcg2_shared_force_enable(hw, rcg->current_freq); in clk_rcg2_shared_enable()
364 static void clk_rcg2_shared_disable(struct clk_hw *hw) in clk_rcg2_shared_disable() argument
366 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_rcg2_shared_disable()
369 clk_rcg2_shared_set_rate(hw, rcg->freq_tbl[0].freq, 0); in clk_rcg2_shared_disable()
409 static int clk_edp_pixel_set_rate(struct clk_hw *hw, unsigned long rate, in clk_edp_pixel_set_rate() argument
412 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_edp_pixel_set_rate()
448 static int clk_edp_pixel_set_rate_and_parent(struct clk_hw *hw, in clk_edp_pixel_set_rate_and_parent() argument
452 return clk_edp_pixel_set_rate(hw, rate, parent_rate); in clk_edp_pixel_set_rate_and_parent()
455 static int clk_edp_pixel_determine_rate(struct clk_hw *hw, in clk_edp_pixel_determine_rate() argument
458 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_edp_pixel_determine_rate()
465 int index = qcom_find_src_index(hw, rcg->parent_map, f->src); in clk_edp_pixel_determine_rate()
468 req->best_parent_hw = clk_hw_get_parent_by_index(hw, index); in clk_edp_pixel_determine_rate()
509 static int clk_byte_determine_rate(struct clk_hw *hw, in clk_byte_determine_rate() argument
512 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_byte_determine_rate()
514 int index = qcom_find_src_index(hw, rcg->parent_map, f->src); in clk_byte_determine_rate()
522 req->best_parent_hw = p = clk_hw_get_parent_by_index(hw, index); in clk_byte_determine_rate()
533 static int clk_byte_set_rate(struct clk_hw *hw, unsigned long rate, in clk_byte_set_rate() argument
536 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_byte_set_rate()
549 static int clk_byte_set_rate_and_parent(struct clk_hw *hw, in clk_byte_set_rate_and_parent() argument
553 return clk_byte_set_rate(hw, rate, parent_rate); in clk_byte_set_rate_and_parent()
567 static int clk_byte2_determine_rate(struct clk_hw *hw, in clk_byte2_determine_rate() argument
570 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_byte2_determine_rate()
590 static int clk_byte2_set_rate(struct clk_hw *hw, unsigned long rate, in clk_byte2_set_rate() argument
593 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_byte2_set_rate()
596 int i, num_parents = clk_hw_get_num_parents(hw); in clk_byte2_set_rate()
619 static int clk_byte2_set_rate_and_parent(struct clk_hw *hw, in clk_byte2_set_rate_and_parent() argument
623 return clk_byte2_set_rate(hw, rate, parent_rate); in clk_byte2_set_rate_and_parent()
645 static int clk_pixel_determine_rate(struct clk_hw *hw, in clk_pixel_determine_rate() argument
668 static int clk_pixel_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pixel_set_rate() argument
671 struct clk_rcg2 *rcg = to_clk_rcg2(hw); in clk_pixel_set_rate()
678 int i, num_parents = clk_hw_get_num_parents(hw); in clk_pixel_set_rate()
710 static int clk_pixel_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, in clk_pixel_set_rate_and_parent() argument
713 return clk_pixel_set_rate(hw, rate, parent_rate); in clk_pixel_set_rate_and_parent()