From: Paul Kocialkowski <contact@paulk.fr>
To: linux-kernel@vger.kernel.org
Cc: "Rob Herring" <robh+dt@kernel.org>,
"Pawel Moll" <pawel.moll@arm.com>,
"Mark Rutland" <mark.rutland@arm.com>,
"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
"Kumar Gala" <galak@codeaurora.org>,
"Russell King" <linux@arm.linux.org.uk>,
"Benoît Cousson" <bcousson@baylibre.com>,
"Tony Lindgren" <tony@atomide.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>, "Milo Kim" <milo.kim@ti.com>,
"Javier Martinez Canillas" <javier@dowhile0.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-omap@vger.kernel.org,
"Paul Kocialkowski" <contact@paulk.fr>
Subject: [PATCH v2 1/4] regulator: lp872x: Remove warning about invalid DVS GPIO
Date: Fri, 5 Feb 2016 19:42:18 +0100 [thread overview]
Message-ID: <1454697741-8687-2-git-send-email-contact@paulk.fr> (raw)
In-Reply-To: <1454697741-8687-1-git-send-email-contact@paulk.fr>
Some devices don't hook the DVS pin to a GPIO but to ground or VCC.
In those cases, it is not a problem to have no DVS GPIO provided, as the current
code will already switch to software-only DVS selection:
When the DVS GPIO is invalid, lp872x_init_dvs jumps to the set_default_dvs_mode
label, which instructs the chip not to use the DVS pin at all and do it all in
software instead (by clearing the LP8720_EXT_DVS_M bit in the
LP872X_GENERAL_CFG register).
That is reflected later in the code, when setting the bucks (the DVS pin only
applies to the bucks) by checking for the LP8720_EXT_DVS_M bit on the
LP872X_GENERAL_CFG register (in lp872x_select_buck_vout_addr) to decide whether
to use software or hardware DVS selection.
Thus, there is no need to print a warning when the DVS GPIO is invalid.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
drivers/regulator/lp872x.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c
index 19d7584..21c49d8 100644
--- a/drivers/regulator/lp872x.c
+++ b/drivers/regulator/lp872x.c
@@ -738,10 +738,8 @@ static int lp872x_init_dvs(struct lp872x *lp)
goto set_default_dvs_mode;
gpio = dvs->gpio;
- if (!gpio_is_valid(gpio)) {
- dev_warn(lp->dev, "invalid gpio: %d\n", gpio);
+ if (!gpio_is_valid(gpio))
goto set_default_dvs_mode;
- }
pinstate = dvs->init_state;
ret = devm_gpio_request_one(lp->dev, gpio, pinstate, "LP872X DVS");
--
1.9.1
next prev parent reply other threads:[~2016-02-05 18:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 18:42 [PATCH v2 0/6] LG Optimus Black (P970) codename sniper support and lp872x improvements Paul Kocialkowski
2016-02-05 18:42 ` Paul Kocialkowski [this message]
2016-02-12 0:14 ` [PATCH v2 1/4] regulator: lp872x: Remove warning about invalid DVS GPIO Kim, Milo
2016-02-05 18:42 ` [PATCH v2 2/4] regulator: lp872x: Add enable GPIO pin support Paul Kocialkowski
[not found] ` <1454697741-8687-3-git-send-email-contact-W9ppeneeCTY@public.gmane.org>
2016-02-08 19:50 ` Rob Herring
2016-02-12 0:14 ` Kim, Milo
[not found] ` <56BD23ED.8010207-l0cyMroinI0@public.gmane.org>
2016-02-12 18:25 ` Paul Kocialkowski
2016-02-14 23:31 ` Kim, Milo
2016-02-14 23:37 ` Kim, Milo
2016-02-05 18:42 ` [PATCH v2 3/4] ARM: LG Optimus Black (P970) codename sniper support, with basic features Paul Kocialkowski
[not found] ` <1454697741-8687-4-git-send-email-contact-W9ppeneeCTY@public.gmane.org>
2016-02-05 19:39 ` Paul Kocialkowski
2016-02-07 15:23 ` Paul Kocialkowski
2016-02-05 18:42 ` [PATCH v2 4/4] ARM: multi_v7_defconfig: Enable LP872x regulator support Paul Kocialkowski
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=1454697741-8687-2-git-send-email-contact@paulk.fr \
--to=contact@paulk.fr \
--cc=bcousson@baylibre.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=javier@dowhile0.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=milo.kim@ti.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=tony@atomide.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).