lkml.org 
[lkml]   [2021]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/13] power: supply: bq25890: Fix initial setting of the F_CONV_RATE field
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.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---

Thanks, queued.

-- Sebastian

> drivers/power/supply/bq25890_charger.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/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 *bq)
> }
> }
>
> - /* Configure ADC for continuous conversions when charging */
> - ret = bq25890_field_write(bq, F_CONV_RATE, !!bq->state.online);
> + ret = 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;
> }
>
> - ret = bq25890_get_chip_state(bq, &bq->state);
> + /* Configure ADC for continuous conversions when charging */
> + ret = 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;
> }
>
> --
> 2.31.1
>
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-11-02 17:37    [W:0.128 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site