Commit 8fd51616 authored by Raag Jadav's avatar Raag Jadav Committed by Andy Shevchenko
Browse files

pinctrl: baytrail: drop runtime PM support



Since Baytrail 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 suspend and resume handles in place.

Signed-off-by: default avatarRaag Jadav <raag.jadav@intel.com>
Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Link: https://lore.kernel.org/r/20231003114036.27674-2-raag.jadav@intel.com


Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 1209d590
Loading
Loading
Loading
Loading
+2 −17
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
#include <linux/module.h>
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/pm.h>
#include <linux/property.h>
#include <linux/seq_file.h>
#include <linux/string_helpers.h>
@@ -722,8 +722,6 @@ static int byt_gpio_request_enable(struct pinctrl_dev *pctl_dev,

	raw_spin_unlock_irqrestore(&byt_lock, flags);

	pm_runtime_get(vg->dev);

	return 0;
}

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

	byt_gpio_clear_triggering(vg, offset);
	pm_runtime_put(vg->dev);
}

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

	platform_set_drvdata(pdev, vg);
	pm_runtime_enable(dev);

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

static int byt_gpio_runtime_suspend(struct device *dev)
{
	return 0;
}

static int byt_gpio_runtime_resume(struct device *dev)
{
	return 0;
}

static const struct dev_pm_ops byt_gpio_pm_ops = {
	LATE_SYSTEM_SLEEP_PM_OPS(byt_gpio_suspend, byt_gpio_resume)
	RUNTIME_PM_OPS(byt_gpio_runtime_suspend, byt_gpio_runtime_resume, NULL)
};

static struct platform_driver byt_gpio_driver = {
	.probe          = byt_pinctrl_probe,
	.driver         = {
		.name			= "byt_gpio",
		.pm			= pm_ptr(&byt_gpio_pm_ops),
		.pm			= pm_sleep_ptr(&byt_gpio_pm_ops),
		.acpi_match_table	= byt_gpio_acpi_match,
		.suppress_bind_attrs	= true,
	},