linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: aspeed: Remove dependence on GPIOF_* macros
@ 2017-02-02  4:28 Andrew Jeffery
  2017-02-02  5:33 ` Joel Stanley
  2017-02-04 20:35 ` Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Jeffery @ 2017-02-02  4:28 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Andrew Jeffery, Joel Stanley, linux-gpio, linux-kernel, openbmc

1736f75d35e47409ad776273133d0f558a4c8253 is a (v2) patch which had
unresolved review comments[1]. Address the comments by removing the use
of macros from the consumer header (this patch represents the diff
between v2 and v3[2]).

[1] https://lkml.org/lkml/2017/1/26/337
[2] https://lkml.org/lkml/2017/1/26/786

Fixes: 1736f75d35e4 ("gpio: aspeed: Add banks Y, Z, AA, AB and AC")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---

Note: This should be applied to pinctrl/devel where the linked GPIO patches
have landed. See discussion at https://lkml.org/lkml/2017/2/1/390

 drivers/gpio/gpio-aspeed.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index 6e4b278a82f1..fb16cc771c0d 100644
--- a/drivers/gpio/gpio-aspeed.c
+++ b/drivers/gpio/gpio-aspeed.c
@@ -15,7 +15,6 @@
 #include <linux/io.h>
 #include <linux/spinlock.h>
 #include <linux/platform_device.h>
-#include <linux/gpio.h>
 #include <linux/gpio/driver.h>
 #include <linux/pinctrl/consumer.h>
 
@@ -259,10 +258,10 @@ static int aspeed_gpio_get_direction(struct gpio_chip *gc, unsigned int offset)
 	u32 val;
 
 	if (!have_input(gpio, offset))
-		return GPIOF_DIR_OUT;
+		return 0;
 
 	if (!have_output(gpio, offset))
-		return GPIOF_DIR_IN;
+		return 1;
 
 	spin_lock_irqsave(&gpio->lock, flags);
 
-- 
2.9.3

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

* Re: [PATCH] gpio: aspeed: Remove dependence on GPIOF_* macros
  2017-02-02  4:28 [PATCH] gpio: aspeed: Remove dependence on GPIOF_* macros Andrew Jeffery
@ 2017-02-02  5:33 ` Joel Stanley
  2017-02-04 20:35 ` Linus Walleij
  1 sibling, 0 replies; 4+ messages in thread
From: Joel Stanley @ 2017-02-02  5:33 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: Linus Walleij, linux-gpio, linux-kernel, OpenBMC Maillist

On Thu, Feb 2, 2017 at 2:58 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
> 1736f75d35e47409ad776273133d0f558a4c8253 is a (v2) patch which had
> unresolved review comments[1]. Address the comments by removing the use
> of macros from the consumer header (this patch represents the diff
> between v2 and v3[2]).
>
> [1] https://lkml.org/lkml/2017/1/26/337
> [2] https://lkml.org/lkml/2017/1/26/786
>
> Fixes: 1736f75d35e4 ("gpio: aspeed: Add banks Y, Z, AA, AB and AC")
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

Acked-by: Joel Stanley <joel@jms.id.au>

Cheers,

Joel

> ---
>
> Note: This should be applied to pinctrl/devel where the linked GPIO patches
> have landed. See discussion at https://lkml.org/lkml/2017/2/1/390
>
>  drivers/gpio/gpio-aspeed.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
> index 6e4b278a82f1..fb16cc771c0d 100644
> --- a/drivers/gpio/gpio-aspeed.c
> +++ b/drivers/gpio/gpio-aspeed.c
> @@ -15,7 +15,6 @@
>  #include <linux/io.h>
>  #include <linux/spinlock.h>
>  #include <linux/platform_device.h>
> -#include <linux/gpio.h>
>  #include <linux/gpio/driver.h>
>  #include <linux/pinctrl/consumer.h>
>
> @@ -259,10 +258,10 @@ static int aspeed_gpio_get_direction(struct gpio_chip *gc, unsigned int offset)
>         u32 val;
>
>         if (!have_input(gpio, offset))
> -               return GPIOF_DIR_OUT;
> +               return 0;
>
>         if (!have_output(gpio, offset))
> -               return GPIOF_DIR_IN;
> +               return 1;
>
>         spin_lock_irqsave(&gpio->lock, flags);
>
> --
> 2.9.3
>

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

* Re: [PATCH] gpio: aspeed: Remove dependence on GPIOF_* macros
  2017-02-02  4:28 [PATCH] gpio: aspeed: Remove dependence on GPIOF_* macros Andrew Jeffery
  2017-02-02  5:33 ` Joel Stanley
@ 2017-02-04 20:35 ` Linus Walleij
  2017-02-06  0:11   ` Andrew Jeffery
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2017-02-04 20:35 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: Joel Stanley, linux-gpio, linux-kernel, OpenBMC Maillist

On Thu, Feb 2, 2017 at 5:28 AM, Andrew Jeffery <andrew@aj.id.au> wrote:

> 1736f75d35e47409ad776273133d0f558a4c8253 is a (v2) patch which had
> unresolved review comments[1]. Address the comments by removing the use
> of macros from the consumer header (this patch represents the diff
> between v2 and v3[2]).
>
> [1] https://lkml.org/lkml/2017/1/26/337
> [2] https://lkml.org/lkml/2017/1/26/786
>
> Fixes: 1736f75d35e4 ("gpio: aspeed: Add banks Y, Z, AA, AB and AC")
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

Patch applied with Joel's ACK.

Thank you for just tirelessly fixing my mistakes, I owe you one.

Yours,
Linus Walleij

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

* Re: [PATCH] gpio: aspeed: Remove dependence on GPIOF_* macros
  2017-02-04 20:35 ` Linus Walleij
@ 2017-02-06  0:11   ` Andrew Jeffery
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Jeffery @ 2017-02-06  0:11 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Joel Stanley, linux-gpio, linux-kernel, OpenBMC Maillist

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

On Sat, 2017-02-04 at 21:35 +0100, Linus Walleij wrote:
> > On Thu, Feb 2, 2017 at 5:28 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> 
> > 1736f75d35e47409ad776273133d0f558a4c8253 is a (v2) patch which had
> > unresolved review comments[1]. Address the comments by removing the use
> > of macros from the consumer header (this patch represents the diff
> > between v2 and v3[2]).
> > 
> > [1] https://lkml.org/lkml/2017/1/26/337
> > [2] https://lkml.org/lkml/2017/1/26/786
> > 
> > Fixes: 1736f75d35e4 ("gpio: aspeed: Add banks Y, Z, AA, AB and AC")
> > Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> 
> Patch applied with Joel's ACK.
> 
> Thank you for just tirelessly fixing my mistakes, I owe you one.

No worries!

Andrew

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

end of thread, other threads:[~2017-02-06  0:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02  4:28 [PATCH] gpio: aspeed: Remove dependence on GPIOF_* macros Andrew Jeffery
2017-02-02  5:33 ` Joel Stanley
2017-02-04 20:35 ` Linus Walleij
2017-02-06  0:11   ` Andrew Jeffery

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).