From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932625AbcIELIx (ORCPT ); Mon, 5 Sep 2016 07:08:53 -0400 Received: from mail.kernel.org ([198.145.29.136]:41848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754913AbcIELIw (ORCPT ); Mon, 5 Sep 2016 07:08:52 -0400 Date: Mon, 5 Sep 2016 13:08:46 +0200 From: Sebastian Reichel To: Paul Kocialkowski Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, Dmitry Eremin-Solenikov , David Woodhouse Subject: Re: [PATCH v4] power: bq24735-charger: Request status GPIO with initial input setup Message-ID: <20160905110846.5ersy47jbozzgldj@earth> References: <20160902220953.28995-1-contact@paulk.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="u55bblpouhgzelxf" Content-Disposition: inline In-Reply-To: <20160902220953.28995-1-contact@paulk.fr> User-Agent: NeoMutt/ (1.7.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --u55bblpouhgzelxf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > While at it, this switches the driver over to gpio consumer. >=20 > Signed-off-by: Paul Kocialkowski > --- > drivers/power/supply/bq24735-charger.c | 44 +++++++++++++---------------= ------ > include/linux/power/bq24735-charger.h | 4 ---- > 2 files changed, 16 insertions(+), 32 deletions(-) >=20 > diff --git a/drivers/power/supply/bq24735-charger.c b/drivers/power/suppl= y/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 =3D 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 --u55bblpouhgzelxf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJXzVI7AAoJENju1/PIO/qa7jQQAKPciYuk/TaKAtpENn0/8dID QQpVWELmz1HpwdYvTXKXGjQbZgDp403oeK6ibki0Je4bq6tyMo2kvj49iMpCDVWw FQbxw1b5p4iKvgR0B1RYNjLPRzO4BOaMsjLZnbBXQvVRxs6rofil1NnFGEbDBRxh qJVH+EbKiKaoMMY3kWTZwjvZS6aAQp2bRMrzgJcPvfk2cxNP7nUXM7mHaE06V+0f 3tYux9bNUwdxkq7613kJc2FL9Vyg861kUH3J4MlkguJH/RoKdmVSBvolMGdpQNLn 5p2yc3uUIxGCxmfXZW8Oj9eGXpMWqT6BN9fJwTUEh7PipoEYr0k6/FEOTD2+rMc8 7wQnMgUqQwV9xS2FUSTiupPjQrkrKAJLtLTzuHTs8EkTQiVFse1MgoiFAH1uqFhK lPpiZ0p2uOe/F/JAtGOt0+qvCKrlSpg+p/8afyWt8qLwImWhg+cEwvskIsxiKoy6 UlE2F/ntJ1OnGgJRL/3lBBpVlIWb87tKGzCXuOifM12D4CcP3+mjiHMPB6BccfWu HsAQwQ/dZj9qWBpnQrPQAN8n+2p4XF61mgNgky4R2Bq0pgqdyals2wtJzFVLzZQr DP8COkx7d0G3fBSRlR1JLxnI4/EfgRDqHjyo841YGn+uxv3VYBjvah6Qc5CfQA5e bjwir2ZROgJSG/5adhnE =xdIL -----END PGP SIGNATURE----- --u55bblpouhgzelxf--