From: Maximilian Luz <luzmaximilian@gmail.com>
To: "Ramón Jesús Miranda" <ramonjesusmiranda@gmail.com>,
"Sebastian Reichel" <sre@kernel.org>
Cc: linux-pm@vger.kernel.org, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power: supply: surface_battery: handle battery event 0x1a
Date: Tue, 3 Nov 2026 08:21:23 +0100 [thread overview]
Message-ID: <cdf44987-3a3e-41f2-a067-8181aea08880@gmail.com> (raw)
In-Reply-To: <20261023173215.6233-1-ramonjesusmiranda@gmail.com>
Am 23.10.2026 um 19:32 schrieb Ramón Jesús Miranda:
> On the Microsoft Surface Pro 11 (Snapdragon X Elite / X1E80100), the
> Surface Aggregator Module (SAM) emits battery target category (0x02) event
> CID 0x1a alongside standard battery status notifications. Because CID 0x1a
> is currently unhandled in spwr_battery_event(), surface_battery logs:
>
> surface_battery: unhandled battery event (cid = 0x1a)
>
> Add SAM_EVENT_CID_BAT_0x1A (0x1a) and trigger a battery status recheck via
> spwr_battery_recheck_full(), matching the existing battery state events.
>
> Assisted-by: Antigravity:gemini-2.5-pro
> Signed-off-by: Ramón Jesús Miranda <ramonjesusmiranda@gmail.com>
> ---
> drivers/power/supply/surface_battery.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/power/supply/surface_battery.c b/drivers/power/supply/surface_battery.c
> index c759add..a3fa899 100644
> --- a/drivers/power/supply/surface_battery.c
> +++ b/drivers/power/supply/surface_battery.c
> @@ -26,6 +26,7 @@ enum sam_event_cid_bat {
> SAM_EVENT_CID_BAT_BST = 0x16,
> SAM_EVENT_CID_BAT_ADP = 0x17,
> SAM_EVENT_CID_BAT_PROT = 0x18,
> + SAM_EVENT_CID_BAT_0x1A = 0x1a,
I don't particularly like it being named 0x1A. Do we know what exactly
triggers this event?
Best,
Max
> SAM_EVENT_CID_BAT_DPTF = 0x53,
> };
>
> @@ -368,6 +369,7 @@ static u32 spwr_notify_bat(struct ssam_event_notifier *nf, const struct ssam_eve
> break;
>
> case SAM_EVENT_CID_BAT_PROT:
> + case SAM_EVENT_CID_BAT_0x1A:
> /*
> * TODO: Implement support for battery protection status change
> * event.
prev parent reply other threads:[~2026-11-03 7:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 17:32 Ramón Jesús Miranda
2026-11-03 7:21 ` Maximilian Luz [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=cdf44987-3a3e-41f2-a067-8181aea08880@gmail.com \
--to=luzmaximilian@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=ramonjesusmiranda@gmail.com \
--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®