Skip to content

Commit d95abca

Browse files
AngeloGioacchino Del Regnobebarino
authored andcommitted
clk: mediatek: clk-gate: Use regmap_{set/clear}_bits helpers
Appropriately change calls to regmap_update_bits() with regmap_set_bits() and regmap_clear_bits() for improved readability. Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 4233463 commit d95abca

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/clk/mediatek/clk-gate.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,15 @@ static void mtk_cg_clr_bit(struct clk_hw *hw)
5353
static void mtk_cg_set_bit_no_setclr(struct clk_hw *hw)
5454
{
5555
struct mtk_clk_gate *cg = to_mtk_clk_gate(hw);
56-
u32 cgbit = BIT(cg->bit);
5756

58-
regmap_update_bits(cg->regmap, cg->sta_ofs, cgbit, cgbit);
57+
regmap_set_bits(cg->regmap, cg->sta_ofs, BIT(cg->bit));
5958
}
6059

6160
static void mtk_cg_clr_bit_no_setclr(struct clk_hw *hw)
6261
{
6362
struct mtk_clk_gate *cg = to_mtk_clk_gate(hw);
64-
u32 cgbit = BIT(cg->bit);
6563

66-
regmap_update_bits(cg->regmap, cg->sta_ofs, cgbit, 0);
64+
regmap_clear_bits(cg->regmap, cg->sta_ofs, BIT(cg->bit));
6765
}
6866

6967
static int mtk_cg_enable(struct clk_hw *hw)

0 commit comments

Comments
 (0)