All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: arizona: Correct check whether the pin is an input
@ 2017-04-19  9:30 Charles Keepax
  2017-04-24 14:22 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Keepax @ 2017-04-19  9:30 UTC (permalink / raw)
  To: linus.walleij; +Cc: gnurou, linux-gpio, patches

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: 11598d174050 ("gpio: arizona: Correct handling for reading input GPIOs")
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/gpio/gpio-arizona.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c
index 60b3102..cd23fd7 100644
--- a/drivers/gpio/gpio-arizona.c
+++ b/drivers/gpio/gpio-arizona.c
@@ -51,7 +51,7 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
 		return ret;
 
 	/* 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);
 		if (ret < 0) {
 			dev_err(chip->parent, "Failed to resume: %d\n", ret);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio: arizona: Correct check whether the pin is an input
  2017-04-19  9:30 [PATCH] gpio: arizona: Correct check whether the pin is an input Charles Keepax
@ 2017-04-24 14:22 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2017-04-24 14:22 UTC (permalink / raw)
  To: Charles Keepax
  Cc: Alexandre Courbot, linux-gpio,
	open list:WOLFSON MICROELECTRONICS DRIVERS

On Wed, Apr 19, 2017 at 11:30 AM, Charles Keepax
<ckeepax@opensource.wolfsonmicro.com> wrote:

> 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: 11598d174050 ("gpio: arizona: Correct handling for reading input GPIOs")
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-24 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19  9:30 [PATCH] gpio: arizona: Correct check whether the pin is an input Charles Keepax
2017-04-24 14:22 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.