[PATCH v2 00/10] platform/x86: classmate-laptop: Bind to platform devices instead of ACPI ones

From: Rafael J. Wysocki

Date: Mon May 11 2026 - 16:18:02 EST


Hi All,

This is an update of

https://lore.kernel.org/linux-acpi/1956046.tdWV9SEqCh@rafael.j.wysocki/

sent mostly because I have realized that using devm_kzalloc() in the first
patch simplifies things going forward, but also it adds ACPI companion
checks against NULL at probe time that were missing previously.

This series is part of a larger effort to switch over all drivers using
the struct acpi_driver interface to the more common struct platform_driver
interface and eliminate the former. The background is explained in
Documentation/driver-api/acpi/acpi-drivers.rst and in the changelog of
the patch that introduced the above document:

https://lore.kernel.org/all/2396510.ElGaqSPkdT@rafael.j.wysocki/

The bottom line is that the kernel would be better off without struct
acpi_driver and so it is better to get rid of it.

This series carries out driver conversion of 5 subdrivers in the platform x86
classmate-laptop driver.

The first 5 patches in the series are preliminary.

Patch [01/10] converts two subdrivers in classmate-laptop to using
devm_kzalloc() for allocating memory which helps to avoid memory leaks
during driver removal.

Patch [02/10] modifies 2 subdrivers in classmate-laptop so that their probe
rollback code ordering is the same as the removal one.

Patches [03-04/10] change the type of the first argument in 2 helper functions
in classmate-laptop and rename them.

Patch [05/10] updates classmate-laptop subdrivers to install their own ACPI
notify handlers instead of using the .notify() callback in struct acpi_driver.

The remaining patches convert the classmate-laptop subdrivers to platform
drivers, one at a time.

Patch [06/10] converts the accel-v4 subdriver in classmate-laptop to using
struct platform_driver for device binding.

Patch [07/10] converts the accel subdriver in classmate-laptop to using
struct platform_driver for device binding.

Patch [08/10] converts the tablet subdriver in classmate-laptop to using
struct platform_driver for device binding.

Patch [09/10] converts the ipml subdriver in classmate-laptop to using
struct platform_driver for device binding.

Patch [10/10] converts the keys subdriver in classmate-laptop to using
struct platform_driver for device binding.

Thanks!