Re: [PATCH v2 2/7] pm: runtime: Add pm_runtime_put_mark_busy_autosusp() helper

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

 



Hi Rafael,

On Sat, Nov 18, 2023 at 10:20:46PM +0100, Rafael J. Wysocki wrote:
> On Sat, Nov 18, 2023 at 6:49 PM Laurent Pinchart wrote:
> > On Fri, Nov 17, 2023 at 01:14:28PM +0200, Sakari Ailus wrote:
> > > Add pm_runtime_put_mark_busy_autosusp() helper function for users that
> > > wish to set the last_busy timestamp to current time and put the
> > > usage_count of the device and set the autosuspend timer.
> > >
> > > Essentially calling pm_runtime_suspend_mark_busy_autosusp() equal to
> > > calling first pm_runtime_mark_last_busy() and then
> > > pm_runtime_put_autosuspend().
> >
> > The vast majority if the pm_runtime_put_autosuspend() users call
> > pm_runtime_mark_last_busy() right before. Let's make the
> > pm_runtime_put_autosuspend() function do that by default, and add a
> > __pm_runtime_put_autosuspend() (name to be bikshedded) for the minority
> > of cases where updating the last busy timestamp isn't desired. We want
> > to simplify the API, not make it more complex.
> 
> I would also prefer it to be done this way if not too problematic.

I'm glad you agree :-) The change will probably be a bit painful, but I
think it's for the best. Sakari, please let me know if I can help.

-- 
Regards,

Laurent Pinchart




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux