Skip to content
  • Ulf Hansson's avatar
    c1df456d
    PM: domains: Don't runtime resume devices at genpd_prepare() · c1df456d
    Ulf Hansson authored
    
    
    Runtime resuming a device upfront in the genpd_prepare() callback,
    to check if there is a wakeup pending for it, seems like an
    unnecessary thing to do.
    
    The PM core already manages these kind of things in a common way in
    __device_suspend(), via calling pm_runtime_barrier() and
    pm_wakeup_pending().
    
    Therefore, let's simply drop this behaviour from genpd_prepare().
    
    Note that, this change is applicable only for devices that are
    attached to a genpd that has the GENPD_FLAG_ACTIVE_WAKEUP set
    (Renesas, Mediatek, and Rockchip platforms). Moreover, a driver
    that needs to restore power for its device to re-configure it
    for a system wakeup, may still call pm_runtime_get_sync(), for
    example, to do this.
    
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    c1df456d
    PM: domains: Don't runtime resume devices at genpd_prepare()
    Ulf Hansson authored
    
    
    Runtime resuming a device upfront in the genpd_prepare() callback,
    to check if there is a wakeup pending for it, seems like an
    unnecessary thing to do.
    
    The PM core already manages these kind of things in a common way in
    __device_suspend(), via calling pm_runtime_barrier() and
    pm_wakeup_pending().
    
    Therefore, let's simply drop this behaviour from genpd_prepare().
    
    Note that, this change is applicable only for devices that are
    attached to a genpd that has the GENPD_FLAG_ACTIVE_WAKEUP set
    (Renesas, Mediatek, and Rockchip platforms). Moreover, a driver
    that needs to restore power for its device to re-configure it
    for a system wakeup, may still call pm_runtime_get_sync(), for
    example, to do this.
    
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Loading