Skip to content

Commit ea71c59

Browse files
storulfrafaeljw
authored andcommitted
PM / Domains: Implement the ->start() callback for genpd
To allow a subsystem/driver to explicitly start its device from genpd's point view, let's implement the ->start() callback in the struct dev_pm_domain that corresponds to the genpd. Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent ca765a8 commit ea71c59

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/base/power/domain.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,13 @@ static int genpd_power_on(struct generic_pm_domain *genpd, unsigned int depth)
634634
return ret;
635635
}
636636

637+
static int genpd_dev_pm_start(struct device *dev)
638+
{
639+
struct generic_pm_domain *genpd = dev_to_genpd(dev);
640+
641+
return genpd_start_dev(genpd, dev);
642+
}
643+
637644
static int genpd_dev_pm_qos_notifier(struct notifier_block *nb,
638645
unsigned long val, void *ptr)
639646
{
@@ -1805,6 +1812,7 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
18051812
genpd->domain.ops.poweroff_noirq = genpd_poweroff_noirq;
18061813
genpd->domain.ops.restore_noirq = genpd_restore_noirq;
18071814
genpd->domain.ops.complete = genpd_complete;
1815+
genpd->domain.start = genpd_dev_pm_start;
18081816

18091817
if (genpd->flags & GENPD_FLAG_PM_CLK) {
18101818
genpd->dev_ops.stop = pm_clk_suspend;

0 commit comments

Comments
 (0)