From: Sebastian Reichel <sre@kernel.org>
To: Wenyou Yang <wenyou.yang@atmel.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Brown <broonie@kernel.org>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Lee Jones <lee.jones@linaro.org>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v8 08/11] power: act8945a_charger: Add max current property
Date: Wed, 31 Aug 2016 16:58:02 +0200 [thread overview]
Message-ID: <20160831145802.hmbnddaaif6y522t@earth> (raw)
In-Reply-To: <1472109599-21915-9-git-send-email-wenyou.yang@atmel.com>
[-- Attachment #1: Type: text/plain, Size: 869 bytes --]
Hi,
On Thu, Aug 25, 2016 at 03:19:56PM +0800, Wenyou Yang wrote:
> Add the power supply's current max property,
> POWER_SUPPLY_PROP_CURRENT_MAX.
[...]
> - chglev_pin = of_get_named_gpio_flags(np,
> - "active-semi,chglev-gpios", 0, &flags);
> -
> - if (gpio_is_valid(chglev_pin)) {
> - gpio_set_value(chglev_pin,
> - ((flags == OF_GPIO_ACTIVE_LOW) ? 0 : 1));
> + charger->chglev_gpio = devm_gpiod_get(dev,
> + "active-semi,chglev", GPIOD_IN);
> + if (PTR_ERR(charger->chglev_gpio) == -EPROBE_DEFER) {
> + dev_info(dev, "probe retry requested for gpio \"chglev\"\n");
> + return -EPROBE_DEFER;
> + } else if (IS_ERR(charger->chglev_gpio)) {
> + dev_err(dev, "unable to claim gpio \"chglev\"\n");
> + charger->chglev_gpio = NULL;
Please also use devm_gpiod_get_optional() here (see previous patch).
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-08-31 14:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 7:19 [PATCH v8 00/11] power: act8945a_charger: Improvements Wenyou Yang
[not found] ` <1472109599-21915-1-git-send-email-wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-08-25 7:19 ` [PATCH v8 01/11] mfd: act8945a: Add .of_compatible for act8945a-charger Wenyou Yang
[not found] ` <1472109599-21915-2-git-send-email-wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-08-31 12:28 ` Lee Jones
2016-08-25 7:19 ` [PATCH v8 02/11] power: act8945a_charger: Achieve properties from its node Wenyou Yang
2016-08-31 14:44 ` Sebastian Reichel
2016-08-25 7:19 ` [PATCH v8 07/11] power: act8945a_charger: Add capacity level property Wenyou Yang
2016-08-31 14:56 ` Sebastian Reichel
2016-08-25 7:19 ` [PATCH v8 08/11] power: act8945a_charger: Add max current property Wenyou Yang
2016-08-31 14:58 ` Sebastian Reichel [this message]
2016-08-25 7:38 ` [PATCH v8 09/11] doc: bindings: mfd: act8945a: Update the example Wenyou Yang
[not found] ` <1472110715-22242-1-git-send-email-wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-08-30 19:52 ` Rob Herring
2016-08-31 14:50 ` Sebastian Reichel
2016-08-25 7:19 ` [PATCH v8 03/11] power: act8945a_charger: Remove "battery_temperature" Wenyou Yang
2016-08-31 14:45 ` Sebastian Reichel
2016-08-25 7:19 ` [PATCH v8 04/11] power: act8945a_charger: Improve Wenyou Yang
[not found] ` <1472109599-21915-5-git-send-email-wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-08-31 14:45 ` Sebastian Reichel
2016-08-25 7:19 ` [PATCH v8 05/11] power: act8945a_charger: Add status change update support Wenyou Yang
2016-08-31 14:45 ` Sebastian Reichel
2016-08-25 7:19 ` [PATCH v8 06/11] power: act8945a_charger: Fix the power supply type Wenyou Yang
2016-08-31 14:47 ` Sebastian Reichel
2016-08-25 7:40 ` [PATCH v8 10/11] doc: bindings: power: act8945a-charger: Update properties Wenyou Yang
2016-08-31 14:48 ` Sebastian Reichel
2016-08-25 7:45 ` [PATCH v8 11/11] ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node Wenyou Yang
2016-08-25 8:59 ` [PATCH v8 00/11] power: act8945a_charger: Improvements 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=20160831145802.hmbnddaaif6y522t@earth \
--to=sre@kernel.org \
--cc=alexandre.belloni@free-electrons.com \
--cc=broonie@kernel.org \
--cc=dbaryshkov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=wenyou.yang@atmel.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).