]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
pwm: axi-pwmgen: Make use of regmap_clear_bits()
authorUwe Kleine-König <ukleinek@baylibre.com>
Thu, 6 Jun 2024 16:40:47 +0000 (18:40 +0200)
committerUwe Kleine-König <ukleinek@kernel.org>
Wed, 10 Jul 2024 15:52:46 +0000 (17:52 +0200)
Instead of using regmap_update_bits() and passing val=0, better use
regmap_clear_bits().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Acked-by: Trevor Gamblin <tgamblin@baylibre.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240606164047.534741-6-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/pwm-axi-pwmgen.c

index 1bd4150e01585992520b353cda125719ce68c414..aac4f395497ba5bfa560dc901b00673fdaf976b8 100644 (file)
@@ -156,7 +156,7 @@ static int axi_pwmgen_setup(struct regmap *regmap, struct device *dev)
        }
 
        /* Enable the core */
-       ret = regmap_update_bits(regmap, AXI_PWMGEN_REG_CONFIG, AXI_PWMGEN_REG_CONFIG_RESET, 0);
+       ret = regmap_clear_bits(regmap, AXI_PWMGEN_REG_CONFIG, AXI_PWMGEN_REG_CONFIG_RESET);
        if (ret)
                return ret;