Lines Matching defs:cg
20 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw);
23 regmap_read(cg->regmap, cg->sta_ofs, &val);
25 val &= BIT(cg->bit);
32 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw);
35 regmap_read(cg->regmap, cg->sta_ofs, &val);
37 val &= BIT(cg->bit);
44 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw);
46 regmap_write(cg->regmap, cg->set_ofs, BIT(cg->bit));
51 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw);
53 regmap_write(cg->regmap, cg->clr_ofs, BIT(cg->bit));
58 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw);
59 u32 cgbit = BIT(cg->bit);
61 regmap_update_bits(cg->regmap, cg->sta_ofs, cgbit, cgbit);
66 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw);
67 u32 cgbit = BIT(cg->bit);
69 regmap_update_bits(cg->regmap, cg->sta_ofs, cgbit, 0);
156 struct mtk_clk_gate *cg;
160 cg = kzalloc(sizeof(*cg), GFP_KERNEL);
161 if (!cg)
170 cg->regmap = regmap;
171 cg->set_ofs = set_ofs;
172 cg->clr_ofs = clr_ofs;
173 cg->sta_ofs = sta_ofs;
174 cg->bit = bit;
176 cg->hw.init = &init;
178 clk = clk_register(dev, &cg->hw);
180 kfree(cg);