Unify gpiod_get*() API
Subsystems (4)
v2 cover Unify gpiod_get*() API
By some reason fwnode_get_named_gpiod() doesn't take flags as argument and each caller has to cope with it.
Unify API here. Do couple obvious clean ups beforehand.
Since v1:
- append Mika's tags
Andy Shevchenko (3):
gpiolib: Switch to for_each_set_bit()
gpiolib: Update documentation of struct acpi_gpio_info
gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
drivers/gpio/devres.c | 9 ++++++-- drivers/gpio/gpiolib-acpi.c | 5 ++-- drivers/gpio/gpiolib.c | 38 ++++++++++++++++++------------- drivers/gpio/gpiolib.h | 3 ++- drivers/input/keyboard/gpio_keys.c | 9 +------- drivers/input/keyboard/gpio_keys_polled.c | 11 ++------- drivers/leds/leds-gpio.c | 2 +- drivers/video/fbdev/amba-clcd-nomadik.c | 15 ++++-------- include/linux/gpio/consumer.h | 19 +++++++++++----- 9 files changed, 55 insertions(+), 56 deletions(-)
Signature · 1 line
2.11.0
PATCH v2 1/3 gpiolib: Switch to for_each_set_bit()
The macro for_each_set_bit() effectively looks up to the next set bit in array of bits.
Instead of open coding that switch to for_each_set_bit() in gpio_chip_set_multiple().
While here, make gpio_chip_set_multiple() non-destructive against its parameters. We are safe since all callers, i.e. gpiod_set_array_value_complex(), handle that already.
--- drivers/gpio/gpiolib.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
drivers/gpio/gpiolib.c +6 -12
@@ -1,3 +1,4 @@ +#include <linux/bitops.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/interrupt.h>
@@ -2570,18 +2571,11 @@ static void gpio_chip_set_multiple(struct gpio_chip *chip,if (chip->set_multiple) { chip->set_multiple (chip, mask, bits); }else { -int i; -for (i =0 ; i < chip->ngpio; i++) { -if (mask[BIT_WORD (i)] ==0 ) { -/* no more set bits in this mask word; -* skip ahead to the next word */ - i = (BIT_WORD (i) +1 ) *BITS_PER_LONG -1 ; -continue ; - } -/* set outputs if the corresponding mask bit is set */ -if (__test_and_clear_bit (i, mask)) - chip->set (chip, i,test_bit (i, bits)); - } +unsigned int i; + +/* set outputs if the corresponding mask bit is set */ +for_each_set_bit (i, mask, chip->ngpio) + chip->set (chip, i,test_bit (i, bits)); } }
Signature · 1 line
2.11.0
Re: [PATCH v2 1/3] gpiolib: Switch to for_each_set_bit()
Quoted 6 lines · Andy Shevchenko
The macro
for_each_set_bit()effectively looks up to the next set bit in array of bits.Instead of open coding that switch to
for_each_set_bit()ingpio_chip_set_multiple().
Quoted 6 lines
While here, make
gpio_chip_set_multiple()non-destructive against its parameters. We are safe since all callers, i.e.gpiod_set_array_value_complex(), handle that already.Reviewed-by Mika Westerberg <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
I hope v1 is just as fine. It looks the same.
Yours,
Linus Walleij
PATCH v2 2/3 gpiolib: Update documentation of struct acpi_gpio_info
In reply to Andy ShevchenkoIt seems the code had been changed, but description left untouched.
Update description of the struct acpi_gpio_info and relative comments accordingly.
--- drivers/gpio/gpiolib-acpi.c | 5 ++--- drivers/gpio/gpiolib.h | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpio/gpiolib-acpi.c +2 -3
@@ -416,9 +416,8 @@ static int acpi_populate_gpio_lookup(struct acpi_resource *ares, void *data) agpio->connection_type ==ACPI_RESOURCE_GPIO_TYPE_INT ;/* -* ActiveLow is only specified for GpioInt resource. If -* GpioIo is used then the only way to set the flag is -* to use _DSD "gpios" property. +* Polarity and triggering are only specified for GpioInt +* resource. * Note: we expect here: * - ACPI_ACTIVE_LOW == GPIO_ACTIVE_LOW * - ACPI_ACTIVE_HIGH == GPIO_ACTIVE_HIGH
drivers/gpio/gpiolib.h +2 -1
@@ -76,7 +76,8 @@ struct gpio_device {/** * struct acpi_gpio_info - ACPI GPIO specific information * @gpioint: if %true this GPIO is of type GpioInt otherwise type is GpioIo -* @active_low: in case of @gpioint, the pin is active low +* @polarity: interrupt polarity as provided by ACPI +* @triggering: triggering type as provided by ACPI */ struct acpi_gpio_info {bool gpioint;
Signature · 1 line
2.11.0
Re: [PATCH v2 2/3] gpiolib: Update documentation of struct acpi_gpio_info
Quoted 9 lines · Andy Shevchenko
It seems the code had been changed, but description left untouched.
Update description of the struct
acpi_gpio_infoand relative comments accordingly.Fixes commit 52044723cd27 ("ACPI / gpio: Add irq_type when a GPIO is used as an interrupt")Cc Christophe RICARD <[email protected]>Acked-by Mika Westerberg <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
This too seems identical to v1.
Yours,
Linus Walleij
Re: [PATCH v2 2/3] gpiolib: Update documentation of struct acpi_gpio_info
Quoted 9 lines · Linus Walleij
Quoted 6 lines · Andy Shevchenko
It seems the code had been changed, but description left untouched.
Update description of the struct
acpi_gpio_infoand relative comments
accordingly.
Quoted 7 lines
Quoted 5 lines
Fixes commit 52044723cd27 ("ACPI / gpio: Add irq_type when a GPIOis used as an interrupt")
Cc Christophe RICARD <[email protected]>Acked-by Mika Westerberg <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>This too seems identical to v1.
Yes, and patch 3 after discussion stays same.
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
PATCH v2 3/3 gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
In reply to Andy ShevchenkoMake fwnode_get_named_gpiod() consistent with the rest of gpiod_get() like API, i.e. configure GPIO pin immediately after request.
Besides obvious clean up it will help to configure pins based on firmware provided resources.
--- drivers/gpio/devres.c | 9 +++++++-- drivers/gpio/gpiolib.c | 20 ++++++++++++++++---- drivers/input/keyboard/gpio_keys.c | 9 +-------- drivers/input/keyboard/gpio_keys_polled.c | 11 ++--------- drivers/leds/leds-gpio.c | 2 +- drivers/video/fbdev/amba-clcd-nomadik.c | 15 +++++---------- include/linux/gpio/consumer.h | 19 +++++++++++++------ 7 files changed, 45 insertions(+), 40 deletions(-)
drivers/gpio/devres.c +7 -2
@@ -129,13 +129,18 @@ EXPORT_SYMBOL(devm_gpiod_get_index);* @dev: GPIO consumer * @con_id: function within the GPIO consumer * @child: firmware node (child of @dev) +* @flags: GPIO initialization flags * * GPIO descriptors returned from this function are automatically disposed on * driver detach. +* +* On successfull request the GPIO pin is configured in accordance with +* provided @flags. */ struct gpio_desc *devm_get_gpiod_from_child (struct device *dev,const char *con_id, -struct fwnode_handle *child) +struct fwnode_handle *child, +enum gpiod_flags flags) {char prop_name[32 ];/* 32 is max size of property name */ struct gpio_desc **dr;
@@ -155,7 +160,7 @@ struct gpio_desc *devm_get_gpiod_from_child(struct device *dev,snprintf (prop_name,sizeof (prop_name),"%s" , gpio_suffixes[i]); - desc =fwnode_get_named_gpiod (child, prop_name); + desc =fwnode_get_named_gpiod (child, prop_name, flags);if (!IS_ERR (desc) || (PTR_ERR (desc) != -ENOENT ))break ; }
drivers/gpio/gpiolib.c +16 -4
@@ -3303,6 +3303,7 @@ EXPORT_SYMBOL_GPL(gpiod_get_index);* fwnode_get_named_gpiod - obtain a GPIO from firmware node * @fwnode: handle of the firmware node * @propname: name of the firmware property representing the GPIO +* @dflags: GPIO initialization flags * * This function can be used for drivers that get their configuration * from firmware.
@@ -3311,12 +3312,17 @@ EXPORT_SYMBOL_GPL(gpiod_get_index);* underlying firmware interface and then makes sure that the GPIO * descriptor is requested before it is returned to the caller. * +* On successfull request the GPIO pin is configured in accordance with +* provided @dflags. +* * In case of error an ERR_PTR() is returned. */ struct gpio_desc *fwnode_get_named_gpiod (struct fwnode_handle *fwnode, -const char *propname) +const char *propname, +enum gpiod_flags dflags) {struct gpio_desc *desc =ERR_PTR (-ENODEV ); +unsigned long lflags =0 ;bool active_low = false;bool single_ended = false;int ret;
@@ -3349,13 +3355,19 @@ struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode,return ERR_PTR (ret);if (active_low) -set_bit (FLAG_ACTIVE_LOW , &desc->flags); + lflags |=GPIO_ACTIVE_LOW ;if (single_ended) {if (active_low) -set_bit (FLAG_OPEN_DRAIN , &desc->flags); + lflags |=GPIO_OPEN_DRAIN ;else -set_bit (FLAG_OPEN_SOURCE , &desc->flags); + lflags |=GPIO_OPEN_SOURCE ; + } + + ret =gpiod_configure_flags (desc, propname, lflags, dflags); +if (ret <0 ) { +gpiod_put (desc); +return ERR_PTR (ret); }return desc;
drivers/input/keyboard/gpio_keys.c +1 -8
@@ -481,7 +481,7 @@ static int gpio_keys_setup_key(struct platform_device *pdev,spin_lock_init (&bdata->lock);if (child) { - bdata->gpiod =devm_get_gpiod_from_child (dev,NULL , child); + bdata->gpiod =devm_get_gpiod_from_child (dev,NULL , child,GPIOD_IN );if (IS_ERR (bdata->gpiod)) { error =PTR_ERR (bdata->gpiod);if (error == -ENOENT ) {
@@ -496,13 +496,6 @@ static int gpio_keys_setup_key(struct platform_device *pdev, error);return error; } - }else { - error =gpiod_direction_input (bdata->gpiod); -if (error) { -dev_err (dev,"Failed to configure GPIO %d as input: %d\n" , -desc_to_gpio (bdata->gpiod), error); -return error; - } } }else if (gpio_is_valid (button->gpio)) {/*
drivers/input/keyboard/gpio_keys_polled.c +2 -9
@@ -304,7 +304,8 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) } bdata->gpiod =devm_get_gpiod_from_child (dev,NULL , - child); + child, +GPIOD_IN );if (IS_ERR (bdata->gpiod)) { error =PTR_ERR (bdata->gpiod);if (error != -EPROBE_DEFER )
@@ -314,14 +315,6 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)fwnode_handle_put (child);return error; } - - error =gpiod_direction_input (bdata->gpiod); -if (error) { -dev_err (dev,"Failed to configure GPIO %d as input: %d\n" , -desc_to_gpio (bdata->gpiod), error); -fwnode_handle_put (child); -return error; - } }else if (gpio_is_valid (button->gpio)) {/* * Legacy GPIO number so request the GPIO here and
drivers/leds/leds-gpio.c +1 -1
@@ -174,7 +174,7 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)const char *state =NULL ;struct device_node *np =to_of_node (child); - led.gpiod =devm_get_gpiod_from_child (dev,NULL , child); + led.gpiod =devm_get_gpiod_from_child (dev,NULL , child,GPIOD_ASIS );if (IS_ERR (led.gpiod)) {fwnode_handle_put (child);return ERR_CAST (led.gpiod);
drivers/video/fbdev/amba-clcd-nomadik.c +5 -10
@@ -184,32 +184,27 @@ static void tpg110_init(struct device *dev, struct device_node *np, {dev_info (dev,"TPG110 display init\n" ); - grestb =devm_get_gpiod_from_child (dev,"grestb" , &np->fwnode); +/* This asserts the GRESTB signal, putting the display into reset */ + grestb =devm_get_gpiod_from_child (dev,"grestb" , &np->fwnode,GPIOD_OUT_HIGH );if (IS_ERR (grestb)) {dev_err (dev,"no GRESTB GPIO\n" );return ; } -/* This asserts the GRESTB signal, putting the display into reset */ -gpiod_direction_output (grestb,1 ); - - scen =devm_get_gpiod_from_child (dev,"scen" , &np->fwnode); + scen =devm_get_gpiod_from_child (dev,"scen" , &np->fwnode,GPIOD_OUT_LOW );if (IS_ERR (scen)) {dev_err (dev,"no SCEN GPIO\n" );return ; } -gpiod_direction_output (scen,0 ); - scl =devm_get_gpiod_from_child (dev,"scl" , &np->fwnode); + scl =devm_get_gpiod_from_child (dev,"scl" , &np->fwnode,GPIOD_OUT_LOW );if (IS_ERR (scl)) {dev_err (dev,"no SCL GPIO\n" );return ; } -gpiod_direction_output (scl,0 ); - sda =devm_get_gpiod_from_child (dev,"sda" , &np->fwnode); + sda =devm_get_gpiod_from_child (dev,"sda" , &np->fwnode,GPIOD_OUT_LOW );if (IS_ERR (sda)) {dev_err (dev,"no SDA GPIO\n" );return ; } -gpiod_direction_output (sda,0 ); board->enable = tpg110_enable; board->disable = tpg110_disable; }
include/linux/gpio/consumer.h +13 -6
@@ -135,10 +135,12 @@ int desc_to_gpio(const struct gpio_desc *desc);struct fwnode_handle ;struct gpio_desc *fwnode_get_named_gpiod (struct fwnode_handle *fwnode, -const char *propname); +const char *propname, +enum gpiod_flags dflags);struct gpio_desc *devm_get_gpiod_from_child (struct device *dev,const char *con_id, -struct fwnode_handle *child); +struct fwnode_handle *child, +enum gpiod_flags flags);#else /* CONFIG_GPIOLIB */ static inline int gpiod_count (struct device *dev,const char *con_id)
@@ -411,14 +413,19 @@ static inline int desc_to_gpio(const struct gpio_desc *desc)/* Child properties interface */ struct fwnode_handle ; -static inline struct gpio_desc *fwnode_get_named_gpiod ( -struct fwnode_handle *fwnode,const char *propname) +static inline +struct gpio_desc *fwnode_get_named_gpiod (struct fwnode_handle *fwnode, +const char *propname, +enum gpiod_flags dflags) {return ERR_PTR (-ENOSYS ); } -static inline struct gpio_desc *devm_get_gpiod_from_child ( -struct device *dev,const char *con_id,struct fwnode_handle *child) +static inline +struct gpio_desc *devm_get_gpiod_from_child (struct device *dev, +const char *con_id, +struct fwnode_handle *child, +enum gpiod_flags flags) {return ERR_PTR (-ENOSYS ); }
Signature · 1 line
2.11.0
Re: [PATCH v2 3/3] gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
Quoted 8 lines · Andy Shevchenko
Make
fwnode_get_named_gpiod()consistent with the rest ofgpiod_get()like API, i.e. configure GPIO pin immediately after request.Besides obvious clean up it will help to configure pins based on firmware provided resources.
Reviewed-by Mika Westerberg <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
This is overall fine. However I have another patch in the works from Alexander Stein to pass down the label to the core properly, can you look at this patch too, so we don't have to mess around too much?
http://marc.info/?l=linux-gpio&m=148179211709228&w=2
Which patch should we base on which patch? Or can they be combined into one?
That patch has been held back awaiting ACKs and already has an ACK from Jacek so I would merge it first. Could you rebase this patch on top of Alexander's patch?
Yours,
Linus Walleij
Re: [PATCH v2 3/3] gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
Quoted 20 lines · Linus Walleij
Quoted 10 lines · Andy Shevchenko
Make
fwnode_get_named_gpiod()consistent with the rest ofgpiod_get()like API,
i.e. configure GPIO pin immediately after request.Besides obvious clean up it will help to configure pins based on firmware
provided resources.Reviewed-by Mika Westerberg <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>This is overall fine. However I have another patch in the works from Alexander Stein to pass down the label to the core properly, can you look
at this patch too, so we don't have to mess around too much?
http://marc.info/?l=linux-gpio&m=148179211709228&w=2
Quoted 9 lines
Which patch should we base on which patch? Or can they be combined into one?
That patch has been held back awaiting ACKs and already has an ACK from Jacek so I would merge it first. Could you rebase this patch on top of Alexander's patch?
At the first glance looks okay to just merge it.
Means I don't see it might affect functionality of what I'm trying to do.
So, please, go ahead and thanks for pointing out. I will prepare mine on top of it.
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Re: [PATCH v2 3/3] gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
Quoted 18 lines · Andy Shevchenko
Quoted 9 lines · Linus Walleij
On Mon, Jan 9, 2017 at 3:02 PM, Andy Shevchenko
<[email protected]> wrote:This is overall fine. However I have another patch in the works from Alexander Stein to pass down the label to the core properly, can you look
at this patch too, so we don't have to mess around too much?
http://marc.info/?l=linux-gpio&m=148179211709228&w=2Quoted 7 lines
Which patch should we base on which patch? Or can they be combined into one?
That patch has been held back awaiting ACKs and already has an ACK from Jacek so I would merge it first. Could you rebase this patch on top of Alexander's patch?
Quoted 7 lines
At the first glance looks okay to just merge it.
Means I don't see it might affect functionality of what I'm trying to do.So, please, go ahead and thanks for pointing out. I will prepare mine on
top of it.
Alas, it doesn't apply clearly. gpio_keys_polled.c has been changed a lot from that time. So, would you like to fix it yourself?
Since mine is applied clearly I may do other way around, rebase and fix that patch on top of mine.
How does it sound?
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Re: [PATCH v2 3/3] gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
Quoted 26 lines · Andy Shevchenko
Quoted 17 lines · Andy Shevchenko
Quoted 9 lines · Linus Walleij
On Mon, Jan 9, 2017 at 3:02 PM, Andy Shevchenko
<[email protected]> wrote:This is overall fine. However I have another patch in the works from Alexander Stein to pass down the label to the core properly, can you look
at this patch too, so we don't have to mess around too much?
http://marc.info/?l=linux-gpio&m=148179211709228&w=2Quoted 6 lines
Which patch should we base on which patch? Or can they be combined into one?
That patch has been held back awaiting ACKs and already has an ACK from Jacek so I would merge it first. Could you rebase this patch on top of Alexander's patch?
Quoted 7 lines
At the first glance looks okay to just merge it.
Means I don't see it might affect functionality of what I'm trying to do.So, please, go ahead and thanks for pointing out. I will prepare mine on
top of it.
Quoted 6 lines
Alas, it doesn't apply clearly.
gpio_keys_polled.chas been changed a lot from that time. So, would you like to fix it yourself?Since mine is applied clearly I may do other way around, rebase and fix that patch on top of mine.
How does it sound?
Yeah, I noticed that gpio_keys_polled.c has changed meanwhile, so my patch has to be modifed anyway. If your patch is applied somewhere I can rebase my change on that and resubmit.
Best regards,
Alexander
Signature · 17 lines
Dipl.-Inf. Alexander Stein SYS TEC electronic GmbH [email protected] Legal and Commercial Address: Am Windrad 2 08468 Heinsdorfergrund Germany Office: +49 (0) 3765 38600-0 Fax: +49 (0) 3765 38600-4100 Managing Directors: Director Technology/CEO: Dipl.-Phys. Siegmar Schmidt; Director Commercial Affairs/COO: Dipl. Ing. (FH) Armin von Collrepp Commercial Registry: Amtsgericht Chemnitz, HRB 28082; USt.-Id Nr. DE150534010
Re: [PATCH v2 3/3] gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
Quoted 16 lines · Alexander Stein
Quoted 6 lines · Andy Shevchenko
Quoted 4 lines · Andy Shevchenko
Quoted 3 lines · Linus Walleij
On Mon, Jan 9, 2017 at 3:02 PM, Andy Shevchenko
<[email protected]> wrote:Quoted 8 lines
Alas, it doesn't apply clearly.
gpio_keys_polled.chas been changed a
lot from that time. So, would you like to fix it yourself?Since mine is applied clearly I may do other way around, rebase and fix
that patch on top of mine.
How does it sound?
Quoted 5 lines
Yeah, I noticed that
gpio_keys_polled.chas changed meanwhile, so my patch has
to be modifed anyway. If your patch is applied somewhere I can rebase my
change on that and resubmit.
First of all, how do you feel if Linus applies my change first?
Please, keep me in Cc list for new version if you are going to re- base/re-send.
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Re: [PATCH v2 3/3] gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
Quoted 16 lines · Andy Shevchenko
Quoted 15 lines · Alexander Stein
Quoted 13 lines · Andy Shevchenko
Quoted 4 lines · Andy Shevchenko
Quoted 3 lines · Linus Walleij
On Mon, Jan 9, 2017 at 3:02 PM, Andy Shevchenko
<[email protected]> wrote:
Alas, it doesn't apply clearly.
gpio_keys_polled.chas been changed a
lot from that time. So, would you like to fix it yourself?Since mine is applied clearly I may do other way around, rebase and fix
that patch on top of mine.
How does it sound?
Quoted 7 lines
Quoted 5 lines
Yeah, I noticed that
gpio_keys_polled.chas changed meanwhile, so my patch has
to be modifed anyway. If your patch is applied somewhere I can rebase my
change on that and resubmit.First of all, how do you feel if Linus applies my change first?
I don't mind. Just go ahead and point me somewhere I can base on.
Quoted 2 lines
Please, keep me in Cc list for new version if you are going to re- base/re-send.
Will do.
Best regards,
Alexander
Signature · 17 lines
Dipl.-Inf. Alexander Stein SYS TEC electronic GmbH [email protected] Legal and Commercial Address: Am Windrad 2 08468 Heinsdorfergrund Germany Office: +49 (0) 3765 38600-0 Fax: +49 (0) 3765 38600-4100 Managing Directors: Director Technology/CEO: Dipl.-Phys. Siegmar Schmidt; Director Commercial Affairs/COO: Dipl. Ing. (FH) Armin von Collrepp Commercial Registry: Amtsgericht Chemnitz, HRB 28082; USt.-Id Nr. DE150534010
Re: [PATCH v2 3/3] gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
Quoted 27 lines · Alexander Stein
Quoted 25 lines · Andy Shevchenko
Quoted 24 lines · Alexander Stein
Quoted 10 lines · Andy Shevchenko
Quoted 3 lines · Andy Shevchenko
Quoted 2 lines · Linus Walleij
On Mon, Jan 9, 2017 at 3:02 PM, Andy Shevchenko
<[email protected]> wrote:Alas, it doesn't apply clearly.
gpio_keys_polled.chas been changed
a
lot from that time. So, would you like to fix it yourself?Quoted 5 lines
Since mine is applied clearly I may do other way around, rebase and
fix
that patch on top of mine.
How does it sound?Yeah, I noticed that
gpio_keys_polled.chas changed meanwhile, so my
patch has
to be modifed anyway. If your patch is applied somewhere I can rebase
my
change on that and resubmit.
Quoted 3 lines
Quoted 1 line
First of all, how do you feel if Linus applies my change first?
I don't mind. Just go ahead and point me somewhere I can base on.
For now the only my topic/uart/rpm branch [1] on bitbucket contains it. (It also has many other patches, meaning you need to base your branch on top of gpio-next + cherry-picked the only one from my branch)
[1] https://bitbucket.org/andy-shev/linux/branch/topic%2Fuart%2frpm
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Re: [PATCH v2 3/3] gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
In reply to Andy ShevchenkoQuoted 8 lines · Andy Shevchenko
Make
fwnode_get_named_gpiod()consistent with the rest ofgpiod_get()like API, i.e. configure GPIO pin immediately after request.Besides obvious clean up it will help to configure pins based on firmware provided resources.
Reviewed-by Mika Westerberg <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
Patch applied. Will apply Alex' patch on top.
Yours,
Linus Walleij