Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Masahiro Yamada and committed by
Arnd Bergmann
2f4233ee 264e22af

+14
+14
drivers/bus/uniphier-system-bus.c
··· 256 256 257 257 uniphier_system_bus_set_reg(priv); 258 258 259 + platform_set_drvdata(pdev, priv); 260 + 259 261 /* Now, the bus is configured. Populate platform_devices below it */ 260 262 return of_platform_default_populate(dev->of_node, NULL, dev); 261 263 } 264 + 265 + static int __maybe_unused uniphier_system_bus_resume(struct device *dev) 266 + { 267 + uniphier_system_bus_set_reg(dev_get_drvdata(dev)); 268 + 269 + return 0; 270 + } 271 + 272 + static const struct dev_pm_ops uniphier_system_bus_pm_ops = { 273 + SET_SYSTEM_SLEEP_PM_OPS(NULL, uniphier_system_bus_resume) 274 + }; 262 275 263 276 static const struct of_device_id uniphier_system_bus_match[] = { 264 277 { .compatible = "socionext,uniphier-system-bus" }, ··· 284 271 .driver = { 285 272 .name = "uniphier-system-bus", 286 273 .of_match_table = uniphier_system_bus_match, 274 + .pm = &uniphier_system_bus_pm_ops, 287 275 }, 288 276 }; 289 277 module_platform_driver(uniphier_system_bus_driver);