From: sashiko-bot@kernel.org
To: "Jordan Brough" <jordan@brough.org>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v2 1/2] ACPI: battery: add unified battery hook mechanism for ACPI and SBS batteries
Date: Fri, 18 Sep 2026 17:59:24 +0000 [thread overview]
Message-ID: <20260918175925.43C271F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260918175052.85461-2-jordan@brough.org>
> drivers/acpi/battery.c provides a battery_hook_register()/unregister()
> mechanism that lets other drivers (e.g. platform and hwmon drivers
> exposing vendor-specific charge control) attach extra power_supply
> properties to an ACPI Control Method Battery (HID PNP0C0A).
>
> Some machines instead expose their battery through the ACPI Smart
> Battery System (HID ACPI0002, "SBS") driver in drivers/acpi/sbs.c,
> which has had no equivalent hook point.
>
> Extract the battery hooking implementation out of drivers/acpi/battery.c
> into a shared helper in drivers/acpi/battery_hook.c, built directly into
> the ACPI core (acpi.o). Both drivers/acpi/battery.c and drivers/acpi/sbs.c
> now register their power_supply devices with this shared hook
> infrastructure via battery_hook_add_battery() and
> battery_hook_remove_battery().
>
> This unifies the hooking interface across both battery drivers so
> callers only need to register a single struct acpi_battery_hook without
> needing to know or care whether the underlying hardware exposes a Control
> Method Battery or an SBS battery.
>
> Suggested-by: Thomas Weißschuh <linux@weissschuh.net>
> Signed-off-by: Jordan Brough <jordan@brough.org>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260918175052.85461-1-jordan@brough.org?part=1
next prev parent reply other threads:[~2026-09-18 17:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 17:50 [PATCH v2 0/2] hwmon: (applesmc) add charge_control_end_threshold support Jordan Brough
2026-09-18 17:50 ` [PATCH v2 1/2] ACPI: battery: add unified battery hook mechanism for ACPI and SBS batteries Jordan Brough
2026-09-18 17:59 ` sashiko-bot [this message]
2026-09-22 13:07 ` Rafael J. Wysocki (Intel)
2026-09-18 17:50 ` [PATCH v2 2/2] hwmon: (applesmc) add charge_control_end_threshold support Jordan Brough
2026-09-18 18:01 ` sashiko-bot
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=20260918175925.43C271F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=jordan@brough.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.