mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Kocialkowski <contact@paulk.fr>
To: Sebastian Reichel <sre@kernel.org>
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, 05 Sep 2016 14:22:48 +0200	[thread overview]
Message-ID: <1473078168.1041.2.camel@paulk.fr> (raw)
In-Reply-To: <20160905110846.5ersy47jbozzgldj@earth>

[-- Attachment #1: Type: text/plain, Size: 1821 bytes --]

Hi,

Le lundi 05 septembre 2016 à 13:08 +0200, Sebastian Reichel a écrit :
> 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.

Damn, I forgot to clean that up. Good spotting, thanks!

-- 
Paul Kocialkowski, developer of low-level free software for embedded devices

Website: https://www.paulk.fr/
Coding blog: https://code.paulk.fr/
Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

      reply	other threads:[~2016-09-05 12:23 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
2016-09-05 12:22   ` Paul Kocialkowski [this message]

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=1473078168.1041.2.camel@paulk.fr \
    --to=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 \
    --cc=sre@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

Powered by JetHome