diff mbox series

[v2,3/3] gpiolib: of: Use named item for enum gpiod_flags variable

Message ID 20201022165847.56153-3-andriy.shevchenko@linux.intel.com
State Superseded
Headers show
Series [v2,1/3] gpiolib: acpi: Respect bias settings for GpioInt() resource | expand

Commit Message

Andy Shevchenko Oct. 22, 2020, 4:58 p.m. UTC
Use named item instead of plain integer for enum gpiod_flags
to make it clear that even 0 has its own meaning.

Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: no changes
 drivers/gpio/gpiolib-of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bartosz Golaszewski Oct. 26, 2020, 2:37 p.m. UTC | #1
On Thu, Oct 22, 2020 at 6:58 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Use named item instead of plain integer for enum gpiod_flags
> to make it clear that even 0 has its own meaning.
>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> v2: no changes
>  drivers/gpio/gpiolib-of.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
> index 2f895a2b8411..892a513b7a64 100644
> --- a/drivers/gpio/gpiolib-of.c
> +++ b/drivers/gpio/gpiolib-of.c
> @@ -593,7 +593,7 @@ static struct gpio_desc *of_parse_own_gpio(struct device_node *np,
>
>         xlate_flags = 0;
>         *lflags = GPIO_LOOKUP_FLAGS_DEFAULT;
> -       *dflags = 0;
> +       *dflags = GPIOD_ASIS;
>
>         ret = of_property_read_u32(chip_np, "#gpio-cells", &tmp);
>         if (ret)
> --
> 2.28.0
>

This patch doesn't seem to depend on the others in this series so I
applied it to my tree. Let me know if that's not the case. I'll let
you take the ACPI patches.

Bartosz
Andy Shevchenko Oct. 26, 2020, 2:44 p.m. UTC | #2
On Mon, Oct 26, 2020 at 4:40 PM Bartosz Golaszewski
<bgolaszewski@baylibre.com> wrote:
>

> On Thu, Oct 22, 2020 at 6:58 PM Andy Shevchenko

> <andriy.shevchenko@linux.intel.com> wrote:

> >

> > Use named item instead of plain integer for enum gpiod_flags

> > to make it clear that even 0 has its own meaning.


> This patch doesn't seem to depend on the others in this series so I

> applied it to my tree. Let me know if that's not the case. I'll let

> you take the ACPI patches.


It's fine, thanks! I have just sent an additional message to elaborate
my vision, but again, the approach for this patch you chose is just
fine.

-- 
With Best Regards,
Andy Shevchenko
Linus Walleij Nov. 5, 2020, 9:05 a.m. UTC | #3
On Mon, Oct 26, 2020 at 3:43 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Mon, Oct 26, 2020 at 4:40 PM Bartosz Golaszewski
> <bgolaszewski@baylibre.com> wrote:
> >
> > On Thu, Oct 22, 2020 at 6:58 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > Use named item instead of plain integer for enum gpiod_flags
> > > to make it clear that even 0 has its own meaning.
>
> > This patch doesn't seem to depend on the others in this series so I
> > applied it to my tree. Let me know if that's not the case. I'll let
> > you take the ACPI patches.
>
> It's fine, thanks! I have just sent an additional message to elaborate
> my vision, but again, the approach for this patch you chose is just
> fine.

I might have lost track of the state of this patch set and mix it
up conceptually with some other patch sets so bear with me if
there are mistakes.

I see that Bartosz applied this one patch at least.

Yours,
Linus Walleij
Andy Shevchenko Nov. 5, 2020, 4:26 p.m. UTC | #4
On Thu, Nov 05, 2020 at 10:05:52AM +0100, Linus Walleij wrote:
> On Mon, Oct 26, 2020 at 3:43 PM Andy Shevchenko

> <andy.shevchenko@gmail.com> wrote:

> > On Mon, Oct 26, 2020 at 4:40 PM Bartosz Golaszewski

> > <bgolaszewski@baylibre.com> wrote:

> > >

> > > On Thu, Oct 22, 2020 at 6:58 PM Andy Shevchenko

> > > <andriy.shevchenko@linux.intel.com> wrote:

> > > >

> > > > Use named item instead of plain integer for enum gpiod_flags

> > > > to make it clear that even 0 has its own meaning.

> >

> > > This patch doesn't seem to depend on the others in this series so I

> > > applied it to my tree. Let me know if that's not the case. I'll let

> > > you take the ACPI patches.

> >

> > It's fine, thanks! I have just sent an additional message to elaborate

> > my vision, but again, the approach for this patch you chose is just

> > fine.

> 

> I might have lost track of the state of this patch set and mix it

> up conceptually with some other patch sets so bear with me if

> there are mistakes.


Consider to review / Ack [1]. I hope I addressed all / most of the comments.

> I see that Bartosz applied this one patch at least.


Yes.

[1]: https://lore.kernel.org/linux-gpio/20201102191722.81502-1-andriy.shevchenko@linux.intel.com/

-- 
With Best Regards,
Andy Shevchenko
diff mbox series

Patch

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 2f895a2b8411..892a513b7a64 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -593,7 +593,7 @@  static struct gpio_desc *of_parse_own_gpio(struct device_node *np,
 
 	xlate_flags = 0;
 	*lflags = GPIO_LOOKUP_FLAGS_DEFAULT;
-	*dflags = 0;
+	*dflags = GPIOD_ASIS;
 
 	ret = of_property_read_u32(chip_np, "#gpio-cells", &tmp);
 	if (ret)