lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 05 Sep 2016 14:22:48 +0200
From:   Paul Kocialkowski <contact@...lk.fr>
To:     Sebastian Reichel <sre@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        linux-tegra@...r.kernel.org,
        Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
        David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH v4] power: bq24735-charger: Request status GPIO with
 initial input setup

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@...lk.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/
Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