Skip to content

Commit d6afdf8

Browse files
andy-shevlinusw
authored andcommitted
pinctrl: cy8c95x0: Drop atomicity on operations on push_pull
The push_pull member is always accessed under the mutex, hence no need to use atomic operations on it. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 56e380c commit d6afdf8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

drivers/pinctrl/pinctrl-cy8c95x0.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,8 @@ static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned int off)
573573
ret = regmap_write_bits(chip->regmap, CY8C95X0_DRV_HIZ, bit, bit);
574574
if (ret)
575575
goto out;
576-
clear_bit(off, chip->push_pull);
576+
577+
__clear_bit(off, chip->push_pull);
577578
}
578579

579580
out:
@@ -775,27 +776,27 @@ static int cy8c95x0_gpio_set_pincfg(struct cy8c95x0_pinctrl *chip,
775776

776777
switch (param) {
777778
case PIN_CONFIG_BIAS_PULL_UP:
778-
clear_bit(off, chip->push_pull);
779+
__clear_bit(off, chip->push_pull);
779780
reg = CY8C95X0_DRV_PU;
780781
break;
781782
case PIN_CONFIG_BIAS_PULL_DOWN:
782-
clear_bit(off, chip->push_pull);
783+
__clear_bit(off, chip->push_pull);
783784
reg = CY8C95X0_DRV_PD;
784785
break;
785786
case PIN_CONFIG_BIAS_DISABLE:
786-
clear_bit(off, chip->push_pull);
787+
__clear_bit(off, chip->push_pull);
787788
reg = CY8C95X0_DRV_HIZ;
788789
break;
789790
case PIN_CONFIG_DRIVE_OPEN_DRAIN:
790-
clear_bit(off, chip->push_pull);
791+
__clear_bit(off, chip->push_pull);
791792
reg = CY8C95X0_DRV_ODL;
792793
break;
793794
case PIN_CONFIG_DRIVE_OPEN_SOURCE:
794-
clear_bit(off, chip->push_pull);
795+
__clear_bit(off, chip->push_pull);
795796
reg = CY8C95X0_DRV_ODH;
796797
break;
797798
case PIN_CONFIG_DRIVE_PUSH_PULL:
798-
set_bit(off, chip->push_pull);
799+
__set_bit(off, chip->push_pull);
799800
reg = CY8C95X0_DRV_PP_FAST;
800801
break;
801802
case PIN_CONFIG_MODE_PWM:

0 commit comments

Comments
 (0)