Lines Matching full:mux
21 struct mtk_clk_cpumux *mux = to_mtk_clk_cpumux(hw); in clk_cpumux_get_parent() local
24 regmap_read(mux->regmap, mux->reg, &val); in clk_cpumux_get_parent()
26 val >>= mux->shift; in clk_cpumux_get_parent()
27 val &= mux->mask; in clk_cpumux_get_parent()
34 struct mtk_clk_cpumux *mux = to_mtk_clk_cpumux(hw); in clk_cpumux_set_parent() local
37 val = index << mux->shift; in clk_cpumux_set_parent()
38 mask = mux->mask << mux->shift; in clk_cpumux_set_parent()
40 return regmap_update_bits(mux->regmap, mux->reg, mask, val); in clk_cpumux_set_parent()
49 mtk_clk_register_cpumux(const struct mtk_composite *mux, in mtk_clk_register_cpumux() argument
60 init.name = mux->name; in mtk_clk_register_cpumux()
62 init.parent_names = mux->parent_names; in mtk_clk_register_cpumux()
63 init.num_parents = mux->num_parents; in mtk_clk_register_cpumux()
64 init.flags = mux->flags; in mtk_clk_register_cpumux()
66 cpumux->reg = mux->mux_reg; in mtk_clk_register_cpumux()
67 cpumux->shift = mux->mux_shift; in mtk_clk_register_cpumux()
68 cpumux->mask = BIT(mux->mux_width) - 1; in mtk_clk_register_cpumux()
95 const struct mtk_composite *mux = &clks[i]; in mtk_clk_register_cpumuxes() local
97 clk = mtk_clk_register_cpumux(mux, regmap); in mtk_clk_register_cpumuxes()
100 mux->name, PTR_ERR(clk)); in mtk_clk_register_cpumuxes()
104 clk_data->clks[mux->id] = clk; in mtk_clk_register_cpumuxes()