File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1343,6 +1343,25 @@ static int bcm2835_add_host(struct bcm2835_host *host)
1343
1343
return 0 ;
1344
1344
}
1345
1345
1346
+ static int bcm2835_suspend (struct device * dev )
1347
+ {
1348
+ struct bcm2835_host * host = dev_get_drvdata (dev );
1349
+
1350
+ clk_disable_unprepare (host -> clk );
1351
+
1352
+ return 0 ;
1353
+ }
1354
+
1355
+ static int bcm2835_resume (struct device * dev )
1356
+ {
1357
+ struct bcm2835_host * host = dev_get_drvdata (dev );
1358
+
1359
+ return clk_prepare_enable (host -> clk );
1360
+ }
1361
+
1362
+ static DEFINE_SIMPLE_DEV_PM_OPS (bcm2835_pm_ops , bcm2835_suspend ,
1363
+ bcm2835_resume ) ;
1364
+
1346
1365
static int bcm2835_probe (struct platform_device * pdev )
1347
1366
{
1348
1367
struct device * dev = & pdev -> dev ;
@@ -1471,6 +1490,7 @@ static struct platform_driver bcm2835_driver = {
1471
1490
.name = "sdhost-bcm2835" ,
1472
1491
.probe_type = PROBE_PREFER_ASYNCHRONOUS ,
1473
1492
.of_match_table = bcm2835_match ,
1493
+ .pm = pm_ptr (& bcm2835_pm_ops ),
1474
1494
},
1475
1495
};
1476
1496
module_platform_driver (bcm2835_driver );
You can’t perform that action at this time.
0 commit comments