From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Tony Lindgren <tony@atomide.com>
Cc: <linux-omap@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Grygorii Strashko <grygorii.strashko@ti.com>
Subject: [PATCH] gpio: omap: switch to use irq_chip pm runtime
Date: Tue, 25 Sep 2018 14:14:46 -0500 [thread overview]
Message-ID: <20180925191446.31504-1-grygorii.strashko@ti.com> (raw)
The PM runtime management can be delegated from OMAP GPIO driver to the IRQ
chip core, since commit be45beb2df69 ("genirq: Add runtime power management
support for IRQ chips") introduces runtime power management support for IRQ
chips.
Hence, drop custom PM runtime support for OMAP GPIO IRQs and switch to IRQ
chip core PM runtime (set irq_chip->parent_device).
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
Based on:
"[PATCHv2 0/3] omap gpio add level idle, cpu_pm and drop runtime_irq_safe"
https://www.spinics.net/lists/arm-kernel/msg677583.html
drivers/gpio/gpio-omap.c | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index c0d7ae7..f292796 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -860,26 +860,6 @@ static void omap_gpio_irq_shutdown(struct irq_data *d)
raw_spin_unlock_irqrestore(&bank->lock, flags);
}
-static void omap_gpio_irq_bus_lock(struct irq_data *data)
-{
- struct gpio_bank *bank = omap_irq_data_get_bank(data);
-
- if (!BANK_USED(bank))
- pm_runtime_get_sync(bank->chip.parent);
-}
-
-static void gpio_irq_bus_sync_unlock(struct irq_data *data)
-{
- struct gpio_bank *bank = omap_irq_data_get_bank(data);
-
- /*
- * If this is the last IRQ to be freed in the bank,
- * disable the bank module.
- */
- if (!BANK_USED(bank))
- pm_runtime_put(bank->chip.parent);
-}
-
static void omap_gpio_ack_irq(struct irq_data *d)
{
struct gpio_bank *bank = omap_irq_data_get_bank(d);
@@ -1383,10 +1363,9 @@ static int omap_gpio_probe(struct platform_device *pdev)
irqc->irq_unmask = omap_gpio_unmask_irq,
irqc->irq_set_type = omap_gpio_irq_type,
irqc->irq_set_wake = omap_gpio_wake_enable,
- irqc->irq_bus_lock = omap_gpio_irq_bus_lock,
- irqc->irq_bus_sync_unlock = gpio_irq_bus_sync_unlock,
irqc->name = dev_name(&pdev->dev);
irqc->flags = IRQCHIP_MASK_ON_SUSPEND;
+ irqc->parent_device = dev;
bank->irq = platform_get_irq(pdev, 0);
if (bank->irq <= 0) {
--
2.10.5
next reply other threads:[~2018-09-25 19:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 19:14 Grygorii Strashko [this message]
2018-09-26 17:12 ` Tony Lindgren
2018-09-26 20:24 ` Grygorii Strashko
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=20180925191446.31504-1-grygorii.strashko@ti.com \
--to=grygorii.strashko@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.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
all inboxes | Powered by JetHome®