From: "Bengt Jönsson" <bengt.g.jonsson@stericsson.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Lee Jones <lee.jones@linaro.org>,
Yvan FILLION <yvan.fillion@stericsson.com>,
Liam Girdwood <lgirdwood@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regulator: ab8500: Fix get_mode for shared mode regulators
Date: Mon, 15 Apr 2013 14:41:14 +0200 [thread overview]
Message-ID: <516BF56A.5010401@stericsson.com> (raw)
In-Reply-To: <CAFRkauBzvdGrYizNZXivrzCdQ0btUamFL2hLjLX4rzS6fWhsWA@mail.gmail.com>
On 04/15/2013 02:13 PM, Axel Lin wrote:
>> I guess what you don't like with the current approach is that the driver
>> returns REGULATOR_MODE_IDLE in some cases where the mode register is set to
>> LP. But I think, with patch applied, the control may be wrong in some cases
>> because the regulator framework will call get_mode and see that the mode is
>> already correct and not call set_mode so lp_mode_req will not get updated. I
> I got your point now.
>
> My point is get_mode() should always return "correct" status by
> reading register value.
> And as you mentioned, regulator_set_mode() did check current mode and won't call
> set_mode callback if current mode is the same as the target mode.
> And that is why this patch won't work.
>
> However, Make get_mode() return "incorrect" status to avoid above
> issue looks wrong to me.
>
> Regards,
> Axel
I understand your point of view, but I think that the framework (as it
is currently implemented) expects to get the requested mode of the
regulator in this case, not the actual mode (in the shared mode
register).The alternative could be to change the framework in some way.
Any ideas? Otherwise I propose to keep the code and maybe add a comment.
Regards,
Bengt
next prev parent reply other threads:[~2013-04-15 12:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 12:31 [PATCH] regulator: ab8500: Fix get_mode for shared mode regulators Axel Lin
2013-04-13 14:10 ` Axel Lin
2013-04-15 8:09 ` Lee Jones
2013-04-15 8:03 ` Bengt Jönsson
2013-04-15 8:34 ` Axel Lin
2013-04-15 8:50 ` Axel Lin
2013-04-15 11:34 ` Bengt Jönsson
2013-04-15 12:13 ` Axel Lin
2013-04-15 12:41 ` Bengt Jönsson [this message]
2013-04-15 14:11 ` Axel Lin
2013-04-15 14:48 ` Bengt Jönsson
2013-04-15 16:07 ` 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=516BF56A.5010401@stericsson.com \
--to=bengt.g.jonsson@stericsson.com \
--cc=axel.lin@ingics.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yvan.fillion@stericsson.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