Re: [PATCH 2/2] wlcore: Add support runtime PM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Michael Nazzareno Trimarchi <michael@xxxxxxxxxxxxxxxxxxxx> [180515 16:19]:
> On Tue, May 15, 2018 at 6:13 PM, Tony Lindgren <tony@xxxxxxxxxxx> wrote:
> > @@ -315,15 +319,17 @@ static ssize_t dynamic_fw_traces_write(struct file *file,
> >         if (unlikely(wl->state != WLCORE_STATE_ON))
> >                 goto out;
> >
> > -       ret = wl1271_ps_elp_wakeup(wl);
> > -       if (ret < 0)
> > +       ret = pm_runtime_get_sync(wl->dev);
> > +       if (ret < 0) {
> > +               pm_runtime_put_noidle(wl->dev);
> >                 goto out;
> > +       }
> >
> 
> Can you just change ps_elp_wakeup with
>        ret = pm_runtime_get_sync(wl->dev);
>        if (ret < 0) {
>                pm_runtime_put_noidle(wl->dev);
>                  goto out;
>        }
> 
> >         ret = wl18xx_acx_dynamic_fw_traces(wl);
> >         if (ret < 0)
> >                 count = ret;
> >
> > -       wl1271_ps_elp_sleep(wl);
> > +       pm_runtime_put(wl->dev);
> 
> and elp_sleep with this one

That's what I started with, but they really behave in a different way. And
there is no usage count. It's really best to just get rid of the custom PM
calls in favor of generic calls. That's because then we have much better
control for future changes in the driver with pm_runtime_use_autosuspend()
and pm_runtime_put_sync() for example.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux