From: peter.ujfalusi@ti•com (Peter Ujfalusi)
To: linux-arm-kernel@lists•infradead.org
Subject: [RFC 7/7] MFD: TWL6040: Add regulator support for VIO, V2V1 supplies
Date: Thu, 02 Feb 2012 15:59:20 +0200 [thread overview]
Message-ID: <4F2A96B8.2030004@ti.com> (raw)
In-Reply-To: <20120202133207.GN7428@opensource.wolfsonmicro.com>
On 02/02/2012 03:32 PM, Mark Brown wrote:
> That's not a problem for using the bulk get - the array is part of the
> API so you can use regulator_bulk_get() and still look at individual
> supplies within the array later on when enabling and disabling them.
For some reason I have associated the use of regulator_bulk_get with the
use of regulator_bulk_enable/disable. It did not even crossed my mind
that I can still use regulator_enable on the individual regulators.
Will convert the regulator_get/put to bulk operations. It will make the
code a bit cleaner.
Thanks
>>>> + ret = regulator_enable(twl6040->vio);
>>>> + if (ret != 0) {
>>>> + dev_err(&client->dev, "Failed to enable VIO: %d\n", ret);
>>>> + goto power_err;
>>>> + }
>>>> + ret = regulator_enable(twl6040->v2v1);
>>>> + if (ret != 0) {
>>>> + dev_err(&client->dev, "Failed to enable V2V1: %d\n", ret);
>>>> + regulator_disable(twl6040->vio);
>
>> I disable the vio here, if the v2v1 enable fails.
>
> Oh, that's quite confusing when mixed in with the goto/unwind - it'd be
> clearer to have the extra lable to jump to.
I guess this is a matter of taste.
However I have found some inconsistent naming with the exit labels,
which I'm going to fix for the next series.
--
P?ter
next prev parent reply other threads:[~2012-02-02 13:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 12:16 [RFC 0/7] MFD: twl6040: Conversion to i2c driver Peter Ujfalusi
2012-02-02 12:16 ` [RFC 1/7] MFD: twl-core: Detach twl6040 from the pmic mfd driver Peter Ujfalusi
[not found] ` <1328185019-29575-5-git-send-email-peter.ujfalusi@ti.com>
2012-02-02 12:38 ` [RFC 4/7] OMAP: 4430sdp: Correct fixed regulator device ID Mark Brown
[not found] ` <1328185019-29575-6-git-send-email-peter.ujfalusi@ti.com>
2012-02-02 12:40 ` [RFC 5/7] OMAP: sdp4430: Add fixed regulator for twl6040 needs Mark Brown
2012-02-02 13:03 ` Peter Ujfalusi
[not found] ` <1328185019-29575-7-git-send-email-peter.ujfalusi@ti.com>
2012-02-02 12:41 ` [RFC 6/7] OMAP: omap4panda: " Mark Brown
[not found] ` <1328185019-29575-4-git-send-email-peter.ujfalusi@ti.com>
2012-02-02 12:42 ` [RFC 3/7] ASoC: twl6040: Remove dependency on twl4030 from Kconfig Mark Brown
[not found] ` <1328185019-29575-3-git-send-email-peter.ujfalusi@ti.com>
2012-02-02 12:48 ` [RFC 2/7] MFD: twl6040: Convert to i2c driver, and separate it from twl core Mark Brown
2012-02-02 13:01 ` Peter Ujfalusi
2012-02-02 13:27 ` Mark Brown
[not found] ` <1328185019-29575-8-git-send-email-peter.ujfalusi@ti.com>
2012-02-02 12:52 ` [RFC 7/7] MFD: TWL6040: Add regulator support for VIO, V2V1 supplies Mark Brown
2012-02-02 13:18 ` Peter Ujfalusi
2012-02-02 13:32 ` Mark Brown
2012-02-02 13:59 ` Peter Ujfalusi [this message]
2012-02-02 14:19 ` 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=4F2A96B8.2030004@ti.com \
--to=peter.ujfalusi@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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