lkml.org 
[lkml]   [2022]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH PoC 0/3] ACPI/PNP/HISI_LPC: Refactor ACPI platform code for reuse
Date
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

\
 
 \ /
  Last update: 2022-08-16 13:57    [W:0.092 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site