From: Dmitry Osipenko <digetx@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH v1 3/3] gpio: tegra: Use NOIRQ phase for suspend/resume
Date: Sun, 15 Dec 2019 21:30:47 +0300 [thread overview]
Message-ID: <20191215183047.9414-4-digetx@gmail.com> (raw)
In-Reply-To: <20191215183047.9414-1-digetx@gmail.com>
All GPIO interrupts are disabled during of the NOIRQ suspend/resume
phase, thus there is no need to manually disable the interrupts. This
patch doesn't fix any problem, this is just a minor clean-up.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
drivers/gpio/gpio-tegra.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 4790dfec7758..acb99eff9939 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -416,11 +416,8 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc)
static int tegra_gpio_resume(struct device *dev)
{
struct tegra_gpio_info *tgi = dev_get_drvdata(dev);
- unsigned long flags;
unsigned int b, p;
- local_irq_save(flags);
-
for (b = 0; b < tgi->bank_count; b++) {
struct tegra_gpio_bank *bank = &tgi->bank_info[b];
@@ -448,17 +445,14 @@ static int tegra_gpio_resume(struct device *dev)
}
}
- local_irq_restore(flags);
return 0;
}
static int tegra_gpio_suspend(struct device *dev)
{
struct tegra_gpio_info *tgi = dev_get_drvdata(dev);
- unsigned long flags;
unsigned int b, p;
- local_irq_save(flags);
for (b = 0; b < tgi->bank_count; b++) {
struct tegra_gpio_bank *bank = &tgi->bank_info[b];
@@ -488,7 +482,7 @@ static int tegra_gpio_suspend(struct device *dev)
GPIO_INT_ENB(tgi, gpio));
}
}
- local_irq_restore(flags);
+
return 0;
}
@@ -562,7 +556,7 @@ static inline void tegra_gpio_debuginit(struct tegra_gpio_info *tgi)
#endif
static const struct dev_pm_ops tegra_gpio_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume)
+ SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume)
};
static int tegra_gpio_probe(struct platform_device *pdev)
--
2.24.0
next prev parent reply other threads:[~2019-12-15 18:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-15 18:30 [PATCH v1 0/3] Tegra GPIO: Minor code clean up Dmitry Osipenko
2019-12-15 18:30 ` [PATCH v1 1/3] gpio: tegra: Use generic readl_relaxed/writel_relaxed accessors Dmitry Osipenko
2019-12-19 11:01 ` Bartosz Golaszewski
2019-12-19 15:25 ` Dmitry Osipenko
2019-12-19 15:57 ` Ben Dooks
2019-12-19 16:34 ` Dmitry Osipenko
2019-12-15 18:30 ` [PATCH v1 2/3] gpio: tegra: Properly handle irq_set_irq_wake() error Dmitry Osipenko
2019-12-15 18:30 ` Dmitry Osipenko [this message]
2019-12-16 14:45 ` [PATCH v1 0/3] Tegra GPIO: Minor code clean up Dmitry Osipenko
2019-12-19 14:53 ` Thierry Reding
2019-12-19 15:26 ` Dmitry Osipenko
2020-01-06 22:59 ` Linus Walleij
2020-01-07 8:25 ` Bartosz Golaszewski
2020-01-07 9:29 ` Linus Walleij
2020-01-07 9:31 ` Bartosz Golaszewski
2020-01-07 12:38 ` Linus Walleij
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=20191215183047.9414-4-digetx@gmail.com \
--to=digetx@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=devel@driverdev.osuosl.org \
--cc=jonathanh@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.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 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.