mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Samuel Wheeler via B4 Relay <devnull+swheel33.gmail.com@kernel.org>
To: "Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org,  Shang En Sim <sim@shangen.org>,
	Samuel Wheeler <swheel33@gmail.com>
Subject: [PATCH 2/2] platform/x86: hp-wmi: Add charge_behaviour quirk for OmniBook Ultra 14
Date: Wed, 11 Nov 2026 21:54:27 -0500	[thread overview]
Message-ID: <20261111-omnibook-8eb4-v1-2-3127f45cc338@gmail.com> (raw)
In-Reply-To: <20261111-omnibook-8eb4-v1-0-3127f45cc338@gmail.com>

From: Samuel Wheeler <swheel33@gmail.com>

The HP OmniBook Ultra Laptop 14-kd0xxx (board 8EB4) implements the same
battery charge mode interface as the Spectre x360 boards supported since
commit 929433336e0a ("platform/x86: hp-wmi: add charge_behaviour support
for Spectre 8C15/8C17").

Reading HPWMI_BATTERY_CHARGE_MODE returns the mode in byte 0
(00 ff 01 ff with automatic charging). The write handler (SBCC in the
SSDT that defines \_SB.WMID) takes the mode from byte 1, accepts values
0-7 and passes it to EC command 0xbb. That matches the layout the driver
already uses.

Add the board to hp_wmi_charge_control_quirks.

Tested on the OmniBook Ultra 14-kd0xxx (BIOS F.06) with AC connected:
writing inhibit-charge to charge_behaviour changes the battery status to
"Not charging" with zero current, and writing auto resumes charging.
force-discharge was not tested.

This patch was prepared with an AI coding assistant (Claude, by
Anthropic). It read the firmware's WMI methods, wrote the change and this
description, and ran the tests on my laptop under my direction. I
reviewed the change and the test results.

Signed-off-by: Samuel Wheeler <swheel33@gmail.com>
---
 drivers/platform/x86/hp/hp-wmi.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 46c9a5a532ba..bf68a1c46c03 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -634,6 +634,13 @@ static const struct dmi_system_id hp_wmi_charge_control_quirks[] __initconst = {
 			DMI_MATCH(DMI_BOARD_NAME, "8C15"),
 		},
 	},
+	{
+		/* HP OmniBook Ultra Laptop 14-kd0xxx */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+			DMI_MATCH(DMI_BOARD_NAME, "8EB4"),
+		},
+	},
 	{}
 };
 #endif

-- 
2.56.0



      parent reply	other threads:[~2026-11-12  2:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12  2:54 [PATCH 0/2] platform/x86: hp-wmi: HP OmniBook Ultra 14-kd0xxx (8EB4) fixes Samuel Wheeler via B4 Relay
2026-11-12  2:54 ` [PATCH 1/2] platform/x86: hp-wmi: Only use the low byte of the thermal profile Samuel Wheeler via B4 Relay
2026-11-12  2:54 ` Samuel Wheeler via B4 Relay [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=20261111-omnibook-8eb4-v1-2-3127f45cc338@gmail.com \
    --to=devnull+swheel33.gmail.com@kernel.org \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sim@shangen.org \
    --cc=swheel33@gmail.com \
    /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®