“31867499b21b2374eb0cc6b3d1ea6b4ade4d1cc2”上不存在“README.md”
提交 64c6a711 编写于 作者: C Charles Keepax 提交者: Linus Walleij

gpio: arizona: Correct check whether the pin is an input

The logic to check if the pin is an input or output whilst testing if we
need to read the register value from the hardware or not is currently
inverted. Remove the erroneous not from the if statement.

Fixes: 11598d17 ("gpio: arizona: Correct handling for reading input GPIOs")
Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 42fcb203
...@@ -51,7 +51,7 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset) ...@@ -51,7 +51,7 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
return ret; return ret;
/* Resume to read actual registers for input pins */ /* Resume to read actual registers for input pins */
if (!(val & ARIZONA_GPN_DIR)) { if (val & ARIZONA_GPN_DIR) {
ret = pm_runtime_get_sync(chip->parent); ret = pm_runtime_get_sync(chip->parent);
if (ret < 0) { if (ret < 0) {
dev_err(chip->parent, "Failed to resume: %d\n", ret); dev_err(chip->parent, "Failed to resume: %d\n", ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部