From: Tony Lindgren <tony@atomide.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Yicong Yang <yangyicong@huawei.com>,
gregkh@linuxfoundation.org, jirislaby@kernel.org,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
john.ogness@linutronix.de, tglx@linutronix.de,
yangyicong@hisilicon.com, linuxarm@huawei.com,
prime.zeng@hisilicon.com, jonathan.cameron@huawei.com,
fanghao11@huawei.com
Subject: Re: [PATCH v2] serial: port: Don't suspend if the port is still busy
Date: Tue, 6 Feb 2024 15:21:55 +0200 [thread overview]
Message-ID: <20240206132155.GH5185@atomide.com> (raw)
In-Reply-To: <ZcIwGm-W4A2rupOi@smile.fi.intel.com>
* 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
next prev parent reply other threads:[~2024-02-06 13:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 7:33 [PATCH v2] serial: port: Don't suspend if the port is still busy Yicong Yang
2024-02-06 8:34 ` Tony Lindgren
2024-02-06 9:44 ` Greg KH
2024-02-06 10:20 ` Yicong Yang
2024-02-06 13:09 ` Andy Shevchenko
2024-02-06 13:11 ` Andy Shevchenko
2024-02-06 13:21 ` Tony Lindgren [this message]
2024-02-07 7:22 ` Yicong Yang
2024-02-07 14:47 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240206132155.GH5185@atomide.com \
--to=tony@atomide.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=fanghao11@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=jonathan.cameron@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=prime.zeng@hisilicon.com \
--cc=tglx@linutronix.de \
--cc=yangyicong@hisilicon.com \
--cc=yangyicong@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.