Lines Matching refs:mux
20 struct clk_regmap_mux *mux = to_clk_regmap_mux(hw); in mux_get_parent() local
22 unsigned int mask = GENMASK(mux->width - 1, 0); in mux_get_parent()
25 regmap_read(clkr->regmap, mux->reg, &val); in mux_get_parent()
27 val >>= mux->shift; in mux_get_parent()
30 if (mux->parent_map) in mux_get_parent()
31 return qcom_find_cfg_index(hw, mux->parent_map, val); in mux_get_parent()
38 struct clk_regmap_mux *mux = to_clk_regmap_mux(hw); in mux_set_parent() local
40 unsigned int mask = GENMASK(mux->width + mux->shift - 1, mux->shift); in mux_set_parent()
43 if (mux->parent_map) in mux_set_parent()
44 index = mux->parent_map[index].cfg; in mux_set_parent()
47 val <<= mux->shift; in mux_set_parent()
49 return regmap_update_bits(clkr->regmap, mux->reg, mask, val); in mux_set_parent()