Lines Matching full:gate
30 struct visconti_clk_gate *gate = to_visconti_clk_gate(hw); in visconti_gate_clk_is_enabled() local
31 u32 clk = BIT(gate->ck_idx); in visconti_gate_clk_is_enabled()
34 regmap_read(gate->regmap, gate->ckon_offset, &val); in visconti_gate_clk_is_enabled()
40 struct visconti_clk_gate *gate = to_visconti_clk_gate(hw); in visconti_gate_clk_disable() local
41 u32 clk = BIT(gate->ck_idx); in visconti_gate_clk_disable()
44 spin_lock_irqsave(gate->lock, flags); in visconti_gate_clk_disable()
47 spin_unlock_irqrestore(gate->lock, flags); in visconti_gate_clk_disable()
51 regmap_update_bits(gate->regmap, gate->ckoff_offset, clk, clk); in visconti_gate_clk_disable()
52 spin_unlock_irqrestore(gate->lock, flags); in visconti_gate_clk_disable()
57 struct visconti_clk_gate *gate = to_visconti_clk_gate(hw); in visconti_gate_clk_enable() local
58 u32 clk = BIT(gate->ck_idx); in visconti_gate_clk_enable()
61 spin_lock_irqsave(gate->lock, flags); in visconti_gate_clk_enable()
62 regmap_update_bits(gate->regmap, gate->ckon_offset, clk, clk); in visconti_gate_clk_enable()
63 spin_unlock_irqrestore(gate->lock, flags); in visconti_gate_clk_enable()
84 struct visconti_clk_gate *gate; in visconti_clk_register_gate() local
96 gate = devm_kzalloc(dev, sizeof(*gate), GFP_KERNEL); in visconti_clk_register_gate()
97 if (!gate) in visconti_clk_register_gate()
106 gate->regmap = regmap; in visconti_clk_register_gate()
107 gate->ckon_offset = clks->ckon_offset; in visconti_clk_register_gate()
108 gate->ckoff_offset = clks->ckoff_offset; in visconti_clk_register_gate()
109 gate->ck_idx = clks->ck_idx; in visconti_clk_register_gate()
110 gate->rson_offset = rson_offset; in visconti_clk_register_gate()
111 gate->rsoff_offset = rsoff_offset; in visconti_clk_register_gate()
112 gate->rs_idx = rs_idx; in visconti_clk_register_gate()
113 gate->lock = lock; in visconti_clk_register_gate()
114 gate->hw.init = &init; in visconti_clk_register_gate()
116 hw = &gate->hw; in visconti_clk_register_gate()