Lines Matching refs:mux
25 struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw); in uniphier_clk_mux_set_parent() local
27 return regmap_write_bits(mux->regmap, mux->reg, mux->masks[index], in uniphier_clk_mux_set_parent()
28 mux->vals[index]); in uniphier_clk_mux_set_parent()
33 struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw); in uniphier_clk_mux_get_parent() local
39 ret = regmap_read(mux->regmap, mux->reg, &val); in uniphier_clk_mux_get_parent()
44 if ((mux->masks[i] & val) == mux->vals[i]) in uniphier_clk_mux_get_parent()
61 struct uniphier_clk_mux *mux; in uniphier_clk_register_mux() local
65 mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); in uniphier_clk_register_mux()
66 if (!mux) in uniphier_clk_register_mux()
75 mux->regmap = regmap; in uniphier_clk_register_mux()
76 mux->reg = data->reg; in uniphier_clk_register_mux()
77 mux->masks = data->masks; in uniphier_clk_register_mux()
78 mux->vals = data->vals; in uniphier_clk_register_mux()
79 mux->hw.init = &init; in uniphier_clk_register_mux()
81 ret = devm_clk_hw_register(dev, &mux->hw); in uniphier_clk_register_mux()
85 return &mux->hw; in uniphier_clk_register_mux()