All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] gpio: visconti: Fix fwnode of GPIO IRQ
@ 2022-04-21  9:42 ` Nobuhiro Iwamatsu
  0 siblings, 0 replies; 6+ messages in thread
From: Nobuhiro Iwamatsu @ 2022-04-21  9:42 UTC (permalink / raw)
  To: Bartosz Golaszewski, Linus Walleij
  Cc: linux-gpio, linux-arm-kernel, linux-kernel, Nobuhiro Iwamatsu

The fwnode of GPIO IRQ must be set to its own fwnode, not the fwnode of the
parent IRQ. Therefore, this sets own fwnode instead of the parent IRQ fwnode to
GPIO IRQ's.

Fixes: 2ad74f40dacc ("gpio: visconti: Add Toshiba Visconti GPIO support")
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---

 v2: Add Fixes tag.

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

diff --git a/drivers/gpio/gpio-visconti.c b/drivers/gpio/gpio-visconti.c
index 47455810bdb9..e6534ea1eaa7 100644
--- a/drivers/gpio/gpio-visconti.c
+++ b/drivers/gpio/gpio-visconti.c
@@ -130,7 +130,6 @@ static int visconti_gpio_probe(struct platform_device *pdev)
 	struct gpio_irq_chip *girq;
 	struct irq_domain *parent;
 	struct device_node *irq_parent;
-	struct fwnode_handle *fwnode;
 	int ret;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -150,14 +149,12 @@ static int visconti_gpio_probe(struct platform_device *pdev)
 	}
 
 	parent = irq_find_host(irq_parent);
+	of_node_put(irq_parent);
 	if (!parent) {
 		dev_err(dev, "No IRQ parent domain\n");
 		return -ENODEV;
 	}
 
-	fwnode = of_node_to_fwnode(irq_parent);
-	of_node_put(irq_parent);
-
 	ret = bgpio_init(&priv->gpio_chip, dev, 4,
 			 priv->base + GPIO_IDATA,
 			 priv->base + GPIO_OSET,
@@ -180,7 +177,7 @@ static int visconti_gpio_probe(struct platform_device *pdev)
 
 	girq = &priv->gpio_chip.irq;
 	girq->chip = irq_chip;
-	girq->fwnode = fwnode;
+	girq->fwnode = of_node_to_fwnode(dev->of_node);
 	girq->parent_domain = parent;
 	girq->child_to_parent_hwirq = visconti_gpio_child_to_parent_hwirq;
 	girq->populate_parent_alloc_arg = visconti_gpio_populate_parent_fwspec;
-- 
2.34.1



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

* [PATCH v2] gpio: visconti: Fix fwnode of GPIO IRQ
@ 2022-04-21  9:42 ` Nobuhiro Iwamatsu
  0 siblings, 0 replies; 6+ messages in thread
From: Nobuhiro Iwamatsu @ 2022-04-21  9:42 UTC (permalink / raw)
  To: Bartosz Golaszewski, Linus Walleij
  Cc: linux-gpio, linux-arm-kernel, linux-kernel, Nobuhiro Iwamatsu

The fwnode of GPIO IRQ must be set to its own fwnode, not the fwnode of the
parent IRQ. Therefore, this sets own fwnode instead of the parent IRQ fwnode to
GPIO IRQ's.

Fixes: 2ad74f40dacc ("gpio: visconti: Add Toshiba Visconti GPIO support")
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---

 v2: Add Fixes tag.

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

diff --git a/drivers/gpio/gpio-visconti.c b/drivers/gpio/gpio-visconti.c
index 47455810bdb9..e6534ea1eaa7 100644
--- a/drivers/gpio/gpio-visconti.c
+++ b/drivers/gpio/gpio-visconti.c
@@ -130,7 +130,6 @@ static int visconti_gpio_probe(struct platform_device *pdev)
 	struct gpio_irq_chip *girq;
 	struct irq_domain *parent;
 	struct device_node *irq_parent;
-	struct fwnode_handle *fwnode;
 	int ret;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -150,14 +149,12 @@ static int visconti_gpio_probe(struct platform_device *pdev)
 	}
 
 	parent = irq_find_host(irq_parent);
+	of_node_put(irq_parent);
 	if (!parent) {
 		dev_err(dev, "No IRQ parent domain\n");
 		return -ENODEV;
 	}
 
