[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231003114036.27674-3-raag.jadav@intel.com>
Date: Tue, 3 Oct 2023 17:10:36 +0530
From: Raag Jadav <raag.jadav@...el.com>
To: linus.walleij@...aro.org, mika.westerberg@...ux.intel.com,
andriy.shevchenko@...ux.intel.com
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
mallikarjunappa.sangannavar@...el.com, bala.senthil@...el.com,
Raag Jadav <raag.jadav@...el.com>
Subject: [PATCH v2 2/2] pinctrl: lynxpoint: drop runtime PM support
Since Lynxpoint pinctrl device is not attached to acpi_lpss_pm_domain,
runtime PM serves no purpose here. Drop it and switch to pm_sleep_ptr()
as now we only have resume handle in place.
Signed-off-by: Raag Jadav <raag.jadav@...el.com>
Acked-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
---
drivers/pinctrl/intel/pinctrl-lynxpoint.c | 32 +++--------------------
1 file changed, 3 insertions(+), 29 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/pinctrl-lynxpoint.c
index c3732a9f0658..068cfd27f97f 100644
--- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c
+++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c
@@ -15,7 +15,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
+#include <linux/pm.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/types.h>
@@ -337,8 +337,6 @@ static int lp_gpio_request_enable(struct pinctrl_dev *pctldev,
unsigned long flags;
u32 value;
- pm_runtime_get(lg->dev);
-
raw_spin_lock_irqsave(&lg->lock, flags);
/*
@@ -373,8 +371,6 @@ static void lp_gpio_disable_free(struct pinctrl_dev *pctldev,
lp_gpio_disable_input(conf2);
raw_spin_unlock_irqrestore(&lg->lock, flags);
-
- pm_runtime_put(lg->dev);
}
static int lp_gpio_set_direction(struct pinctrl_dev *pctldev,
@@ -841,24 +837,6 @@ static int lp_gpio_probe(struct platform_device *pdev)
return ret;
}
- pm_runtime_enable(dev);
-
- return 0;
-}
-
-static int lp_gpio_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
- return 0;
-}
-
-static int lp_gpio_runtime_suspend(struct device *dev)
-{
- return 0;
-}
-
-static int lp_gpio_runtime_resume(struct device *dev)
-{
return 0;
}
@@ -876,10 +854,7 @@ static int lp_gpio_resume(struct device *dev)
return 0;
}
-static const struct dev_pm_ops lp_gpio_pm_ops = {
- SYSTEM_SLEEP_PM_OPS(NULL, lp_gpio_resume)
- RUNTIME_PM_OPS(lp_gpio_runtime_suspend, lp_gpio_runtime_resume, NULL)
-};
+static DEFINE_SIMPLE_DEV_PM_OPS(lp_gpio_pm_ops, NULL, lp_gpio_resume);
static const struct acpi_device_id lynxpoint_gpio_acpi_match[] = {
{ "INT33C7", (kernel_ulong_t)&lptlp_soc_data },
@@ -890,10 +865,9 @@ MODULE_DEVICE_TABLE(acpi, lynxpoint_gpio_acpi_match);
static struct platform_driver lp_gpio_driver = {
.probe = lp_gpio_probe,
- .remove = lp_gpio_remove,
.driver = {
.name = "lp_gpio",
- .pm = pm_ptr(&lp_gpio_pm_ops),
+ .pm = pm_sleep_ptr(&lp_gpio_pm_ops),
.acpi_match_table = lynxpoint_gpio_acpi_match,
},
};
--
2.17.1
Powered by blists - more mailing lists