Source
249
249
}
250
250
251
251
ret = uniphier_system_bus_check_overlap(priv);
252
252
if (ret)
253
253
return ret;
254
254
255
255
uniphier_system_bus_check_boot_swap(priv);
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
}
262
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
+
};
275
+
263
276
static const struct of_device_id uniphier_system_bus_match[] = {
264
277
{ .compatible = "socionext,uniphier-system-bus" },
265
278
{ /* sentinel */ }
266
279
};
267
280
MODULE_DEVICE_TABLE(of, uniphier_system_bus_match);
268
281
269
282
static struct platform_driver uniphier_system_bus_driver = {
270
283
.probe = uniphier_system_bus_probe,
271
284
.driver = {
272
285
.name = "uniphier-system-bus",
273
286
.of_match_table = uniphier_system_bus_match,
287
+
.pm = &uniphier_system_bus_pm_ops,
274
288
},
275
289
};
276
290
module_platform_driver(uniphier_system_bus_driver);
277
291
278
292
MODULE_AUTHOR("Masahiro Yamada <yamada.masahiro@socionext.com>");
279
293
MODULE_DESCRIPTION("UniPhier System Bus driver");
280
294
MODULE_LICENSE("GPL");