-	fwnode = of_node_to_fwnode(irq_parent);
-	of_node_put(irq_parent);
-
 	ret = bgpio_init(&priv->gpio_chip, dev, 4,
 			 priv->base + GPIO_IDATA,
 			 priv->base + GPIO_OSET,
@@ -180,7 +177,7 @@ static int visconti_gpio_probe(struct platform_device *pdev)
 
 	girq = &priv->gpio_chip.irq;
 	girq->chip = irq_chip;
-	girq->fwnode = fwnode;
+	girq->fwnode = of_node_to_fwnode(dev->of_node);
 	girq->parent_domain = parent;
 	girq->child_to_parent_hwirq = visconti_gpio_child_to_parent_hwirq;
 	girq->populate_parent_alloc_arg = visconti_gpio_populate_parent_fwspec;
-- 
2.34.1



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] gpio: visconti: Fix fwnode of GPIO IRQ
  2022-04-21  9:42 ` Nobuhiro Iwamatsu
@ 2022-04-22 21:58   ` Linus Walleij
  -1 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2022-04-22 21:58 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu
  Cc: Bartosz Golaszewski, linux-gpio, linux-arm-kernel, linux-kernel

On Thu, Apr 21, 2022 at 11:42 AM Nobuhiro Iwamatsu
<nobuhiro1.iwamatsu@toshiba.co.jp> wrote:

> The fwnode of GPIO IRQ must be set to its own fwnode, not the fwnode of the
> parent IRQ. Therefore, this sets own fwnode instead of the parent IRQ fwnode to
> GPIO IRQ's.
>
> Fixes: 2ad74f40dacc ("gpio: visconti: Add Toshiba Visconti GPIO support")
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] gpio: visconti: Fix fwnode of GPIO IRQ
@ 2022-04-22 21:58   ` Linus Walleij
  0 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2022-04-22 21:58 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu
  Cc: Bartosz Golaszewski, linux-gpio, linux-arm-kernel, linux-kernel

On Thu, Apr 21, 2022 at 11:42 AM Nobuhiro Iwamatsu
<nobuhiro1.iwamatsu@toshiba.co.jp> wrote:

> The fwnode of GPIO IRQ must be set to its own fwnode, not the fwnode of the
> parent IRQ. Therefore, this sets own fwnode instead of the parent IRQ fwnode to
> GPIO IRQ's.
>
> Fixes: 2ad74f40dacc ("gpio: visconti: Add Toshiba Visconti GPIO support")
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH v2] gpio: visconti: Fix fwnode of GPIO IRQ
  2022-04-21  9:42 ` Nobuhiro Iwamatsu
@ 2022-05-05 12:39   ` Bartosz Golaszewski
  -1 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2022-05-05 12:39 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu
  Cc: Linus Walleij, open list:GPIO SUBSYSTEM, Linux ARM,
	Linux Kernel Mailing List

On Thu, Apr 21, 2022 at 11:42 AM Nobuhiro Iwamatsu
<nobuhiro1.iwamatsu@toshiba.co.jp> wrote:
>
> The fwnode of GPIO IRQ must be set to its own fwnode, not the fwnode of the
> parent IRQ. Therefore, this sets own fwnode instead of the parent IRQ fwnode to
> GPIO IRQ's.
>
> Fixes: 2ad74f40dacc ("gpio: visconti: Add Toshiba Visconti GPIO support")
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> ---
>
>  v2: Add Fixes tag.
>
>  drivers/gpio/gpio-visconti.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-visconti.c b/drivers/gpio/gpio-visconti.c
> index 47455810bdb9..e6534ea1eaa7 100644
> --- a/drivers/gpio/gpio-visconti.c
> +++ b/drivers/gpio/gpio-visconti.c
> @@ -130,7 +130,6 @@ static int visconti_gpio_probe(struct platform_device *pdev)
>         struct gpio_irq_chip *girq;
>         struct irq_domain *parent;
>         struct device_node *irq_parent;
> -       struct fwnode_handle *fwnode;
>         int ret;
>
>         priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> @@ -150,14 +149,12 @@ static int visconti_gpio_probe(struct platform_device *pdev)
>         }
>
>         parent = irq_find_host(irq_parent);
> +       of_node_put(irq_parent);
>         if (!parent) {
>                 dev_err(dev, "No IRQ parent domain\n");
>                 return -ENODEV;
>         }
>
> -       fwnode = of_node_to_fwnode(irq_parent);
> -       of_node_put(irq_parent);
> -
>         ret = bgpio_init(&priv->gpio_chip, dev, 4,
>                          priv->base + GPIO_IDATA,
>                          priv->base + GPIO_OSET,
> @@ -180,7 +177,7 @@ static int visconti_gpio_probe(struct platform_device *pdev)
>
>         girq = &priv->gpio_chip.irq;
>         girq->chip = irq_chip;
> -       girq->fwnode = fwnode;
> +       girq->fwnode = of_node_to_fwnode(dev->of_node);
>         girq->parent_domain = parent;
>         girq->child_to_parent_hwirq = visconti_gpio_child_to_parent_hwirq;
>         girq->populate_parent_alloc_arg = visconti_gpio_populate_parent_fwspec;
> --
> 2.34.1
>
>

Queued for fixes, thanks!

Bart

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

* Re: [PATCH v2] gpio: visconti: Fix fwnode of GPIO IRQ
@ 2022-05-05 12:39   ` Bartosz Golaszewski
  0 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2022-05-05 12:39 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu
  Cc: Linus Walleij, open list:GPIO SUBSYSTEM, Linux ARM,
	Linux Kernel Mailing List

