From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Mark Brown <broonie@kernel.org>
Cc: Doug Anderson <dianders@chromium.org>,
Chanwoo Choi <cw00.choi@samsung.com>,
Olof Johansson <olof@lixom.net>, Chris Zhong <zyw@rock-chips.com>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Abhilash Kesavan <kesavan.abhilash@gmail.com>,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 2/9] regulator: max77802: Add .{get,set}_mode callbacks
Date: Thu, 16 Oct 2014 12:24:35 +0200 [thread overview]
Message-ID: <543F9CE3.7040404@collabora.co.uk> (raw)
In-Reply-To: <20141016083653.GE724@sirena.org.uk>
Hello Mark,
Thanks a lot for your feedback.
On 10/16/2014 10:36 AM, Mark Brown wrote:
> On Wed, Oct 15, 2014 at 06:20:32PM +0200, Javier Martinez Canillas wrote:
>
>> +#define MAX77802_MODE(pval) ((pval == MAX77802_OPMODE_NORMAL) ? \
>> + REGULATOR_MODE_NORMAL : REGULATOR_MODE_STANDBY)
>> +
>
> Make this a static inline function if there's any need for it, this is
> both more legible and more helpful for the compiler.
>
Ok, will change that.
>> + switch (mode) {
>> + case REGULATOR_MODE_IDLE:
>> + case REGULATOR_MODE_STANDBY:
>> + val = MAX77802_OPMODE_LP; /* ON in Low Power Mode */
>> + break;
>
> You should never have multiple modes mapping onto a singel value - if
> the user sets a mode they should find that the device has that mode.
>
I see, thanks for the clarification. I think STANDBY better maps the device
Low Power Mode according the description in include/linux/regulator/consumer.h
so I'll just make IDLE invalid in v2.
Best regards,
Javier
next prev parent reply other threads:[~2014-10-16 10:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 16:20 [PATCH 0/9] Add max77802 regulator operating mode support Javier Martinez Canillas
[not found] ` <1413390039-19364-1-git-send-email-javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2014-10-15 16:20 ` [PATCH 1/9] regulator: max77802: Add .set_suspend_{enable,disable} callbacks Javier Martinez Canillas
2014-10-16 8:37 ` Mark Brown
2014-10-15 16:20 ` [PATCH 2/9] regulator: max77802: Add .{get,set}_mode callbacks Javier Martinez Canillas
2014-10-16 8:36 ` Mark Brown
2014-10-16 10:24 ` Javier Martinez Canillas [this message]
2014-10-15 16:20 ` [PATCH 3/9] regulator: max77802: Split regulator operations for BUCKs Javier Martinez Canillas
2014-10-16 8:38 ` Mark Brown
2014-10-15 16:20 ` [PATCH 4/9] regulator: max77802: Add set suspend mode for BUCKs and simplify code Javier Martinez Canillas
2014-10-15 16:20 ` [PATCH 5/9] regulator: max77802: Don't treat OFF as an operating mode Javier Martinez Canillas
2014-10-15 16:20 ` [PATCH 6/9] regulator: max77802: Add header for operating modes Javier Martinez Canillas
2014-10-15 16:20 ` [PATCH 7/9] regulator: max77802: Document regulator opmode DT properties Javier Martinez Canillas
2014-10-15 16:20 ` [PATCH 8/9] regulator: max77802: Parse regulator operating mode properties Javier Martinez Canillas
2014-10-15 16:20 ` [PATCH 9/9] ARM: dts: Configure regulators for suspend on exynos Peach boards Javier Martinez Canillas
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=543F9CE3.7040404@collabora.co.uk \
--to=javier.martinez@collabora.co.uk \
--cc=broonie@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=k.kozlowski@samsung.com \
--cc=kesavan.abhilash@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=olof@lixom.net \
--cc=zyw@rock-chips.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;
as well as URLs for NNTP newsgroup(s).