From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Philip Rakity <philipspatches@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
Philip Rakity <prakity@marvell.com>
Subject: Re: [PATCH] regulator: pass voltage when calling notifier for change
Date: Mon, 11 Jun 2012 11:59:21 +0800 [thread overview]
Message-ID: <20120611035918.GH4218@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1339270755-2503-1-git-send-email-prakity@marvell.com>
[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]
On Sat, Jun 09, 2012 at 12:39:15PM -0700, Philip Rakity wrote:
> - trace_regulator_set_voltage_complete(rdev_get_name(rdev), selector);
> + voltage = _regulator_get_voltage(rdev);
> + if (voltage >= 0)
> + _notifier_call_chain(rdev,
> + REGULATOR_EVENT_VOLTAGE_CHANGE,
> + (void *)voltage);
> + }
> + trace_regulator_set_voltage_complete(rdev_get_name(rdev), ret);
Hrm, I know we discussed this offline but now that I see the actual code
for the full change here I'm a bit worried about the performance impact
from calling get_voltage() again with devices that don't cache the
register map (it'll be negligable for those that do). Looking a bit at
the context I think probably what we want to do here is directly call
list_voltage() for the selector we've just set so that the driver
doesn't end up going back to the hardware to read the register value.
Another option is to look at the notifier chain to see if there's any
actual users but that seems more complicated and less abstracted.
We definitely do want to pass the voltage out, now that I see this I
seem to remember that the reason we don't is exactly the performance
concern above but that all predates the use of selectors here which
means we should be able to avoid the I/O costs.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2012-06-11 3:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-09 19:39 [PATCH] regulator: pass voltage when calling notifier for change Philip Rakity
2012-06-11 3:59 ` Mark Brown [this message]
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=20120611035918.GH4218@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=philipspatches@gmail.com \
--cc=prakity@marvell.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