On Thu, Apr 21, 2022 at 11:42 AM Nobuhiro Iwamatsu
<nobuhiro1.iwamatsu@toshiba.co.jp> wrote:
>
> The fwnode of GPIO IRQ must be set to its own fwnode, not the fwnode of the
> parent IRQ. Therefore, this sets own fwnode instead of the parent IRQ fwnode to
> GPIO IRQ's.
>
> Fixes: 2ad74f40dacc ("gpio: visconti: Add Toshiba Visconti GPIO support")
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> ---
>
>  v2: Add Fixes tag.
>
>  drivers/gpio/gpio-visconti.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-visconti.c b/drivers/gpio/gpio-visconti.c
> index 47455810bdb9..e6534ea1eaa7 100644
> --- a/drivers/gpio/gpio-visconti.c
> +++ b/drivers/gpio/gpio-visconti.c
> @@ -130,7 +130,6 @@ static int visconti_gpio_probe(struct platform_device *pdev)
>         struct gpio_irq_chip *girq;
>         struct irq_domain *parent;
>         struct device_node *irq_parent;
> -       struct fwnode_handle *fwnode;
>         int ret;
>
>         priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> @@ -150,14 +149,12 @@ static int visconti_gpio_probe(struct platform_device *pdev)
>         }
>
>         parent = irq_find_host(irq_parent);
> +       of_node_put(irq_parent);
>         if (!parent) {
>                 dev_err(dev, "No IRQ parent domain\n");
>                 return -ENODEV;
>         }
>
> -       fwnode = of_node_to_fwnode(irq_parent);
> -       of_node_put(irq_parent);
> -
>         ret = bgpio_init(&priv->gpio_chip, dev, 4,
>                          priv->base + GPIO_IDATA,
>                          priv->base + GPIO_OSET,
> @@ -180,7 +177,7 @@ static int visconti_gpio_probe(struct platform_device *pdev)
>
>         girq = &priv->gpio_chip.irq;
>         girq->chip = irq_chip;
> -       girq->fwnode = fwnode;
> +       girq->fwnode = of_node_to_fwnode(dev->of_node);
>         girq->parent_domain = parent;
>         girq->child_to_parent_hwirq = visconti_gpio_child_to_parent_hwirq;
>         girq->populate_parent_alloc_arg = visconti_gpio_populate_parent_fwspec;
> --
> 2.34.1
>
>

Queued for fixes, thanks!

Bart

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-05-05 12:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21  9:42 [PATCH v2] gpio: visconti: Fix fwnode of GPIO IRQ Nobuhiro Iwamatsu
2022-04-21  9:42 ` Nobuhiro Iwamatsu
2022-04-22 21:58 ` Linus Walleij
2022-04-22 21:58   ` Linus Walleij
2022-05-05 12:39 ` Bartosz Golaszewski
2022-05-05 12:39   ` Bartosz Golaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.