From: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Rob Landley <rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>,
Sangbeom Kim <sbkim73-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Sachin Kamat
<sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Thomas Abraham
<thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Amit Daniel Kachhap
<amit.daniel-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Kyungmin Park
<kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Marek Szyprowski
<m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
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-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
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: 23+ 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
[not found] ` <1387286601-21646-1-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-17 13:23 ` [PATCH 2/5] regulator: s5m8767: Do not use sec_reg* regmap helpers Krzysztof Kozlowski
2013-12-17 13:23 ` Krzysztof Kozlowski
2013-12-17 15:03 ` Lee Jones
[not found] ` <1387286601-21646-3-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-18 13:28 ` Mark Brown
2013-12-18 13:28 ` Mark Brown
2013-12-17 13:23 ` [PATCH 5/5] regulator: s5m8767: Document new bindings for Buck9 GPIO control Krzysztof Kozlowski
2013-12-17 13:23 ` Krzysztof Kozlowski
2013-12-17 13:23 ` [PATCH 3/5] mfd: sec: Remove sec_reg* regmap helpers 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
[not found] ` <20131218134720.GU28455-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-12-18 14:57 ` Krzysztof Kozlowski [this message]
2013-12-18 14:57 ` 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-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
--cc=amit.daniel-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=sbkim73-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.