mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
bus: uniphier-system-bus: set up registers when resuming
When resuming, set up registers that have been lost in the sleep state. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
264e22afa3
commit
2f4233ee13
1 changed files with 14 additions and 0 deletions
|
@ -256,10 +256,23 @@ static int uniphier_system_bus_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
uniphier_system_bus_set_reg(priv);
|
uniphier_system_bus_set_reg(priv);
|
||||||
|
|
||||||
|
platform_set_drvdata(pdev, priv);
|
||||||
|
|
||||||
/* Now, the bus is configured. Populate platform_devices below it */
|
/* Now, the bus is configured. Populate platform_devices below it */
|
||||||
return of_platform_default_populate(dev->of_node, NULL, dev);
|
return of_platform_default_populate(dev->of_node, NULL, dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int __maybe_unused uniphier_system_bus_resume(struct device *dev)
|
||||||
|
{
|
||||||
|
uniphier_system_bus_set_reg(dev_get_drvdata(dev));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct dev_pm_ops uniphier_system_bus_pm_ops = {
|
||||||
|
SET_SYSTEM_SLEEP_PM_OPS(NULL, uniphier_system_bus_resume)
|
||||||
|
};
|
||||||
|
|
||||||
static const struct of_device_id uniphier_system_bus_match[] = {
|
static const struct of_device_id uniphier_system_bus_match[] = {
|
||||||
{ .compatible = "socionext,uniphier-system-bus" },
|
{ .compatible = "socionext,uniphier-system-bus" },
|
||||||
{ /* sentinel */ }
|
{ /* sentinel */ }
|
||||||
|
@ -271,6 +284,7 @@ static struct platform_driver uniphier_system_bus_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "uniphier-system-bus",
|
.name = "uniphier-system-bus",
|
||||||
.of_match_table = uniphier_system_bus_match,
|
.of_match_table = uniphier_system_bus_match,
|
||||||
|
.pm = &uniphier_system_bus_pm_ops,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
module_platform_driver(uniphier_system_bus_driver);
|
module_platform_driver(uniphier_system_bus_driver);
|
||||||
|
|
Loading…
Reference in a new issue