From: Greg KH <gregkh@linuxfoundation.org>
To: "jianing.li" <m13940358460@163.com>
Cc: Sebastian Reichel <sre@kernel.org>,
Iskren Chernev <me@iskren.info>,
Krzysztof Kozlowski <krzk@kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Matheus Castello <matheus@castello.eng.br>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] power: supply: max17040: handle missing status supplier
Date: Wed, 1 Jul 2026 07:43:35 +0200 [thread overview]
Message-ID: <2026070115-equate-shimmy-5f19@gregkh> (raw)
In-Reply-To: <20260701012101.782-1-m13940358460@163.com>
On Wed, Jul 01, 2026 at 09:21:01AM +0800, jianing.li wrote:
> MAX17040 does not report charger state itself, so the driver forwards
> POWER_SUPPLY_PROP_STATUS to a supplier power supply. If no supplier is
> registered, power_supply_get_property_from_supplier() returns -ENODEV and
> leaves the output value untouched.
>
> max17040_get_property() currently ignores that error and returns success,
> so userspace can read an uninitialized status value from the battery power
> supply. This happens on systems that use the fuel gauge without a charger
> supplier relationship in firmware.
>
> Return POWER_SUPPLY_STATUS_UNKNOWN when no supplier provides STATUS, and
> propagate other supplier lookup errors.
>
> Fixes: f4b782af61ae ("power: max17040: pass status property from supplier")
> Cc: stable@vger.kernel.org # 6.7+
> Signed-off-by: jianing.li <m13940358460@163.com>
Please use your name, not an email alias.
And why send this 3 times?
thanks,
greg k-h
next prev parent reply other threads:[~2026-07-01 5:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 1:21 [PATCH] power: supply: max17040: handle missing status supplier jianing.li
2026-07-01 5:43 ` Greg KH [this message]
2026-07-01 6:10 ` [PATCH v2] " Jianing Li
2026-07-19 5:55 ` Jianing Li
2026-07-20 22:32 ` Sebastian Reichel
2026-07-01 6:52 ` [PATCH] " Jianing Li
-- strict thread matches above, loose matches on Subject: below --
2026-07-01 1:20 jianing.li
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=2026070115-equate-shimmy-5f19@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=m13940358460@163.com \
--cc=matheus@castello.eng.br \
--cc=me@iskren.info \
--cc=sre@kernel.org \
--cc=stable@vger.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.