From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Mark Brown <broonie@kernel.org>
Cc: Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>, Rob Landley <rob@landley.net>,
Sangbeom Kim <sbkim73@samsung.com>,
Samuel Ortiz <sameo@linux.intel.com>,
Lee Jones <lee.jones@linaro.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Grant Likely <grant.likely@linaro.org>,
Sachin Kamat <sachin.kamat@linaro.org>,
Thomas Abraham <thomas.abraham@linaro.org>,
Amit Daniel Kachhap <amit.daniel@samsung.com>,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH 4/5] regulator: s5m8767: Use GPIO for controlling Buck9/eMMC
Date: Wed, 18 Dec 2013 15:57:12 +0100 [thread overview]
Message-ID: <1387378632.1433.4.camel@AMDC1943> (raw)
In-Reply-To: <20131218134720.GU28455@sirena.org.uk>
On Wed, 2013-12-18 at 13:47 +0000, Mark Brown wrote:
> On Tue, Dec 17, 2013 at 02:23:20PM +0100, Krzysztof Kozlowski wrote:
>
> > +static int s5m8767_reg_gpio_is_enabled(struct regulator_dev *rdev)
> > +{
> > + struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev);
> > + int val;
> > +
> > + if (!s5m8767->buck9_uses_gpio)
> > + return s5m8767_reg_is_enabled(rdev);
> > +
> > + val = gpio_get_value(s5m8767->buck9_gpio);
> > +
> > + return val == 1;
> > +}
>
> Don't open code this, use the core GPIO handling - see ena_gpio.
OK, I'll rewrite the patch.
Best regards,
Krzysztof
next prev parent reply other threads:[~2013-12-18 14:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 13:23 [PATCH 0/5] mfd/regulator: s5m: Various fixes and GPIO control over Buck9 Krzysztof Kozlowski
2013-12-17 13:23 ` [PATCH 1/5] regulator: s5m8767: Add symbols for hard-coded DVS_RAMP register Krzysztof Kozlowski
2013-12-17 13:51 ` Lee Jones
2013-12-17 14:06 ` Krzysztof Kozlowski
2013-12-17 14:58 ` Lee Jones
2013-12-18 13:27 ` Mark Brown
2013-12-18 13:28 ` Mark Brown
2013-12-17 13:23 ` [PATCH 2/5] regulator: s5m8767: Do not use sec_reg* regmap helpers Krzysztof Kozlowski
2013-12-17 15:03 ` Lee Jones
2013-12-18 13:28 ` Mark Brown
2013-12-17 13:23 ` [PATCH 3/5] mfd: sec: Remove " Krzysztof Kozlowski
2013-12-18 13:36 ` Mark Brown
2013-12-18 14:03 ` Krzysztof Kozlowski
2013-12-18 17:25 ` Mark Brown
2013-12-17 13:23 ` [PATCH 4/5] regulator: s5m8767: Use GPIO for controlling Buck9/eMMC Krzysztof Kozlowski
2013-12-17 13:49 ` Lee Jones
2013-12-18 13:47 ` Mark Brown
2013-12-18 14:57 ` Krzysztof Kozlowski [this message]
2013-12-17 13:23 ` [PATCH 5/5] regulator: s5m8767: Document new bindings for Buck9 GPIO control Krzysztof Kozlowski
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=1387378632.1433.4.camel@AMDC1943 \
--to=k.kozlowski@samsung.com \
--cc=amit.daniel@samsung.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kyungmin.park@samsung.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=sachin.kamat@linaro.org \
--cc=sameo@linux.intel.com \
--cc=sbkim73@samsung.com \
--cc=thomas.abraham@linaro.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