mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
clk: tenstorrent: use regmap_assign_bits() for conditional set/clear
Replace if/else blocks using regmap_set_bits()/regmap_clear_bits() with the simpler regmap_assign_bits() call. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com> Reviewed-by: Drew Fustini (Tenstorrent) <fustini@kernel.org> Link: https://patch.msgid.link/20260924083439.461769-1-peng.fan@oss.nxp.com Signed-off-by: Drew Fustini (Tenstorrent) <fustini@kernel.org>
This commit is contained in:
parent
3f0655b51e
commit
d5e56ca6c5
|
|
@ -205,14 +205,9 @@ static int atlantis_clk_gate_endisable(struct clk_hw *hw, int enable)
|
|||
{
|
||||
struct atlantis_clk_gate *gate = hw_to_atlantis_clk_gate(hw);
|
||||
|
||||
if (enable)
|
||||
return regmap_set_bits(gate->common.regmap,
|
||||
gate->config.reg_offset,
|
||||
gate->config.enable);
|
||||
else
|
||||
return regmap_clear_bits(gate->common.regmap,
|
||||
gate->config.reg_offset,
|
||||
gate->config.enable);
|
||||
return regmap_assign_bits(gate->common.regmap,
|
||||
gate->config.reg_offset,
|
||||
gate->config.enable, enable);
|
||||
}
|
||||
|
||||
static int atlantis_clk_gate_enable(struct clk_hw *hw)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user