Commit be4dc321 authored by Srinivas Neeli's avatar Srinivas Neeli Committed by Bartosz Golaszewski

gpio: gpio-xilinx: update on suspend and resume calls

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: default avatarSrinivas Neeli <srinivas.neeli@xilinx.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent 35d7b72a
...@@ -313,8 +313,8 @@ static int __maybe_unused xgpio_suspend(struct device *dev) ...@@ -313,8 +313,8 @@ static int __maybe_unused xgpio_suspend(struct device *dev)
struct irq_data *data = irq_get_irq_data(gpio->irq); struct irq_data *data = irq_get_irq_data(gpio->irq);
if (!data) { if (!data) {
dev_err(dev, "irq_get_irq_data() failed\n"); dev_dbg(dev, "IRQ not connected\n");
return -EINVAL; return pm_runtime_force_suspend(dev);
} }
if (!irqd_is_wakeup_set(data)) if (!irqd_is_wakeup_set(data))
...@@ -359,8 +359,8 @@ static int __maybe_unused xgpio_resume(struct device *dev) ...@@ -359,8 +359,8 @@ static int __maybe_unused xgpio_resume(struct device *dev)
struct irq_data *data = irq_get_irq_data(gpio->irq); struct irq_data *data = irq_get_irq_data(gpio->irq);
if (!data) { if (!data) {
dev_err(dev, "irq_get_irq_data() failed\n"); dev_dbg(dev, "IRQ not connected\n");
return -EINVAL; return pm_runtime_force_resume(dev);
} }
if (!irqd_is_wakeup_set(data)) if (!irqd_is_wakeup_set(data))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment