From: Sebastian Reichel <sre@kernel.org>
To: Paul Kocialkowski <contact@paulk.fr>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-tegra@vger.kernel.org,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v4] power: bq24735-charger: Request status GPIO with initial input setup
Date: Mon, 5 Sep 2016 13:08:46 +0200 [thread overview]
Message-ID: <20160905110846.5ersy47jbozzgldj@earth> (raw)
In-Reply-To: <20160902220953.28995-1-contact@paulk.fr>
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]
Hi Paul,
On Sat, Sep 03, 2016 at 12:09:53AM +0200, Paul Kocialkowski wrote:
> This requests the status GPIO with initial input setup. it is required
> to read the GPIO status at probe time and thus correctly avoid sending
> i2c messages when AC is not plugged.
>
> When requesting the GPIO without initial input setup, it always reads 0
> which causes probe to fail as it assumes the charger is connected, sends
> i2c messages and fails.
>
> While at it, this switches the driver over to gpio consumer.
>
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> ---
> drivers/power/supply/bq24735-charger.c | 44 +++++++++++++---------------------
> include/linux/power/bq24735-charger.h | 4 ----
> 2 files changed, 16 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/power/supply/bq24735-charger.c b/drivers/power/supply/bq24735-charger.c
[...]
> - if (IS_ENABLED(CONFIG_OF) && !charger->pdata && client->dev.of_node)
> + if (IS_ENABLED(CONFIG_OF) && !charger->pdata && client->dev.of_node) {
> charger->pdata = bq24735_parse_dt_data(client);
> + if (IS_ERR(charger->pdata))
> + return PTR_ERR(charger->pdata);
> + }
I queued your patch into power-supply's for-next branch, but dropped
this change, which is from an earlier revision of this patch and no
longer needed. Thanks for your patch.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-09-05 11:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 22:09 Paul Kocialkowski
2016-09-05 11:08 ` Sebastian Reichel [this message]
2016-09-05 12:22 ` 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=20160905110846.5ersy47jbozzgldj@earth \
--to=sre@kernel.org \
--cc=contact@paulk.fr \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.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
all inboxes | Powered by JetHome®