From: Hans de Goede <hdegoede@redhat.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Andy Shevchenko" <andy@kernel.org>,
"AceLan Kao" <acelan.kao@canonical.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Roman Bogoyev <roman@computercheck.com.au>,
Kai Heng Feng <kai.heng.feng@canonical.com>,
platform-driver-x86@vger.kernel.org
Subject: [PATCH v3 0/2] platform/x86: Add new Dell UART backlight driver
Date: Mon, 13 May 2024 16:46:00 +0200 [thread overview]
Message-ID: <20240513144603.93874-1-hdegoede@redhat.com> (raw)
Hi All,
I recently learned that some Dell AIOs (1) use a backlight controller board
connected to an UART. Canonical even submitted a driver for this in 2017:
https://lkml.org/lkml/2017/10/26/78
This UART has a DELL0501 HID with CID set to PNP0501 so that the UART is
still handled by 8250_pnp.c. Unfortunately there is no separate ACPI device
with an UartSerialBusV2() resource to model the backlight-controller. An
ACPI quirk has been merged recently to deal with this and create a serdev
controller for the UART despite the missing UartSerialBusV2() resource:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=99b572e6136eab69a8c91d72cf8595b256e304b5
Patch 1 in this series adds a driver binding to the "dell-uart-backlight"
device created by this quirk. This drivers creates a serdev-device for
the DELL0501 serdev-controller and registers a serdev backlight driver
which binds to this serdev-device.
Patch 2 contains a small emulator for the UART attached backlight
controller found on this Dell AOIs, I wrote and used this to develop
the driver since I did not have access to such an AOI myself.
This has been successfully tested by Roman Bogoyev (who originally
reported the missing driver to me by email) on a Dell Inspiron 27 7000
(7790) and by Kai-Heng Feng on a newer Dell AOI model.
Changes in v3:
- Rework dell_uart_bl_receive() loop (based on suggestions from Ilpo)
- Address some more review remarks from Andy
Changes in v2:
- Address all the review-remarks Ilpo and Andy had on Patch 1/2,
thank you for the extensive review Ilpo and Andy
Regards,
Hans
Hans de Goede (2):
platform/x86: Add new Dell UART backlight driver
tools arch x86: Add dell-uart-backlight-emulator
drivers/platform/x86/dell/Kconfig | 15 +
drivers/platform/x86/dell/Makefile | 1 +
.../platform/x86/dell/dell-uart-backlight.c | 398 ++++++++++++++++++
.../dell-uart-backlight-emulator/.gitignore | 1 +
.../x86/dell-uart-backlight-emulator/Makefile | 19 +
.../x86/dell-uart-backlight-emulator/README | 46 ++
.../dell-uart-backlight-emulator.c | 163 +++++++
7 files changed, 643 insertions(+)
create mode 100644 drivers/platform/x86/dell/dell-uart-backlight.c
create mode 100644 tools/arch/x86/dell-uart-backlight-emulator/.gitignore
create mode 100644 tools/arch/x86/dell-uart-backlight-emulator/Makefile
create mode 100644 tools/arch/x86/dell-uart-backlight-emulator/README
create mode 100644 tools/arch/x86/dell-uart-backlight-emulator/dell-uart-backlight-emulator.c
--
2.44.0
next reply other threads:[~2024-05-13 14:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 14:46 Hans de Goede [this message]
2024-05-13 14:46 ` [PATCH v3 1/2] platform/x86: Add new Dell UART backlight driver Hans de Goede
2024-05-13 15:07 ` Ilpo Järvinen
2024-05-13 15:17 ` Hans de Goede
2024-05-13 14:46 ` [PATCH v3 2/2] tools arch x86: Add dell-uart-backlight-emulator Hans de Goede
2024-05-13 15:00 ` [PATCH v3 0/2] platform/x86: Add new Dell UART backlight driver Hans de Goede
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=20240513144603.93874-1-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=acelan.kao@canonical.com \
--cc=andy@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kai.heng.feng@canonical.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=roman@computercheck.com.au \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).