Search Linux Wireless

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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux