Skip to content

Commit a8c199a

Browse files
committed
Merge patch series "Drop runtime PM support for Baytrail and Lynxpoint pinctrl"
Raag Jadav <[email protected]> says: This series removes runtime PM support for the devices that are not explicitly attached to acpi_lpss_pm_domain as it is dead code anyway. This has no functional impact and helps reduce their code and memory footprint. bloat-o-meter: ============== Baytrail: add/remove: 2/4 grow/shrink: 0/3 up/down: 49/-103 (-54) Total: Before=16104, After=16050, chg -0.34% Lynxpoint: add/remove: 7/10 grow/shrink: 1/3 up/down: 152/-223 (-71) Total: Before=7506, After=7435, chg -0.95% Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]>
2 parents 1209d59 + 67c9e83 commit a8c199a

File tree

2 files changed

+5
-46
lines changed

2 files changed

+5
-46
lines changed

drivers/pinctrl/intel/pinctrl-baytrail.c

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <linux/module.h>
1717
#include <linux/types.h>
1818
#include <linux/platform_device.h>
19-
#include <linux/pm_runtime.h>
19+
#include <linux/pm.h>
2020
#include <linux/property.h>
2121
#include <linux/seq_file.h>
2222
#include <linux/string_helpers.h>
@@ -722,8 +722,6 @@ static int byt_gpio_request_enable(struct pinctrl_dev *pctl_dev,
722722

723723
raw_spin_unlock_irqrestore(&byt_lock, flags);
724724

725-
pm_runtime_get(vg->dev);
726-
727725
return 0;
728726
}
729727

@@ -734,7 +732,6 @@ static void byt_gpio_disable_free(struct pinctrl_dev *pctl_dev,
734732
struct intel_pinctrl *vg = pinctrl_dev_get_drvdata(pctl_dev);
735733

736734
byt_gpio_clear_triggering(vg, offset);
737-
pm_runtime_put(vg->dev);
738735
}
739736

740737
static void byt_gpio_direct_irq_check(struct intel_pinctrl *vg,
@@ -1661,7 +1658,6 @@ static int byt_pinctrl_probe(struct platform_device *pdev)
16611658
return ret;
16621659

16631660
platform_set_drvdata(pdev, vg);
1664-
pm_runtime_enable(dev);
16651661

16661662
return 0;
16671663
}
@@ -1750,26 +1746,15 @@ static int byt_gpio_resume(struct device *dev)
17501746
return 0;
17511747
}
17521748

1753-
static int byt_gpio_runtime_suspend(struct device *dev)
1754-
{
1755-
return 0;
1756-
}
1757-
1758-
static int byt_gpio_runtime_resume(struct device *dev)
1759-
{
1760-
return 0;
1761-
}
1762-
17631749
static const struct dev_pm_ops byt_gpio_pm_ops = {
17641750
LATE_SYSTEM_SLEEP_PM_OPS(byt_gpio_suspend, byt_gpio_resume)
1765-
RUNTIME_PM_OPS(byt_gpio_runtime_suspend, byt_gpio_runtime_resume, NULL)
17661751
};
17671752

17681753
static struct platform_driver byt_gpio_driver = {
17691754
.probe = byt_pinctrl_probe,
17701755
.driver = {
17711756
.name = "byt_gpio",
1772-
.pm = pm_ptr(&byt_gpio_pm_ops),
1757+
.pm = pm_sleep_ptr(&byt_gpio_pm_ops),
17731758
.acpi_match_table = byt_gpio_acpi_match,
17741759
.suppress_bind_attrs = true,
17751760
},

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)