Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220103143712.46675-2-angelogioacchino.delregno@collabora.com
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

AngeloGioacchino Del Regno and committed by
Stephen Boyd
d95abcab 42334638

+2 -4
+2 -4
drivers/clk/mediatek/clk-gate.c
··· 53 53 static void mtk_cg_set_bit_no_setclr(struct clk_hw *hw) 54 54 { 55 55 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw); 56 - u32 cgbit = BIT(cg->bit); 57 56 58 - regmap_update_bits(cg->regmap, cg->sta_ofs, cgbit, cgbit); 57 + regmap_set_bits(cg->regmap, cg->sta_ofs, BIT(cg->bit)); 59 58 } 60 59 61 60 static void mtk_cg_clr_bit_no_setclr(struct clk_hw *hw) 62 61 { 63 62 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw); 64 - u32 cgbit = BIT(cg->bit); 65 63 66 - regmap_update_bits(cg->regmap, cg->sta_ofs, cgbit, 0); 64 + regmap_clear_bits(cg->regmap, cg->sta_ofs, BIT(cg->bit)); 67 65 } 68 66 69 67 static int mtk_cg_enable(struct clk_hw *hw)