mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Peng Fan <peng.fan@nxp.com>
Cc: "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: Re: [PATCH] regmap: mmio: prepare/unprepare clk only when read/write
Date: Thu, 23 Apr 2020 12:22:44 +0100	[thread overview]
Message-ID: <20200423112244.GH4808@sirena.org.uk> (raw)
In-Reply-To: <DB6PR0402MB27600084E4A040609EF620A088D30@DB6PR0402MB2760.eurprd04.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

On Thu, Apr 23, 2020 at 10:51:36AM +0000, Peng Fan wrote:

> > This will mean that we're doing clk_prepare() during I/O which isn't good
> > since for MMIO regmaps we support I/O operations in atomic contexts.

> Ah, yes. Do you have any suggestions? If we use clk_prepare at the very
> beginning, the power that binded to the clk device will be always on,
> and cause power consumption high.

Not really in regmap itself - I think your best bet here is to move the
clock handling out of regmap and up into the driver.  regmap won't do
any I/O unless your driver calls it so this will work fine, this support
is only there in regmap as a convenience but if it's getting in the way
then you're probably going to be able to do a better job pushing this
into rutime PM in the driver or just having direct clock calls.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-04-23 11:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23  5:46 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 [this message]
2020-04-24  1:27       ` Peng Fan
2020-04-24 10:30         ` Mark Brown
2022-01-24 23:50           ` regmap: mmio: lack of runtime_pm support for debugfs Brian Norris
2022-02-04 19:02             ` 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=20200423112244.GH4808@sirena.org.uk \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome