From: "Anson.Huang@freescale.com" <Anson.Huang@freescale.com>
To: Mark Brown <broonie@kernel.org>
Cc: "Anson.Huang@freescale.com" <Anson.Huang@freescale.com>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regulator: anatop: add is_enabled interface
Date: Tue, 17 Dec 2013 12:38:33 +0000 [thread overview]
Message-ID: <A9C48E12-97A7-4A66-98EB-BA7BC23F27B3@freescale.com> (raw)
In-Reply-To: <20131217122923.GT3185@sirena.org.uk>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 2347 bytes --]
Sent from Anson's iPhone
> ÔÚ 2013Äê12ÔÂ17ÈÕ£¬20:29£¬"Mark Brown" <broonie@kernel.org> дµÀ£º
>
> On Tue, Dec 17, 2013 at 02:38:56AM +0000, Anson.Huang@freescale.com wrote:
>
> Please fix the line length you're using to word wrap, it should be less
> than 80 columns to make your mails readable.
>
>>>> + if (!anatop_reg->control_reg)
>>>> + return -ENOTSUPP;
>
>>> In what situation would this happen and why would the operation be provided in
>>> those situations?
>
>> [Anson] This condition check is to avoid the case that control_reg is not
>> Initialized correctly in the probe function.
>
> Why would that happen without the probe function failing - it would be
> better to add the error checking there wouldn't it?
Okay, than what about other functions? there is such condition check there is other functions too, that is why I add it here. if you think it is no necessary, I will remove this check in my patch?
>
>> 1. For cpufreq change, we need to scale VDDARM as well as VDDSOC/PU's voltage, each
>> setpoint has different VDDARM, VDDSOC/PU voltage;
>> 2. VDDARM and VDDSOC will be always on but VDDPU can be off in uboot due to the big leakage
>> it has(as high as ~43mA on i.MX6Q), as it is only for GPU/VPU module, and we will have
>> dynamic VDDPU power management available, so VDDPU LDO's status is changing according to GPU/VPU's
>> behavior;
>> 3. If VDDPU is off during cpufreq change, then there is no need to scaling VDDPU's voltage,
>> so we will check whether VDDPU is enabled before scaling it in cpufreq driver, this is done
>> in my other patch thread;
>
> This sounds like you need to have some higher level synchronisation
> between whatever is managing this supply and your cpufreq driver - if
> you rely on reading back the current status from the hardware there will
> always be races between reading the state and the other thing doing the
> enable or disable.
yes, you are right. but I think we have handled that, all the operations of this LDO will via regulator interface, and regulator framework already has mutex lock. so there should be no such race in kernel as long as we all use regulator interface to access anatop LDO.ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2013-12-17 12:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-16 21:20 Anson Huang
2013-12-16 18:57 ` Mark Brown
2013-12-17 2:38 ` Anson.Huang
2013-12-17 12:29 ` Mark Brown
2013-12-17 12:38 ` Anson.Huang [this message]
2013-12-17 13:00 ` Mark Brown
2013-12-17 13:10 ` Anson.Huang
2013-12-17 13:53 ` Mark Brown
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=A9C48E12-97A7-4A66-98EB-BA7BC23F27B3@freescale.com \
--to=anson.huang@freescale.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®