Message ID | 1429896924-21540-7-git-send-email-ahaslam@baylibre.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On Fri, Apr 24, 2015 at 7:35 PM, <ahaslam@baylibre.com> wrote: > --- a/arch/arm/mach-shmobile/pm-rmobile.c > +++ b/arch/arm/mach-shmobile/pm-rmobile.c > @@ -158,6 +164,8 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd) > genpd->dev_ops.active_wakeup = rmobile_pd_active_wakeup; > genpd->power_off = rmobile_pd_power_down; > genpd->power_on = rmobile_pd_power_up; > + genpd->states = rmobile_genpd_states; > + genpd->state_count = ARRAY_SIZE(rmobile_genpd_states); The states are set _after_ pm_genpd_init(), so this won't work. BTW, no idea why all these genpd fields are set after that call. Perhaps originally they had to override defaults set by pm_genpd_init()? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c index 9501820..038376c 100644 --- a/arch/arm/mach-shmobile/pm-rmobile.c +++ b/arch/arm/mach-shmobile/pm-rmobile.c @@ -148,6 +148,12 @@ static void rmobile_pd_detach_dev(struct generic_pm_domain *domain, pm_clk_destroy(dev); } +struct genpd_power_state rmobile_genpd_states[] = { + { + .name = "OFF", + } +}; + static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd) { struct generic_pm_domain *genpd = &rmobile_pd->genpd; @@ -158,6 +164,8 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd) genpd->dev_ops.active_wakeup = rmobile_pd_active_wakeup; genpd->power_off = rmobile_pd_power_down; genpd->power_on = rmobile_pd_power_up; + genpd->states = rmobile_genpd_states; + genpd->state_count = ARRAY_SIZE(rmobile_genpd_states); genpd->attach_dev = rmobile_pd_attach_dev; genpd->detach_dev = rmobile_pd_detach_dev; __rmobile_pd_power_up(rmobile_pd, false);