Skip to content

Commit 67c9e83

Browse files
raagjadavandy-shev
authored andcommitted
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 <[email protected]> Acked-by: Mika Westerberg <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 8fd5161 commit 67c9e83

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

drivers/pinctrl/intel/pinctrl-lynxpoint.c

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <linux/kernel.h>
1616
#include <linux/module.h>
1717
#include <linux/platform_device.h>
18-
#include <linux/pm_runtime.h>
18+
#include <linux/pm.h>
1919
#include <linux/seq_file.h>
2020
#include <linux/slab.h>
2121
#include <linux/types.h>
@@ -337,8 +337,6 @@ static int lp_gpio_request_enable(struct pinctrl_dev *pctldev,
337337
unsigned long flags;
338338
u32 value;
339339

340-
pm_runtime_get(lg->dev);
341-
342340
raw_spin_lock_irqsave(&lg->lock, flags);
343341

344342
/*
@@ -373,8 +371,6 @@ static void lp_gpio_disable_free(struct pinctrl_dev *pctldev,
373371
lp_gpio_disable_input(conf2);
374372

375373
raw_spin_unlock_irqrestore(&lg->lock, flags);
376-
377-
pm_runtime_put(lg->dev);
378374
}
379375

380376
static int lp_gpio_set_direction(struct pinctrl_dev *pctldev,
@@ -841,24 +837,6 @@ static int lp_gpio_probe(struct platform_device *pdev)
841837
return ret;
842838
}
843839

844-
pm_runtime_enable(dev);
845-
846-
return 0;
847-
}
848-
849-
static int lp_gpio_remove(struct platform_device *pdev)
850-
{
851-
pm_runtime_disable(&pdev->dev);
852-
return 0;
853-
}
854-
855-
static int lp_gpio_runtime_suspend(struct device *dev)
856-
{
857-
return 0;
858-
}
859-
860-
static int lp_gpio_runtime_resume(struct device *dev)
861-
{
862840
return 0;
863841
}
864842

@@ -876,10 +854,7 @@ static int lp_gpio_resume(struct device *dev)
876854
return 0;
877855
}
878856

879-
static const struct dev_pm_ops lp_gpio_pm_ops = {
880-
SYSTEM_SLEEP_PM_OPS(NULL, lp_gpio_resume)
881-
RUNTIME_PM_OPS(lp_gpio_runtime_suspend, lp_gpio_runtime_resume, NULL)
882-
};
857+
static DEFINE_SIMPLE_DEV_PM_OPS(lp_gpio_pm_ops, NULL, lp_gpio_resume);
883858

884859
static const struct acpi_device_id lynxpoint_gpio_acpi_match[] = {
885860
{ "INT33C7", (kernel_ulong_t)&lptlp_soc_data },
@@ -890,10 +865,9 @@ MODULE_DEVICE_TABLE(acpi, lynxpoint_gpio_acpi_match);
890865

891866
static struct platform_driver lp_gpio_driver = {
892867
.probe = lp_gpio_probe,
893-
.remove = lp_gpio_remove,
894868
.driver = {
895869
.name = "lp_gpio",
896-
.pm = pm_ptr(&lp_gpio_pm_ops),
870+
.pm = pm_sleep_ptr(&lp_gpio_pm_ops),
897871
.acpi_match_table = lynxpoint_gpio_acpi_match,
898872
},
899873
};

0 commit comments

Comments
 (0)