All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: gpio-xilinx: update on suspend and resume calls
@ 2021-06-03 16:49 ` Srinivas Neeli
  0 siblings, 0 replies; 4+ messages in thread
From: Srinivas Neeli @ 2021-06-03 16:49 UTC (permalink / raw)
  To: linus.walleij, bgolaszewski, michal.simek, shubhrajyoti.datta, sgoud
  Cc: linux-gpio, linux-arm-kernel, linux-kernel, git, Srinivas Neeli

Current AXI GPIO driver checking for interrupt data in suspend and
resume path and reporting as error in case of no interrupt connection.
As per AXI GPIO IP specification interrupt connection is optional,
driver logic is updated in suspend and resume calls by reporting
debug message and enable/disable clock in case of no connection.

Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
---
 drivers/gpio/gpio-xilinx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index b411d3156e0b..e0681c37f1cb 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -302,8 +302,8 @@ static int __maybe_unused xgpio_suspend(struct device *dev)
 	struct irq_data *data = irq_get_irq_data(gpio->irq);
 
 	if (!data) {
-		dev_err(dev, "irq_get_irq_data() failed\n");
-		return -EINVAL;
+		dev_dbg(dev, "IRQ not connected\n");
+		return pm_runtime_force_suspend(dev);
 	}
 
 	if (!irqd_is_wakeup_set(data))
@@ -348,8 +348,8 @@ static int __maybe_unused xgpio_resume(struct device *dev)
 	struct irq_data *data = irq_get_irq_data(gpio->irq);
 
 	if (!data) {
-		dev_err(dev, "irq_get_irq_data() failed\n");
-		return -EINVAL;
+		dev_dbg(dev, "IRQ not connected\n");
+		return pm_runtime_force_resume(dev);
 	}
 
 	if (!irqd_is_wakeup_set(data))
-- 
2.22.0


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

* [PATCH] gpio: gpio-xilinx: update on suspend and resume calls
@ 2021-06-03 16:49 ` Srinivas Neeli
  0 siblings, 0 replies; 4+ messages in thread
From: Srinivas Neeli @ 2021-06-03 16:49 UTC (permalink / raw)
  To: linus.walleij, bgolaszewski, michal.simek, shubhrajyoti.datta, sgoud
  Cc: linux-gpio, linux-arm-kernel, linux-kernel, git, Srinivas Neeli

Current AXI GPIO driver checking for interrupt data in suspend and
resume path and reporting as error in case of no interrupt connection.
As per AXI GPIO IP specification interrupt connection is optional,
driver logic is updated in suspend and resume calls by reporting
debug message and enable/disable clock in case of no connection.

Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
---
 drivers/gpio/gpio-xilinx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index b411d3156e0b..e0681c37f1cb 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -302,8 +302,8 @@ static int __maybe_unused xgpio_suspend(struct device *dev)
 	struct irq_data *data = irq_get_irq_data(gpio->irq);
 
 	if (!data) {
-		dev_err(dev, "irq_get_irq_data() failed\n");
-		return -EINVAL;
+		dev_dbg(dev, "IRQ not connected\n");
+		return pm_runtime_force_suspend(dev);
 	}
 
 	if (!irqd_is_wakeup_set(data))
@@ -348,8 +348,8 @@ static int __maybe_unused xgpio_resume(struct device *dev)
 	struct irq_data *data = irq_get_irq_data(gpio->irq);
 
 	if (!data) {
-		dev_err(dev, "irq_get_irq_data() failed\n");
-		return -EINVAL;
+		dev_dbg(dev, "IRQ not connected\n");
+		return pm_runtime_force_resume(dev);
 	}
 
 	if (!irqd_is_wakeup_set(data))
-- 
2.22.0


_______________________________________________
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] 4+ messages in thread

* Re: [PATCH] gpio: gpio-xilinx: update on suspend and resume calls
  2021-06-03 16:49 ` Srinivas Neeli
@ 2021-06-14 20:13   ` Bartosz Golaszewski
  -1 siblings, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2021-06-14 20:13 UTC (permalink / raw)
  To: Srinivas Neeli
  Cc: Linus Walleij, Michal Simek, Shubhrajyoti Datta, Srinivas Goud,
	linux-gpio, arm-soc, LKML, git

On Thu, Jun 3, 2021 at 6:49 PM Srinivas Neeli <srinivas.neeli@xilinx.com> wrote:
>
> Current AXI GPIO driver checking for interrupt data in suspend and
> resume path and reporting as error in case of no interrupt connection.
> As per AXI GPIO IP specification interrupt connection is optional,
> driver logic is updated in suspend and resume calls by reporting
> debug message and enable/disable clock in case of no connection.
>
> Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
> ---

Applied, thanks!

Bart

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

* Re: [PATCH] gpio: gpio-xilinx: update on suspend and resume calls
@ 2021-06-14 20:13   ` Bartosz Golaszewski
  0 siblings, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2021-06-14 20:13 UTC (permalink / raw)
  To: Srinivas Neeli
  Cc: Linus Walleij, Michal Simek, Shubhrajyoti Datta, Srinivas Goud,
	linux-gpio, arm-soc, LKML, git

On Thu, Jun 3, 2021 at 6:49 PM Srinivas Neeli <srinivas.neeli@xilinx.com> wrote:
>
> Current AXI GPIO driver checking for interrupt data in suspend and
> resume path and reporting as error in case of no interrupt connection.
> As per AXI GPIO IP specification interrupt connection is optional,
> driver logic is updated in suspend and resume calls by reporting
> debug message and enable/disable clock in case of no connection.
>
> Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
> ---

Applied, 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] 4+ messages in thread

end of thread, other threads:[~2021-06-14 20:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 16:49 [PATCH] gpio: gpio-xilinx: update on suspend and resume calls Srinivas Neeli
2021-06-03 16:49 ` Srinivas Neeli
2021-06-14 20:13 ` Bartosz Golaszewski
2021-06-14 20:13   ` 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.