diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2023-12-19 13:51:18 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-12-20 13:02:18 +0100 |
commit | 94c71705cc49092cef60ece13a28680809096fd4 (patch) | |
tree | c737f44412995dd88c7cee3f544f3a62d310b307 | |
parent | 04dfca968cf7349773126340991b68a83378aca2 (diff) |
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 <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20231219125120.4028862-3-patrick.rudolph@9elements.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/pinctrl-cy8c95x0.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c index b925789a035f..fe9545c630a2 100644 --- a/drivers/pinctrl/pinctrl-cy8c95x0.c +++ b/drivers/pinctrl/pinctrl-cy8c95x0.c @@ -715,6 +715,8 @@ static int cy8c95x0_gpio_get_pincfg(struct cy8c95x0_pinctrl *chip, ret = regmap_read(chip->regmap, reg, ®_val); if (reg_val & bit) arg = 1; + if (param == PIN_CONFIG_OUTPUT_ENABLE) + arg = !arg; *config = pinconf_to_config_packed(param, (u16)arg); out: |