• Rafael J. Wysocki's avatar
    PM / Domains: Make it possible to use per-device domain callbacks · d5e4cbfe
    Rafael J. Wysocki authored
    The current generic PM domains code requires that the same .stop(),
    .start() and .active_wakeup() device callback routines be used for
    all devices in the given domain, which is inflexible and may not
    cover some specific use cases.  For this reason, make it possible to
    use device specific .start()/.stop() and .active_wakeup() callback
    routines by adding corresponding callback pointers to struct
    generic_pm_domain_data.  Add a new helper routine,
    pm_genpd_register_callbacks(), that can be used to populate
    the new per-device callback pointers.
    
    Modify the shmobile's power domains code to allow drivers to add
    their own code to be run during the device stop and start operations
    with the help of the new callback pointers.
    Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
    Acked-by: default avatarMagnus Damm <damm@opensource.se>
    d5e4cbfe
pm-sh7372.c 11.8 KB