From: Hans de Goede <hdegoede@redhat.com>
To: Yauhen Kharuzhy <jekhor@gmail.com>, Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] bq25890_charger: Enable continuous conversion for ADC at charging
Date: Sun, 7 Nov 2021 21:48:38 +0100 [thread overview]
Message-ID: <3414874a-3dd0-24b2-92be-f59392dba810@redhat.com> (raw)
In-Reply-To: <20211107202001.54579-4-jekhor@gmail.com>
Hi,
On 11/7/21 21:20, Yauhen Kharuzhy wrote:
> Instead of one shot run of ADC at beginning of charging, run continuous
> conversion to ensure that all charging-related values are monitored
> properly (input voltage, input current, themperature etc.).
>
> Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
Thank you for finding this! This explains why all the ADC returned
values like current_now where 0 when charging, I thought this was
just something which was only supported while not charging, heh.
As before, the patch subject prefix should be: "power: supply: bq25890: "
Otherwise the patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Sebastian, this really is a pure bug-fix patch, any chance you
can pick this up for a future 5.16-rc# pull-req ?
Regards,
Hans
> ---
> drivers/power/supply/bq25890_charger.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c
> index fb2f1578503c..26ac7cde8c02 100644
> --- a/drivers/power/supply/bq25890_charger.c
> +++ b/drivers/power/supply/bq25890_charger.c
> @@ -609,12 +609,12 @@ static irqreturn_t __bq25890_handle_irq(struct bq25890_device *bq)
>
> if (!new_state.online && bq->state.online) { /* power removed */
> /* disable ADC */
> - ret = bq25890_field_write(bq, F_CONV_START, 0);
> + ret = bq25890_field_write(bq, F_CONV_RATE, 0);
> if (ret < 0)
> goto error;
> } else if (new_state.online && !bq->state.online) { /* power inserted */
> /* enable ADC, to have control of charge current/voltage */
> - ret = bq25890_field_write(bq, F_CONV_START, 1);
> + ret = bq25890_field_write(bq, F_CONV_RATE, 1);
> if (ret < 0)
> goto error;
> }
>
next prev parent reply other threads:[~2021-11-07 20:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-07 20:19 [PATCH 1/4] bq25890_charger: Rename IILIM field to IINLIM Yauhen Kharuzhy
2021-11-07 20:19 ` [PATCH 2/4] bq25890: Add max input current limit property Yauhen Kharuzhy
2021-11-07 20:41 ` Hans de Goede
2021-11-07 21:08 ` Yauhen Kharuzhy
2021-11-07 22:05 ` Hans de Goede
2021-11-07 20:20 ` [PATCH 3/4] power supply bq25890-charger: Handle temperature faults Yauhen Kharuzhy
2021-11-07 20:46 ` Hans de Goede
2021-11-07 20:20 ` [PATCH 4/4] bq25890_charger: Enable continuous conversion for ADC at charging Yauhen Kharuzhy
2021-11-07 20:48 ` Hans de Goede [this message]
2021-11-15 15:23 ` Sebastian Reichel
2021-11-15 15:40 ` Hans de Goede
2021-11-07 20:29 ` [PATCH 1/4] bq25890_charger: Rename IILIM field to IINLIM Hans de Goede
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=3414874a-3dd0-24b2-92be-f59392dba810@redhat.com \
--to=hdegoede@redhat.com \
--cc=jekhor@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@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
all inboxes | Powered by JetHome®