From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Cc: Malathi A <malathi.a2000@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] serial: 8250_uniphier: Use devm_clk_get_enabled()
Date: Fri, 25 Sep 2026 16:37:47 +0300 [thread overview]
Message-ID: <arZ5KxIp55qA6UA7@ashevche-desk.local> (raw)
In-Reply-To: <3ea1f574-ddb5-46a6-9bc1-7a8ea84c54bd@socionext.com>
On Fri, Sep 25, 2026 at 08:32:20PM +0900, Kunihiko Hayashi wrote:
> On 2026/09/24 23:09, Andy Shevchenko wrote:
> > On Thu, Sep 24, 2026 at 06:07:37PM +0900, Kunihiko Hayashi wrote:
> > > On 2026/09/17 13:05, Malathi A wrote:
...
> > > I'm a bit concerned about the error path in uniphier_uart_resume().
> > > The clock may have been disabled in uniphier_uart_suspend(), and
> > > clk_prepare_enable() can fail when trying to enable it again.
> > >
> > > In that case, wouldn't devres try to disable an already disabled
> > > clock on detach?
> >
> > Isn't there is a guarantee that the .remove() is called with PM runtime on
After reading a code of driver core I see that this is the opposite actually.
The PM runtime might be off.
> > and get, meaning it's called with the enabled clock? But if not the case,
> > we might use PM runtime force operations (resume and suspend in the
> > respective cases.
>
> My concern was just the case where clk_prepare_enable() in the system
> resume callback fails, leaving the clock disabled before devres cleanup.
>
> This driver currently only uses SET_SYSTEM_SLEEP_PM_OPS(), so I wasn't
> considering runtime PM here.
So, in such a case how do you see the scenario when system is resumed (Right?
Otherwise we can't do anything, like detaching driver from the device.) and
clock is disabled?
> I don't have a strong opinion on whether runtime PM should be involved,
> but if it guarantees that the clock is enabled before .remove(),
> that would address my concern.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-09-25 13:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 4:05 [PATCH v2] serial: 8250_uniphier: Use devm_clk_get_enabled() Malathi A
2026-09-17 6:42 ` Andy Shevchenko
2026-09-24 9:07 ` Kunihiko Hayashi
2026-09-24 14:09 ` Andy Shevchenko
2026-09-25 11:32 ` Kunihiko Hayashi
2026-09-25 13:37 ` Andy Shevchenko [this message]
2026-09-28 6:51 ` Kunihiko Hayashi
2026-09-28 9:05 ` Andy Shevchenko
2026-10-05 6:55 ` Kunihiko Hayashi
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=arZ5KxIp55qA6UA7@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hayashi.kunihiko@socionext.com \
--cc=jirislaby@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=malathi.a2000@gmail.com \
--cc=mhiramat@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox