linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback()
@ 2023-01-13 21:53 Andy Shevchenko
  2023-01-13 21:53 ` [PATCH v3 1/4] gpiolib: Check "gpio-ranges" before calling ->add_pin_ranges() Andy Shevchenko
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Andy Shevchenko @ 2023-01-13 21:53 UTC (permalink / raw)
  To: Bartosz Golaszewski, Dmitry Torokhov, Andy Shevchenko,
	linux-gpio, linux-kernel, linux-rpi-kernel, linux-arm-kernel
  Cc: Linus Walleij, Bartosz Golaszewski, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Stefan Wahren

The ->of_gpio_ranges_fallback() repeats the idea that lies behind
->add_pin_ranges(), while the latter covers more cases that the former
hook. Drop the former one for good.

Changelog v3:
- moved check of the property presense to GPIO library
- split out the refcount fix in a separate patch
- added cover letter

Andy Shevchenko (4):
  gpiolib: Check "gpio-ranges" before calling ->add_pin_ranges()
  pinctrl: bcm2835: Remove of_node_put() in
    bcm2835_of_gpio_ranges_fallback()
  pinctrl: bcm2835: Switch to use ->add_pin_ranges()
  Revert "gpiolib: of: Introduce hook for missing gpio-ranges"

 drivers/gpio/gpiolib-of.c             |  5 -----
 drivers/gpio/gpiolib.c                |  8 ++++++++
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 10 ++++------
 include/linux/gpio/driver.h           | 12 ------------
 4 files changed, 12 insertions(+), 23 deletions(-)

-- 
2.39.0


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

* [PATCH v3 1/4] gpiolib: Check "gpio-ranges" before calling ->add_pin_ranges()
  2023-01-13 21:53 [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Andy Shevchenko
@ 2023-01-13 21:53 ` Andy Shevchenko
  2023-01-13 21:53 ` [PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback() Andy Shevchenko
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Andy Shevchenko @ 2023-01-13 21:53 UTC (permalink / raw)
  To: Bartosz Golaszewski, Dmitry Torokhov, Andy Shevchenko,
	linux-gpio, linux-kernel, linux-rpi-kernel, linux-arm-kernel
  Cc: Linus Walleij, Bartosz Golaszewski, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Stefan Wahren

The ->add_pin_ranges() is supposed to be called for the backward
compatiblity on Device Tree platforms or non-DT ones. Ensure that
by checking presense of the "gpio-ranges" property.

This allows to clean up a few existing drivers to avoid duplication
of the check.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpiolib.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 16858ef4dac1..49cfcc7510e1 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -533,6 +533,14 @@ static void gpiochip_free_valid_mask(struct gpio_chip *gc)
 
 static int gpiochip_add_pin_ranges(struct gpio_chip *gc)
 {
+	/*
+	 * Device Tree platforms are supposed to use "gpio-ranges"
+	 * property. This check ensures that the ->add_pin_ranges()
+	 * won't be called for them.
+	 */
+	if (device_property_present(&gc->gpiodev->dev, "gpio-ranges"))
+		return 0;
+
 	if (gc->add_pin_ranges)
 		return gc->add_pin_ranges(gc);
 
-- 
2.39.0


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

* [PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback()
  2023-01-13 21:53 [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Andy Shevchenko
  2023-01-13 21:53 ` [PATCH v3 1/4] gpiolib: Check "gpio-ranges" before calling ->add_pin_ranges() Andy Shevchenko
