Thread (87 messages) 87 messages, 9 authors, 2024-01-24

Re: [RFT PATCH 11/21] platform: x86: android-tablets: don't access GPIOLIB private members

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2023-09-11 21:56:39
Also in: linux-acpi, linux-gpio, linux-omap, linux-tegra, lkml, platform-driver-x86

On Sat, Sep 09, 2023 at 04:17:53PM +0200, Hans de Goede wrote:
On 9/6/23 16:27, Bartosz Golaszewski wrote:
quoted
On Wed, Sep 6, 2023 at 3:01 PM Hans de Goede [off-list ref] wrote:
...
quoted
This makes sense! Maybe we'd need a good-old board file setting up all
non-described devices using the driver model?
Right, this is pretty much exactly what the x86-android-tablets
code does. Except that it does it for a bunch of boards in a single
.ko / driver. There is a lot of commonality between these boards,
so this allows sharing most of the code.

The driver uses DMI matching, with the match's driver_data pointing
to a description of which devices to instantiate and then the shared
code takes care of instantiating those.

About 90% of the data / code is __init or __initdata so both
the code to instantiate the devices as well as the per board
data is free-ed after module_init() has run.
...which is nicely looked and isolated hack (or quirk if you prefer)
that I like! Thanks, Hans, for maintaining that!

-- 
With Best Regards,
Andy Shevchenko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help