From: Rosen Penev <rosenp@gmail.com>
To: "Matthew Garrett" <mjg59@srcf.ucam.org>,
"Pali Rohár" <pali@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Gabriele Mazzotta" <gabriele.mzt@gmail.com>,
"Darren Hart" <dvhart@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/3] platform/x86: dell-laptop: Fix keyboard backlight and charge threshold handling
Date: Fri, 20 Nov 2026 16:09:28 -0800 [thread overview]
Message-ID: <cover.1795219225.git.rosenp@gmail.com> (raw)
Three fixes for dell-laptop: keyboard backlight timeouts that overflow
during unit conversion were silently accepted, an unread keyboard state
was used at init when the SMBIOS call failed, and the charge end
threshold was parsed as unsigned into an int.
These patches were developed with the help of an AI coding assistant
(Claude Opus 5.5): it reviewed the drivers, found the issues and drafted
the fixes and changelogs. I reviewed every change and I am responsible
for them.
All patches build cleanly with W=1.
Tested on a Dell Precision M4800 running v7.2.15, using the equivalent
backports built as out-of-tree modules:
- writing 4424214d / 18989323d to stop_timeout set 4m / 2m before
patch 1 and is rejected with -EINVAL after it; 5m still works
(v1 of patch 1; v2 is compile-tested only)
- charge_control_end_threshold rejects -1 and 101, accepts 85
The kbd_get_state() failure path of patch 2 was not triggered.
Changes in v2:
- patch 1: convert to a u64 seconds value instead of failing
check_mul_overflow() on the int, so the unit selection below works
on the full value; retitled (review feedback)
- patch 2: don't fail kbd_init_info() when kbd_get_state() fails;
fall back to level 0 / off mode so the existing code picks sane
defaults (review feedback)
v1: https://lore.kernel.org/r/cover.1794633179.git.rosenp@gmail.com
Rosen Penev (3):
platform/x86: dell-laptop: Fix keyboard backlight timeout overflow
platform/x86: dell-laptop: Don't use an unread keyboard state at init
platform/x86: dell-laptop: Parse the charge end threshold as an int
drivers/platform/x86/dell/dell-laptop.c | 47 +++++++++++++++----------
1 file changed, 29 insertions(+), 18 deletions(-)
--
2.56.1
next reply other threads:[~2026-11-21 0:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 0:09 Rosen Penev [this message]
2026-11-21 0:09 ` [PATCH v2 1/3] platform/x86: dell-laptop: Fix keyboard backlight timeout overflow Rosen Penev
2026-11-21 0:09 ` [PATCH v2 2/3] platform/x86: dell-laptop: Don't use an unread keyboard state at init Rosen Penev
2026-11-21 0:09 ` [PATCH v2 3/3] platform/x86: dell-laptop: Parse the charge end threshold as an int Rosen Penev
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=cover.1795219225.git.rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=dvhart@linux.intel.com \
--cc=gabriele.mzt@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=pali@kernel.org \
--cc=platform-driver-x86@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 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®