Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4433032pxb; Tue, 2 Nov 2021 09:38:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP9YL3NbHuffkwIKYx/F2YSqCc/7zQYeg4qERMMofveizmhNx94posvlpwdy1t2GxlCqOf X-Received: by 2002:a02:cd9e:: with SMTP id l30mr29151430jap.86.1635871092475; Tue, 02 Nov 2021 09:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635871092; cv=none; d=google.com; s=arc-20160816; b=axjP/gNtmCbdxWw1u7otq9+vdTAz0fql5UrzKA39XjNm00uyZpY86RKTVHt4AOEkTS mQz+9HaUt27ndpS7nepiaqhUNTD4TVnzTwq58ugAkuD3KkdNBG1C38wZmG9hbr5I/BUe 7AFlahSOWEM8QQIq0Yjrp/Kg/+Y01M7fvLZrW9B1YGtmOc6WKI4QWM99TdZEwFAmS6qz gOIYMvKqXf7UI5E7PYgi7i1bQwUTr4p3Ys+brqg3bPYylZ4h/ep9vkOmzuXonERVQs/W f6CU+GVojjOjw7fwE6mJ033TpGCvQ1+SvJ6PK4woyLMhWyp86UKrzeEF9aFiyuyhV8oo xQiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=xRHfxcfJ6RYoGRm8NJWU+4JhNAtxAfxSOfNHBu4ac/U=; b=xepcfpM9t5LbojANDhppUj2mWwFtnTUVDxODyWVPrhLFJcvdHKcoadV/1s7Zv7mbdY wDpaZtYlP8xM/ahfy55gPdUQCT6A878FYLR4kzfZnnvOtvjd23bZbFV+IXFQGIlVYKEY hs802ypnp9HZym+bc1um0/VR8YdcZgQkSIP9F4vl8p2gmKEP9PR0DPrKDy6bZ8xjD7lk b5BppWVOxqDJ7N4kvKxusF/1PsqePqxJzogygExQ8uEbZPMiyQ9fVA9WRESmQZzRTEvg QN6B5oHy/PyFPp5Zt0iUbs5RY738ArvyfQR3VBPmVGmli/U2QluL3JY0WZV0Pt8GIcnt QhxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si15094238ioa.98.2021.11.02.09.38.00; Tue, 02 Nov 2021 09:38:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235052AbhKBQjW (ORCPT + 99 others); Tue, 2 Nov 2021 12:39:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235152AbhKBQis (ORCPT ); Tue, 2 Nov 2021 12:38:48 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52A62C0432E3; Tue, 2 Nov 2021 09:35:36 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 2DD821F44BDC Received: by earth.universe (Postfix, from userid 1000) id 93D413C0F95; Tue, 2 Nov 2021 17:29:21 +0100 (CET) Date: Tue, 2 Nov 2021 17:29:21 +0100 From: Sebastian Reichel To: Hans de Goede Cc: Mark Gross , Andy Shevchenko , Wolfram Sang , MyungJoo Ham , Chanwoo Choi , Ard Biesheuvel , Yauhen Kharuzhy , Tsuchiya Yuto , platform-driver-x86@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org Subject: Re: [PATCH 04/13] power: supply: bq25890: Fix initial setting of the F_CONV_RATE field Message-ID: <20211102162921.zbjmsxiwudbfi4wp@earth.universe> References: <20211030182813.116672-1-hdegoede@redhat.com> <20211030182813.116672-5-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bawxk5exxgfk5hen" Content-Disposition: inline In-Reply-To: <20211030182813.116672-5-hdegoede@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --bawxk5exxgfk5hen Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sat, Oct 30, 2021 at 08:28:04PM +0200, Hans de Goede wrote: > The code doing the initial setting of the F_CONV_RATE field based > on the bq->state.online flag. In order for this to work properly, > this must be done after the initial bq25890_get_chip_state() call. >=20 > Signed-off-by: Hans de Goede > --- Thanks, queued. -- Sebastian > drivers/power/supply/bq25890_charger.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/suppl= y/bq25890_charger.c > index 491d36a3811a..99497fdc73da 100644 > --- a/drivers/power/supply/bq25890_charger.c > +++ b/drivers/power/supply/bq25890_charger.c > @@ -682,16 +682,16 @@ static int bq25890_hw_init(struct bq25890_device *b= q) > } > } > =20 > - /* Configure ADC for continuous conversions when charging */ > - ret =3D bq25890_field_write(bq, F_CONV_RATE, !!bq->state.online); > + ret =3D bq25890_get_chip_state(bq, &bq->state); > if (ret < 0) { > - dev_dbg(bq->dev, "Config ADC failed %d\n", ret); > + dev_dbg(bq->dev, "Get state failed %d\n", ret); > return ret; > } > =20 > - ret =3D bq25890_get_chip_state(bq, &bq->state); > + /* Configure ADC for continuous conversions when charging */ > + ret =3D bq25890_field_write(bq, F_CONV_RATE, !!bq->state.online); > if (ret < 0) { > - dev_dbg(bq->dev, "Get state failed %d\n", ret); > + dev_dbg(bq->dev, "Config ADC failed %d\n", ret); > return ret; > } > =20 > --=20 > 2.31.1 >=20 --bawxk5exxgfk5hen Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmGBZ2EACgkQ2O7X88g7 +pokgw/+NvQ9IHKN9jxUcazukK3dSubBs1v2lXGJmqCebI/s0K89oJMyEY68Qear rzIlg9aLlTnOL+RD+/xJDaJ1ziXwDE9CYMkzXfGgsj8eBXtYe8W/OC5KAKvDNd88 ONvOqGIbUG2lychMyqnNH3mpd4HttHmdjCWd7mXiCKlHjMEzMClLRI/Pk0g6Bn1L K5n1ve4BNyj0jqFN5EUyUzEeI7nAFmrSHUPks0pUHgpQ+ZbPc8AhzwfrOSYd3zoi dk4RMgjo51K/nuFb1oavE3qRcuNHwxe+D5DBHaddCG/Yh04RmpVgFVFOt4NcGmOi /fv+g9SPfbPI0kVoBPfvY4eHxOmxl0WJYCflna6gDRPM1B0o1O9viravg8fCQUn+ ok/HU3cRtn1JtAKQu2nclT9paiFXjUtUarmh399SrJhJJZSvQWN5fOsUcH7bFU0O 5/TYYtNcLc9HjjMa5rQGICH2Lq0w3nXdHcDVsfzdClgBhBo/T54nkX+8tqgoBn5I ePc2neStXv5X4akpmD9KQQcCPuMpPIiWOfFy7OITjBwqMR2lzxSuUswNQUFCmNmo EGqTcTmDLhw26JsdqDNc/d0w9jzvHyx7aZo4AQ0uXJaN42vmhsXbWFqlOH9ogIOw /NPoCK2umJOUI2gANoyRB6kDQWxP8vuzXdo6XGKbzz5wCkEiZi0= =VXeB -----END PGP SIGNATURE----- --bawxk5exxgfk5hen--