From: Waqar Hameed <waqar.hameed@axis.com>
To: Linmao Li <lilinmao@kylinos.cn>
Cc: Sebastian Reichel <sre@kernel.org>, <linux-pm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] power: supply: bq25630: Initialize hardware before exposing the power supply
Date: Wed, 29 Jul 2026 23:07:27 +0200 [thread overview]
Message-ID: <pnd4ihh33ow.a.out@axis.com> (raw)
In-Reply-To: <20260728024558.3611522-3-lilinmao@kylinos.cn> (Linmao Li's message of "Tue, 28 Jul 2026 10:45:58 +0800")
On Tue, Jul 28, 2026 at 10:45 +0800 Linmao Li <lilinmao@kylinos.cn> wrote:
> bq25630_setup() resets the device, disables the watchdog and programs
> the charge limits from the battery information. It runs at the end of
> bq25630_probe(), that is after the power supply has been registered, so
> the device is already exposed to the system while the hardware still
> holds its power-on defaults.
>
> power_supply_desc::init runs during registration, after the driver data
> and the fwnode are available and before the device is added. Use it for
> bq25630_setup() and drop the explicit call from bq25630_probe().
>
> The callback is passed the power supply, so take the driver data from it
> and use it for the battery information as well: data->psy is only
> assigned once devm_power_supply_register() returns, which is after the
> callback has run.
>
> Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
Looks good to me!
Reviewed-by: Waqar Hameed <waqar.hameed@axis.com>
[...]
prev parent reply other threads:[~2026-07-29 21:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 2:45 [PATCH v2 0/2] power: supply: bq25630: Improve hardware setup Linmao Li
2026-07-28 2:45 ` [PATCH v2 1/2] power: supply: bq25630: Scope battery information to bq25630_setup() Linmao Li
2026-07-29 21:07 ` Waqar Hameed
2026-07-28 2:45 ` [PATCH v2 2/2] power: supply: bq25630: Initialize hardware before exposing the power supply Linmao Li
2026-07-29 21:07 ` Waqar Hameed [this message]
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=pnd4ihh33ow.a.out@axis.com \
--to=waqar.hameed@axis.com \
--cc=lilinmao@kylinos.cn \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.