Skip to content

Commit 94c7170

Browse files
PatrickRudolphlinusw
authored andcommitted
pinctrl: cy8c95x0: Fix get_pincfg
Invert the register value for PIN_CONFIG_OUTPUT_ENABLE to return the opposite of PIN_CONFIG_INPUT_ENABLE. Signed-off-by: Patrick Rudolph <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 04dfca9 commit 94c7170

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/pinctrl/pinctrl-cy8c95x0.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,8 @@ static int cy8c95x0_gpio_get_pincfg(struct cy8c95x0_pinctrl *chip,
715715
ret = regmap_read(chip->regmap, reg, &reg_val);
716716
if (reg_val & bit)
717717
arg = 1;
718+
if (param == PIN_CONFIG_OUTPUT_ENABLE)
719+
arg = !arg;
718720

719721
*config = pinconf_to_config_packed(param, (u16)arg);
720722
out:

0 commit comments

Comments
 (0)