Skip to content

hwmon: (acpi_power_meter) Bind the driver to a platform device

Rafael J. Wysocki linux-acpi linux-hwmon lkml 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3hwmon: (acpi_power_meter) Drop redundant checks from three functionsdrivers/hwmon/acpi_power_meter.c+2 -161 reply
2/3hwmon: (acpi_power_meter) Register ACPI notify handler directlydrivers/hwmon/acpi_power_meter.c+12 -21 reply
3/3hwmon: (acpi_power_meter) Convert ACPI driver to a platform onedrivers/hwmon/acpi_power_meter.c+37 -391 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/3] hwmon: (acpi_power_meter) Bind the driver to a platform device

Hi All,

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/[email protected]/

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 the hwmon acpi_power_meter driver.

Patch [1/3] removes some redundant checks from three functions in the driver to facilitate subsequent changes.

Patch [2/3] updates the driver to install an ACPI notify handler by itself instead of using the .notify() callback from struct acpi_driver, which is requisite for the driver conversion.

Patch [3/3] converts the driver to using struct platform_driver for device binding.

@Jaroslaw, testing this on your systems where the acpi_power_meter driver is used would be much appreciated.

Thanks!