@ 2023-01-13 21:53 ` Andy Shevchenko
  2023-01-14 11:03   ` Stefan Wahren
  2023-01-13 21:53 ` [PATCH v3 3/4] pinctrl: bcm2835: Switch to use ->add_pin_ranges() Andy Shevchenko
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Andy Shevchenko @ 2023-01-13 21:53 UTC (permalink / raw)
  To: Bartosz Golaszewski, Dmitry Torokhov, Andy Shevchenko,
	linux-gpio, linux-kernel, linux-rpi-kernel, linux-arm-kernel
  Cc: Linus Walleij, Bartosz Golaszewski, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Stefan Wahren

Remove wrong of_node_put() in bcm2835_of_gpio_ranges_fallback(),
there is no counterpart of_node_get() for it.

Fixes: d2b67744fd99 ("pinctrl: bcm2835: implement hook for missing gpio-ranges")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 7857e612a100..c7cdccdb4332 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -363,8 +363,6 @@ static int bcm2835_of_gpio_ranges_fallback(struct gpio_chip *gc,
 {
 	struct pinctrl_dev *pctldev = of_pinctrl_get(np);
 
-	of_node_put(np);
-
 	if (!pctldev)
 		return 0;
 
-- 
2.39.0


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

* [PATCH v3 3/4] pinctrl: bcm2835: Switch to use ->add_pin_ranges()
  2023-01-13 21:53 [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Andy Shevchenko
  2023-01-13 21:53 ` [PATCH v3 1/4] gpiolib: Check "gpio-ranges" before calling ->add_pin_ranges() Andy Shevchenko
  2023-01-13 21:53 ` [PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback() Andy Shevchenko
@ 2023-01-13 21:53 ` Andy Shevchenko
  2023-01-13 21:53 ` [PATCH v3 4/4] Revert "gpiolib: of: Introduce hook for missing gpio-ranges" Andy Shevchenko
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Andy Shevchenko @ 2023-01-13 21:53 UTC (permalink / raw)
  To: Bartosz Golaszewski, Dmitry Torokhov, Andy Shevchenko,
	linux-gpio, linux-kernel, linux-rpi-kernel, linux-arm-kernel
  Cc: Linus Walleij, Bartosz Golaszewski, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Stefan Wahren

Yeah, while the ->add_pin_ranges() shouldn't be used by DT drivers,
this one requires it to support quite old firmware descriptions that
do not have gpio-ranges property.

The change allows to clean up GPIO library from OF specifics.
There is no functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index c7cdccdb4332..8e2551a08c37 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -358,9 +358,9 @@ static int bcm2835_gpio_direction_output(struct gpio_chip *chip,
 	return 0;
 }
 
-static int bcm2835_of_gpio_ranges_fallback(struct gpio_chip *gc,
-					   struct device_node *np)
+static int bcm2835_add_pin_ranges_fallback(struct gpio_chip *gc)
 {
+	struct device_node *np = dev_of_node(gc->parent);
 	struct pinctrl_dev *pctldev = of_pinctrl_get(np);
 
 	if (!pctldev)
@@ -386,7 +386,7 @@ static const struct gpio_chip bcm2835_gpio_chip = {
 	.base = -1,
 	.ngpio = BCM2835_NUM_GPIOS,
 	.can_sleep = false,
-	.of_gpio_ranges_fallback = bcm2835_of_gpio_ranges_fallback,
+	.add_pin_ranges = bcm2835_add_pin_ranges_fallback,
 };
 
 static const struct gpio_chip bcm2711_gpio_chip = {
@@ -403,7 +403,7 @@ static const struct gpio_chip bcm2711_gpio_chip = {
 	.base = -1,
 	.ngpio = BCM2711_NUM_GPIOS,
 	.can_sleep = false,
-	.of_gpio_ranges_fallback = bcm2835_of_gpio_ranges_fallback,
+	.add_pin_ranges = bcm2835_add_pin_ranges_fallback,
 };
 
 static void bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc,
-- 
2.39.0


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

* [PATCH v3 4/4] Revert "gpiolib: of: Introduce hook for missing gpio-ranges"
  2023-01-13 21:53 [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Andy Shevchenko
                   ` (2 preceding siblings ...)
  2023-01-13 21:53 ` [PATCH v3 3/4] pinctrl: bcm2835: Switch to use ->add_pin_ranges() Andy Shevchenko
@ 2023-01-13 21:53 ` Andy Shevchenko
  2023-01-16  9:36 ` [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Bartosz Golaszewski
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Andy Shevchenko @ 2023-01-13 21:53 UTC (permalink / raw)
  To: Bartosz Golaszewski, Dmitry Torokhov, Andy Shevchenko,
	linux-gpio, linux-kernel, linux-rpi-kernel, linux-arm-kernel
  Cc: Linus Walleij, Bartosz Golaszewski, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Stefan Wahren

This reverts commit 3550bba25d5587a701e6edf20e20984d2ee72c78.

No users for this one, revert it for good.
The ->add_pin_ranges() can be used instead.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpiolib-of.c   |  5 -----
 include/linux/gpio/driver.h | 12 ------------
 2 files changed, 17 deletions(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 72d8a3da31e3..266352b1a966 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -980,11 +980,6 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip)
 	if (!np)
 		return 0;
 
-	if (!of_property_read_bool(np, "gpio-ranges") &&
-	    chip->of_gpio_ranges_fallback) {
-		return chip->of_gpio_ranges_fallback(chip, np);
-	}
-
 	group_names = of_find_property(np, group_names_propname, NULL);
 
 	for (;; index++) {
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index ddc7a14a274f..5ab50ba3c309 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -521,18 +521,6 @@ struct gpio_chip {
 	 */
 	int (*of_xlate)(struct gpio_chip *gc,
 			const struct of_phandle_args *gpiospec, u32 *flags);
-
-	/**
-	 * @of_gpio_ranges_fallback:
-	 *
-	 * Optional hook for the case that no gpio-ranges property is defined
-	 * within the device tree node "np" (usually DT before introduction
-	 * of gpio-ranges). So this callback is helpful to provide the
-	 * necessary backward compatibility for the pin ranges.
-	 */
-	int (*of_gpio_ranges_fallback)(struct gpio_chip *gc,
-				       struct device_node *np);
-
 #endif /* CONFIG_OF_GPIO */
 };
 
-- 
2.39.0


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

* Re: [PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback()
  2023-01-13 21:53 ` [PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback() Andy Shevchenko
@ 2023-01-14 11:03   ` Stefan Wahren
  2023-01-14 11:10     ` Andy Shevchenko
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Wahren @ 2023-01-14 11:03 UTC (permalink / raw)
  To: Andy Shevchenko, Bartosz Golaszewski, Dmitry Torokhov,
	linux-gpio, linux-kernel, linux-rpi-kernel, linux-arm-kernel
  Cc: Linus Walleij, Bartosz Golaszewski, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list

Hi Andy,

Am 13.01.23 um 22:53 schrieb Andy Shevchenko:
> Remove wrong of_node_put() in bcm2835_of_gpio_ranges_fallback(),
> there is no counterpart of_node_get() for it.
>
> Fixes: d2b67744fd99 ("pinctrl: bcm2835: implement hook for missing gpio-ranges")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

thanks for fixing. It seems that i got confused by function name and 
usage in other driver.

Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com>

> ---
>   drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> index 7857e612a100..c7cdccdb4332 100644
> --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> @@ -363,8 +363,6 @@ static int bcm2835_of_gpio_ranges_fallback(struct gpio_chip *gc,
>   {
>   	struct pinctrl_dev *pctldev = of_pinctrl_get(np);
>   
> -	of_node_put(np);
> -
>   	if (!pctldev)
>   		return 0;
>   

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

* Re: [PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback()
  2023-01-14 11:03   ` Stefan Wahren
@ 2023-01-14 11:10     ` Andy Shevchenko
  2023-01-14 16:36       ` Florian Fainelli
  0 siblings, 1 reply; 13+ messages in thread
From: Andy Shevchenko @ 2023-01-14 11:10 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Bartosz Golaszewski, Dmitry Torokhov, linux-gpio, linux-kernel,
	linux-rpi-kernel, linux-arm-kernel, Linus Walleij,
	Bartosz Golaszewski, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list

On Sat, Jan 14, 2023 at 12:03:07PM +0100, Stefan Wahren wrote:
> Am 13.01.23 um 22:53 schrieb Andy Shevchenko:
> > Remove wrong of_node_put() in bcm2835_of_gpio_ranges_fallback(),
> > there is no counterpart of_node_get() for it.
> > 
> > Fixes: d2b67744fd99 ("pinctrl: bcm2835: implement hook for missing gpio-ranges")
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> thanks for fixing. It seems that i got confused by function name and usage
> in other driver.

You're welcome! Would be nice if you or somebody else have a chance to test
the series.

> Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com>

Thank you!

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback()
  2023-01-14 11:10     ` Andy Shevchenko
@ 2023-01-14 16:36       ` Florian Fainelli
  0 siblings, 0 replies; 13+ messages in thread
From: Florian Fainelli @ 2023-01-14 16:36 UTC (permalink / raw)
  To: Andy Shevchenko, Stefan Wahren
  Cc: Bartosz Golaszewski, Dmitry Torokhov, linux-gpio, linux-kernel,
	linux-rpi-kernel, linux-arm-kernel, Linus Walleij,
	Bartosz Golaszewski, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list



On 1/14/2023 3:10 AM, Andy Shevchenko wrote:
> On Sat, Jan 14, 2023 at 12:03:07PM +0100, Stefan Wahren wrote:
>> Am 13.01.23 um 22:53 schrieb Andy Shevchenko:
>>> Remove wrong of_node_put() in bcm2835_of_gpio_ranges_fallback(),
>>> there is no counterpart of_node_get() for it.
>>>
>>> Fixes: d2b67744fd99 ("pinctrl: bcm2835: implement hook for missing gpio-ranges")
>>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>
>> thanks for fixing. It seems that i got confused by function name and usage
>> in other driver.
> 
> You're welcome! Would be nice if you or somebody else have a chance to test
> the series.

Yes I should be able to do that in the next few days.
-- 
Florian

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

* Re: [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback()
  2023-01-13 21:53 [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Andy Shevchenko
                   ` (3 preceding siblings ...)
  2023-01-13 21:53 ` [PATCH v3 4/4] Revert "gpiolib: of: Introduce hook for missing gpio-ranges" Andy Shevchenko
@ 2023-01-16  9:36 ` Bartosz Golaszewski
  2023-01-19 17:28 ` Stefan Wahren
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Bartosz Golaszewski @ 2023-01-16  9:36 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Bartosz Golaszewski, Dmitry Torokhov, linux-gpio, linux-kernel,
	linux-rpi-kernel, linux-arm-kernel, Linus Walleij,
	Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Stefan Wahren

On Fri, Jan 13, 2023 at 10:53 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> The ->of_gpio_ranges_fallback() repeats the idea that lies behind
> ->add_pin_ranges(), while the latter covers more cases that the former
> hook. Drop the former one for good.
>
> Changelog v3:
> - moved check of the property presense to GPIO library
> - split out the refcount fix in a separate patch
> - added cover letter
>
> Andy Shevchenko (4):
>   gpiolib: Check "gpio-ranges" before calling ->add_pin_ranges()
>   pinctrl: bcm2835: Remove of_node_put() in
>     bcm2835_of_gpio_ranges_fallback()
>   pinctrl: bcm2835: Switch to use ->add_pin_ranges()
>   Revert "gpiolib: of: Introduce hook for missing gpio-ranges"
>
>  drivers/gpio/gpiolib-of.c             |  5 -----
>  drivers/gpio/gpiolib.c                |  8 ++++++++
>  drivers/pinctrl/bcm/pinctrl-bcm2835.c | 10 ++++------
>  include/linux/gpio/driver.h           | 12 ------------
>  4 files changed, 12 insertions(+), 23 deletions(-)
>
> --
> 2.39.0
>

For GPIO part:

Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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

* Re: [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback()
  2023-01-13 21:53 [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Andy Shevchenko
                   ` (4 preceding siblings ...)
  2023-01-16  9:36 ` [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Bartosz Golaszewski
@ 2023-01-19 17:28 ` Stefan Wahren
  2023-01-19 17:41   ` Andy Shevchenko
  2023-01-19 19:06 ` Florian Fainelli
  2023-01-26 12:39 ` Linus Walleij
  7 siblings, 1 reply; 13+ messages in thread
From: Stefan Wahren @ 2023-01-19 17:28 UTC (permalink / raw)
  To: Andy Shevchenko, Bartosz Golaszewski, Dmitry Torokhov,
	linux-gpio, linux-kernel, linux-rpi-kernel, linux-arm-kernel
  Cc: Linus Walleij, Bartosz Golaszewski, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list

Hi Andy,

Am 13.01.23 um 22:53 schrieb Andy Shevchenko:
> The ->of_gpio_ranges_fallback() repeats the idea that lies behind
> ->add_pin_ranges(), while the latter covers more cases that the former
> hook. Drop the former one for good.

i successful tested booting of this series with multi_v7_defconfig on 
Raspberry Pi 4 (with and without gpio-ranges in DTB):

Tested-by: Stefan Wahren <stefan.wahren@i2se.com>

>
> Changelog v3:
> - moved check of the property presense to GPIO library
> - split out the refcount fix in a separate patch
> - added cover letter
>
> Andy Shevchenko (4):
>    gpiolib: Check "gpio-ranges" before calling ->add_pin_ranges()
>    pinctrl: bcm2835: Remove of_node_put() in
>      bcm2835_of_gpio_ranges_fallback()
>    pinctrl: bcm2835: Switch to use ->add_pin_ranges()
>    Revert "gpiolib: of: Introduce hook for missing gpio-ranges"
>
>   drivers/gpio/gpiolib-of.c             |  5 -----
>   drivers/gpio/gpiolib.c                |  8 ++++++++
>   drivers/pinctrl/bcm/pinctrl-bcm2835.c | 10 ++++------
>   include/linux/gpio/driver.h           | 12 ------------
>   4 files changed, 12 insertions(+), 23 deletions(-)
>

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

* Re: [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback()
  2023-01-19 17:28 ` Stefan Wahren
@ 2023-01-19 17:41   ` Andy Shevchenko
  0 siblings, 0 replies; 13+ messages in thread
From: Andy Shevchenko @ 2023-01-19 17:41 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Bartosz Golaszewski, Dmitry Torokhov, linux-gpio, linux-kernel,
	linux-rpi-kernel, linux-arm-kernel, Linus Walleij,
	Bartosz Golaszewski, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list

On Thu, Jan 19, 2023 at 06:28:27PM +0100, Stefan Wahren wrote:
> Hi Andy,
> 
> Am 13.01.23 um 22:53 schrieb Andy Shevchenko:
> > The ->of_gpio_ranges_fallback() repeats the idea that lies behind
> > ->add_pin_ranges(), while the latter covers more cases that the former
> > hook. Drop the former one for good.
> 
> i successful tested booting of this series with multi_v7_defconfig on
> Raspberry Pi 4 (with and without gpio-ranges in DTB):
> 
> Tested-by: Stefan Wahren <stefan.wahren@i2se.com>

Thank you!

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback()
  2023-01-13 21:53 [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Andy Shevchenko
                   ` (5 preceding siblings ...)
  2023-01-19 17:28 ` Stefan Wahren
@ 2023-01-19 19:06 ` Florian Fainelli
  2023-01-26 12:39 ` Linus Walleij
  7 siblings, 0 replies; 13+ messages in thread
From: Florian Fainelli @ 2023-01-19 19:06 UTC (permalink / raw)
  To: Andy Shevchenko, Bartosz Golaszewski, Dmitry Torokhov,
	linux-gpio, linux-kernel, linux-rpi-kernel, linux-arm-kernel
  Cc: Linus Walleij, Bartosz Golaszewski, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Stefan Wahren

On 1/13/23 13:53, Andy Shevchenko wrote:
> The ->of_gpio_ranges_fallback() repeats the idea that lies behind
> ->add_pin_ranges(), while the latter covers more cases that the former
> hook. Drop the former one for good.
> 
> Changelog v3:
> - moved check of the property presense to GPIO library
> - split out the refcount fix in a separate patch
> - added cover letter

Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks!
-- 
Florian


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

* Re: [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback()
  2023-01-13 21:53 [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Andy Shevchenko
                   ` (6 preceding siblings ...)
  2023-01-19 19:06 ` Florian Fainelli
@ 2023-01-26 12:39 ` Linus Walleij
  7 siblings, 0 replies; 13+ messages in thread
From: Linus Walleij @ 2023-01-26 12:39 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Bartosz Golaszewski, Dmitry Torokhov, linux-gpio, linux-kernel,
	linux-rpi-kernel, linux-arm-kernel, Bartosz Golaszewski,
	Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Stefan Wahren

On Fri, Jan 13, 2023 at 10:53 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> The ->of_gpio_ranges_fallback() repeats the idea that lies behind
> ->add_pin_ranges(), while the latter covers more cases that the former
> hook. Drop the former one for good.
>
> Changelog v3:
> - moved check of the property presense to GPIO library
> - split out the refcount fix in a separate patch
> - added cover letter

Patches applied! Sorry for taking almost 2 weeks :/

Yours,
Linus Walleij

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

end of thread, other threads:[~2023-01-26 12:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 21:53 [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Andy Shevchenko
2023-01-13 21:53 ` [PATCH v3 1/4] gpiolib: Check "gpio-ranges" before calling ->add_pin_ranges() Andy Shevchenko
2023-01-13 21:53 ` [PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback() Andy Shevchenko
2023-01-14 11:03   ` Stefan Wahren
2023-01-14 11:10     ` Andy Shevchenko
2023-01-14 16:36       ` Florian Fainelli
2023-01-13 21:53 ` [PATCH v3 3/4] pinctrl: bcm2835: Switch to use ->add_pin_ranges() Andy Shevchenko
2023-01-13 21:53 ` [PATCH v3 4/4] Revert "gpiolib: of: Introduce hook for missing gpio-ranges" Andy Shevchenko
2023-01-16  9:36 ` [PATCH v3 0/4] gpiolib: get rid of exessive ->of_gpio_ranges_fallback() Bartosz Golaszewski
2023-01-19 17:28 ` Stefan Wahren
2023-01-19 17:41   ` Andy Shevchenko
2023-01-19 19:06 ` Florian Fainelli
2023-01-26 12:39 ` Linus Walleij

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).