lkml.org 
[lkml]   [2024]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] serial: port: Don't suspend if the port is still busy
* Andy Shevchenko <andriy.shevchenko@linux.intel.com> [240206 13:12]:
> > static int serial_port_runtime_suspend(struct device *dev)
> > {
> > int ret;
> > ...
> > uart_port_lock_irqsave(port, &flags);
> > ret = __serial_port_busy(port);
> > if (ret)
> > port->ops->start_tx(port);
> > uart_port_unlock_irqrestore(port, flags);
>
> > if (ret)
> > pm_runtime_mark_last_busy(dev);
>
> And obvious question here: why in case of 0 we can't mark this as busy as well?
> I.o.w. why do we need to mark it only when error is set?

No need to call in the 0 case. The last time driver was busy
was when pm_runtime_mark_last_busy() was called, and in the 0 case
we just runtime suspend based on the autosuspend timeout value.

Regards,

Tony

\
 
 \ /
  Last update: 2024-05-27 14:50    [W:0.069 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site