diff mbox series

[8/8] gpiolib: move of_gpio_flags into gpiolib-of.c

Message ID 20230126132801.2042371-9-arnd@kernel.org
State New
Headers show
Series gpiolib cleanups | expand

Commit Message

Arnd Bergmann Jan. 26, 2023, 1:28 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

There is no need for this in the header any more, it's just
an implementation detail now.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpio/gpiolib-of.c | 15 +++++++++++++++
 include/linux/of_gpio.h   | 15 ---------------
 2 files changed, 15 insertions(+), 15 deletions(-)

Comments

Andy Shevchenko Jan. 27, 2023, 8:53 a.m. UTC | #1
On Thu, Jan 26, 2023 at 03:47:42PM +0100, Arnd Bergmann wrote:
> On Thu, Jan 26, 2023, at 15:09, Andy Shevchenko wrote:
> > On Thu, Jan 26, 2023 at 02:28:01PM +0100, Arnd Bergmann wrote:
> >> From: Arnd Bergmann <arnd@arndb.de>
> >> 
> >> There is no need for this in the header any more, it's just
> >> an implementation detail now.
> >
> > I have published
> > https://lore.kernel.org/r/20230112145140.67573-1-andriy.shevchenko@linux.intel.com
> > Can it be used?
> 
> Sure, I added a Reviewed-by: on that now. Your patch will conflict
> with my patch 7/8, but we can work that out.

Either Bart takes it independently or you may attach it into your series.
Bart?
Bartosz Golaszewski Jan. 27, 2023, 9:43 a.m. UTC | #2
On Fri, Jan 27, 2023 at 9:53 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Thu, Jan 26, 2023 at 03:47:42PM +0100, Arnd Bergmann wrote:
> > On Thu, Jan 26, 2023, at 15:09, Andy Shevchenko wrote:
> > > On Thu, Jan 26, 2023 at 02:28:01PM +0100, Arnd Bergmann wrote:
> > >> From: Arnd Bergmann <arnd@arndb.de>
> > >>
> > >> There is no need for this in the header any more, it's just
> > >> an implementation detail now.
> > >
> > > I have published
> > > https://lore.kernel.org/r/20230112145140.67573-1-andriy.shevchenko@linux.intel.com
> > > Can it be used?
> >
> > Sure, I added a Reviewed-by: on that now. Your patch will conflict
> > with my patch 7/8, but we can work that out.
>
> Either Bart takes it independently or you may attach it into your series.
> Bart?
>

I applied it to my for-next branch, is that fine?

Bart
Arnd Bergmann Jan. 27, 2023, 9:46 a.m. UTC | #3
On Fri, Jan 27, 2023, at 10:43, Bartosz Golaszewski wrote:
> On Fri, Jan 27, 2023 at 9:53 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>>
>> On Thu, Jan 26, 2023 at 03:47:42PM +0100, Arnd Bergmann wrote:
>> > On Thu, Jan 26, 2023, at 15:09, Andy Shevchenko wrote:
>> > > On Thu, Jan 26, 2023 at 02:28:01PM +0100, Arnd Bergmann wrote:
>> > >> From: Arnd Bergmann <arnd@arndb.de>
>> > >>
>> > >> There is no need for this in the header any more, it's just
>> > >> an implementation detail now.
>> > >
>> > > I have published
>> > > https://lore.kernel.org/r/20230112145140.67573-1-andriy.shevchenko@linux.intel.com
>> > > Can it be used?
>> >
>> > Sure, I added a Reviewed-by: on that now. Your patch will conflict
>> > with my patch 7/8, but we can work that out.
>>
>> Either Bart takes it independently or you may attach it into your series.
>> Bart?
>>
>
> I applied it to my for-next branch, is that fine?

That's fine, I'll make sure to rebase patch 7 on top of that before
I resend it. The two are functionally independent but touch adjacent
lines.

     Arnd
diff mbox series

Patch

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 6a08569a20c1..1563ddcf32d4 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -23,6 +23,21 @@ 
 #include "gpiolib.h"
 #include "gpiolib-of.h"
 
+/*
+ * This is Linux-specific flags. By default controllers' and Linux' mapping
+ * match, but GPIO controllers are free to translate their own flags to
+ * Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended.
+ */
+enum of_gpio_flags {
+	OF_GPIO_ACTIVE_LOW = 0x1,
+	OF_GPIO_SINGLE_ENDED = 0x2,
+	OF_GPIO_OPEN_DRAIN = 0x4,
+	OF_GPIO_TRANSITORY = 0x8,
+	OF_GPIO_PULL_UP = 0x10,
+	OF_GPIO_PULL_DOWN = 0x20,
+	OF_GPIO_PULL_DISABLE = 0x40,
+};
+
 /**
  * of_gpio_named_count() - Count GPIOs for a device
  * @np:		device node to count GPIOs for
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index 04e1f76acdd7..d0f66a5e1b2a 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -17,21 +17,6 @@ 
 
 struct device_node;
 
-/*
- * This is Linux-specific flags. By default controllers' and Linux' mapping
- * match, but GPIO controllers are free to translate their own flags to
- * Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended.
- */
-enum of_gpio_flags {
-	OF_GPIO_ACTIVE_LOW = 0x1,
-	OF_GPIO_SINGLE_ENDED = 0x2,
-	OF_GPIO_OPEN_DRAIN = 0x4,
-	OF_GPIO_TRANSITORY = 0x8,
-	OF_GPIO_PULL_UP = 0x10,
-	OF_GPIO_PULL_DOWN = 0x20,
-	OF_GPIO_PULL_DISABLE = 0x40,
-};
-
 #ifdef CONFIG_OF_GPIO
 
 extern int of_get_named_gpio(const struct device_node *np,