From: Srinivas Neeli <srinivas.neeli@xilinx.com>
To: <linus.walleij@linaro.org>, <bgolaszewski@baylibre.com>,
<michal.simek@xilinx.com>, <shubhrajyoti.datta@xilinx.com>,
<sgoud@xilinx.com>
Cc: <linux-gpio@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <git@xilinx.com>,
Srinivas Neeli <srinivas.neeli@xilinx.com>
Subject: [PATCH] gpio: gpio-xilinx: update on suspend and resume calls
Date: Thu, 3 Jun 2021 22:19:00 +0530 [thread overview]
Message-ID: <20210603164900.46020-1-srinivas.neeli@xilinx.com> (raw)
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
next reply other threads:[~2021-06-03 16:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 16:49 Srinivas Neeli [this message]
2021-06-14 20:13 ` [PATCH] gpio: gpio-xilinx: update on suspend and resume calls Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210603164900.46020-1-srinivas.neeli@xilinx.com \
--to=srinivas.neeli@xilinx.com \
--cc=bgolaszewski@baylibre.com \
--cc=git@xilinx.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=sgoud@xilinx.com \
--cc=shubhrajyoti.datta@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).