From: Brian Norris <briannorris@chromium.org>
To: Mark Brown <broonie@kernel.org>
Cc: Peng Fan <peng.fan@nxp.com>,
"rafael@kernel.org" <rafael@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>,
"S.j. Wang" <shengjiu.wang@nxp.com>
Subject: regmap: mmio: lack of runtime_pm support for debugfs
Date: Mon, 24 Jan 2022 15:50:23 -0800 [thread overview]
Message-ID: <Ye87P19+JOjPEGTY@google.com> (raw)
In-Reply-To: <20200424103004.GB5850@sirena.org.uk>
[[ Retitling from '[PATCH] regmap: mmio: prepare/unprepare clk only when
read/write' ]]
Hi,
Sorry to bring up an old thread, but it appears there's an unresolved
problem in here that I'm also hitting:
On Fri, Apr 24, 2020 at 11:30:04AM +0100, Mark Brown wrote:
> On Fri, Apr 24, 2020 at 01:27:29AM +0000, Peng Fan wrote:
>
> > If we not pass clk to regmap, accessing regmap registers will hang system with
> > Debugfs enabled.
>
> If you're not using a cache then that'll be a problem, however there is
> a flag runtime_pm in the regmap config which when set should cause the
> device to be runtime PM enabled when it's accessed so if you do your
> clock management in runtime PM it should still get enabled. I *think*
> that interacts OK with being in an atomic context but I can't say I've
> verified.
The only 'runtime_pm' flag I'm finding for regmap is for regmap_irq_chip
-- there isn't anything useful for other kinds of regmaps (like MMIO).
If this seems like an expected/useful feature, I'll look at adding it to
the generic 'struct regmap_config' / drivers/base/regmap/regmap.c.
This could be tricky in theory given the atomic context requirements,
but in reality, I think it would still be OK: this feature would really
be useful _only_ for otherwise-unregulated contexts, like debugfs
access (where we can sleep). For all non-debugfs accesses, we expect to
already be RPM_ACTIVE, because the driver should already be managing
runtime PM.
Brian
next prev parent reply other threads:[~2022-01-25 3:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-23 5:46 [PATCH] regmap: mmio: prepare/unprepare clk only when read/write peng.fan
2020-04-23 10:39 ` Aisheng Dong
2020-04-23 10:40 ` Mark Brown
2020-04-23 10:51 ` Peng Fan
2020-04-23 11:22 ` Mark Brown
2020-04-24 1:27 ` Peng Fan
2020-04-24 10:30 ` Mark Brown
2022-01-24 23:50 ` Brian Norris [this message]
2022-02-04 19:02 ` regmap: mmio: lack of runtime_pm support for debugfs Mark Brown
2022-02-04 19:21 ` Brian Norris
2022-02-04 19:41 ` Mark Brown
2022-02-04 19:53 ` Brian Norris
2022-02-05 18:25 ` Mark Brown
2022-02-04 20:05 ` Brian Norris
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=Ye87P19+JOjPEGTY@google.com \
--to=briannorris@chromium.org \
--cc=broonie@kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=rafael@kernel.org \
--cc=shengjiu.wang@nxp.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.