From: John Garry <john.garry@huawei.com>
To: <lenb@kernel.org>, <rafael@kernel.org>, <andy.shevchenko@gmail.com>
Cc: <linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linuxarm@huawei.com>, John Garry <john.garry@huawei.com>
Subject: [PATCH PoC 0/3] ACPI/PNP/HISI_LPC: Refactor ACPI platform code for reuse
Date: Tue, 16 Aug 2022 19:27:21 +0800 [thread overview]
Message-ID: <1660649244-146842-1-git-send-email-john.garry@huawei.com> (raw)
This series attempts to refactor the ACPI platform device creation code
such that it may reused in the HiSilicon LPC driver. The topic was
recently discussed at the following:
https://lore.kernel.org/lkml/CAJZ5v0hkiOqhWyOcd2vjj-tcyHWB-cK=Dae-3sifhRfcbKWWGg@mail.gmail.com/
So first off I'll say that I am not advocating pursing the changes in this
series, but just wanted to share to show others how it would look.
Apart from requiring PNP driver changes, the API in
acpi_create_platform_device_ops() ain't pretty. And also the PNP change
means that the LPC uart changes from ttyS1 -> ttyS0, which would be a
nuisance for anyone still using a board which uses the LPC UART.
I have a separate change to show how the HiSilicon LPC driver would look
by using platform_device_register_full() instead, and it is a lot neater:
https://github.com/hisilicon/kernel-dev/commits/private-topic-lpc-6.0-platform-full
Anyway, the commit messages should describe anything else needed to be
known.
Please share any comments, thanks.
John Garry (3):
ACPI / PNP: Don't add enumeration_by_parent devices
ACPI: platform: Refactor acpi_create_platform_device()
bus: hisi_lpc: Use acpi_create_platform_device_ops()
drivers/acpi/acpi_platform.c | 37 ++++++--
drivers/bus/hisi_lpc.c | 165 +++++++++++++++--------------------
drivers/pnp/pnpacpi/core.c | 13 ++-
include/linux/acpi.h | 17 +++-
4 files changed, 122 insertions(+), 110 deletions(-)
--
2.35.3
next reply other threads:[~2022-08-16 11:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 11:27 John Garry [this message]
2022-08-16 11:27 ` [PATCH PoC 1/3] ACPI / PNP: Don't add enumeration_by_parent devices John Garry
2022-08-18 19:31 ` Andy Shevchenko
2022-08-19 8:05 ` John Garry
2022-08-19 9:59 ` Andy Shevchenko
2022-08-19 10:20 ` John Garry
2022-08-19 10:41 ` Andy Shevchenko
2022-08-16 11:27 ` [PATCH PoC 2/3] ACPI: platform: Refactor acpi_create_platform_device() John Garry
2022-08-18 19:41 ` Andy Shevchenko
2022-08-19 8:10 ` John Garry
2022-08-23 16:42 ` Rafael J. Wysocki
2022-09-01 10:52 ` John Garry
2022-08-16 11:27 ` [PATCH PoC 3/3] bus: hisi_lpc: Use acpi_create_platform_device_ops() John Garry
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=1660649244-146842-1-git-send-email-john.garry@huawei.com \
--to=john.garry@huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=rafael@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®