From: Alexey Charkov <alchark@flipper.net>
To: Sebastian Reichel <sre@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Alexey Charkov <alchark@flipper.net>
Subject: [PATCH 0/3] power: supply: battery: Allow separate charging limits vs. discharging
Date: Mon, 09 Nov 2026 13:41:47 +0400 [thread overview]
Message-ID: <20261109-battery-charge-temp-range-v1-0-a967abd8b80c@flipper.net> (raw)
Some batteries specify different operating temperature ranges when
charging vs. when discharging, e.g. charge at 0C to 45C, but discharge
at up to -20C to 60C. Current DT bindings and power supply core don't
allow that, so extend them with additional properties so that a separate
limit could be programmed for when a charger should cut voltage going into
the battery vs. when the system itself should shut down.
Additionally, allow the DT to specify voltage/current limits to be applied
when the battery is being charged in the "alert" band (either high or low
temperature, which often requires derating especially at the low end).
Signed-off-by: Alexey Charkov <alchark@flipper.net>
---
Alexey Charkov (3):
dt-bindings: power: supply: battery: Add a charging temperature range
power: supply: core: Read the charging temperature range and alert settings
power: supply: samsung-sdi-battery: Set the charging temperature range
.../devicetree/bindings/power/supply/battery.yaml | 45 +++++++++++++++++++++-
drivers/power/supply/power_supply_core.c | 16 ++++++++
drivers/power/supply/samsung-sdi-battery.c | 12 ++++++
include/linux/power_supply.h | 16 ++++++--
4 files changed, 83 insertions(+), 6 deletions(-)
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
change-id: 20261109-battery-charge-temp-range-37fc54d4e3a3
Best regards,
--
Alexey Charkov <alchark@flipper.net>
next reply other threads:[~2026-11-09 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 9:41 Alexey Charkov [this message]
2026-11-09 9:41 ` [PATCH 1/3] dt-bindings: power: supply: battery: Add a charging temperature range Alexey Charkov
2026-11-19 22:58 ` Rob Herring
2026-11-09 9:41 ` [PATCH 2/3] power: supply: core: Read the charging temperature range and alert settings Alexey Charkov
2026-11-09 9:41 ` [PATCH 3/3] power: supply: samsung-sdi-battery: Set the charging temperature range Alexey Charkov
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=20261109-battery-charge-temp-range-v1-0-a967abd8b80c@flipper.net \
--to=alchark@flipper.net \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=robh@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®