]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
pinctrl: cs42l43: Fix polarity on debounce
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Fri, 8 May 2026 14:34:53 +0000 (15:34 +0100)
committerLinus Walleij <linusw@kernel.org>
Wed, 27 May 2026 12:24:19 +0000 (14:24 +0200)
The debounce bit sets a bypass on the debounce rather than enabling it,
as such the current polarity of the debounce is set incorrectly. Invert
the polarity to correct this.

Fixes: d5282a539297 ("pinctrl: cs42l43: Add support for the cs42l43")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/cirrus/pinctrl-cs42l43.c

index 3cc183520607706bc907acaaac4c1efe84b63251..305233fc1987625bd3616085eeb544a37d171a6b 100644 (file)
@@ -343,7 +343,7 @@ static int cs42l43_pin_set_db(struct cs42l43_pin *priv, unsigned int pin,
 
        return regmap_update_bits(priv->regmap, CS42L43_GPIO_CTRL2,
                                  CS42L43_GPIO1_DEGLITCH_BYP_MASK << pin,
-                                 !!us << pin);
+                                 !us << pin);
 }
 
 static int cs42l43_pin_config_get(struct pinctrl_dev *pctldev,