On Thu, Nov 18, 2021 at 02:32:07PM +0100, Takashi Iwai wrote: > Sameer Pujar wrote: > > + old_mask = (value >> TEGRA210_MVC_MUTE_SHIFT) & TEGRA210_MUTE_MASK_EN; > > + new_mask = ucontrol->value.integer.value[0]; > > + > > + if (new_mask == old_mask) { > > + err = 0; > > + goto end; > > + } > > > > err = regmap_update_bits(mvc->regmap, mc->reg, > > TEGRA210_MVC_MUTE_MASK, > > - mute_mask << TEGRA210_MVC_MUTE_SHIFT); > > + new_mask << TEGRA210_MVC_MUTE_SHIFT); > I guess this test-and-update procedure can be simplified with > regmap_update_bits_check(). Yes, this is exactly the application that _update_bits_check() was written for.
Attachment:
signature.asc
Description: PGP signature