Message ID | 20241004094134.113963-1-sakari.ailus@linux.intel.com |
---|---|
State | Rejected |
Headers | show |
Series | treewide: Switch to __pm_runtime_put_autosuspend() | expand |
Hello, [Cc += Rafeel + linux-pm] On Fri, Oct 04, 2024 at 12:41:34PM +0300, Sakari Ailus wrote: > pm_runtime_put_autosuspend() will soon be changed to include a call to > pm_runtime_mark_last_busy(). This patch switches the current users to > __pm_runtime_put_autosuspend() which will continue to have the > functionality of old pm_runtime_put_autosuspend(). > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> > --- > drivers/pwm/pwm-img.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pwm/pwm-img.c b/drivers/pwm/pwm-img.c > index 71542956feca..9bd177ebad0d 100644 > --- a/drivers/pwm/pwm-img.c > +++ b/drivers/pwm/pwm-img.c > @@ -140,7 +140,7 @@ static int img_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, > img_pwm_writel(imgchip, PWM_CH_CFG(pwm->hwpwm), val); > > pm_runtime_mark_last_busy(pwmchip_parent(chip)); > - pm_runtime_put_autosuspend(pwmchip_parent(chip)); > + __pm_runtime_put_autosuspend(pwmchip_parent(chip)); > > return 0; > } > @@ -176,7 +176,7 @@ static void img_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) > img_pwm_writel(imgchip, PWM_CTRL_CFG, val); > > pm_runtime_mark_last_busy(pwmchip_parent(chip)); > - pm_runtime_put_autosuspend(pwmchip_parent(chip)); > + __pm_runtime_put_autosuspend(pwmchip_parent(chip)); > } > > static int img_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, OK, there will soon be a function that does pm_runtime_mark_last_busy(dev); pm_runtime_put_autosuspend(dev); (in today's semantic). Your plan is to call that new function pm_runtime_put_autosuspend(). I think the conversion would be simpler and maybe also semantically clearer if you call the new function e.g. pm_runtime_mark_last_busy_put_autosuspend(...) (ok, something shorter would be nice, too). Then you could add the function already today and don't have to go through each driver twice for the API change. Alternatively only convert pm_runtime_put_autosuspend() calls that are not immediately preceeded by pm_runtime_mark_last_busy() and drop the mark bit after pm_runtime_put_autosuspend() was changed. (Assuming that calling pm_runtime_mark_last_busy() twice while the API conversion is ongoing doesn't hurt.) Best regards Uwe
diff --git a/drivers/pwm/pwm-img.c b/drivers/pwm/pwm-img.c index 71542956feca..9bd177ebad0d 100644 --- a/drivers/pwm/pwm-img.c +++ b/drivers/pwm/pwm-img.c @@ -140,7 +140,7 @@ static int img_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, img_pwm_writel(imgchip, PWM_CH_CFG(pwm->hwpwm), val); pm_runtime_mark_last_busy(pwmchip_parent(chip)); - pm_runtime_put_autosuspend(pwmchip_parent(chip)); + __pm_runtime_put_autosuspend(pwmchip_parent(chip)); return 0; } @@ -176,7 +176,7 @@ static void img_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) img_pwm_writel(imgchip, PWM_CTRL_CFG, val); pm_runtime_mark_last_busy(pwmchip_parent(chip)); - pm_runtime_put_autosuspend(pwmchip_parent(chip)); + __pm_runtime_put_autosuspend(pwmchip_parent(chip)); } static int img_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> --- drivers/pwm/pwm-img.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)