Re: [PATCH v2] mfd: Add ACPI support to Kontron PLD driver

From: Lee Jones
Date: Mon Sep 28 2020 - 10:47:27 EST


On Thu, 20 Aug 2020, Michael Brunner wrote:

> Recent Kontron COMe modules identify the PLD device using the hardware
> id KEM0001 in the ACPI table.
> This patch adds support for probing the device using the HID and also
> retrieving the resources.
>
> As this is not available for all products, the DMI based detection still
> needs to be around for older systems. It is executed if no matching ACPI
> HID is found during registering the platform driver or no specific
> device id is forced.
> If a device is detected using ACPI and no resource information is
> available, the default io resource is used.
>
> Forcing a device id with the force_device_id parameter and therefore
> manually generating a platform device takes precedence over ACPI during
> probing.
>
> v2: - Implemented code changes suggested by Lee Jones
> - Added comments explaining some critical code
> - Driver is no longer unregistered if probing is skipped during
> platform_driver_register and device is not found in DMI table
> - Set probe type to PROBE_FORCE_SYNCHRONOUS to make clear this is
> the expected behaviour for this code to work as expected
>
> Signed-off-by: Michael Brunner <michael.brunner@xxxxxxxxxxx>
> ---
> drivers/mfd/kempld-core.c | 115 ++++++++++++++++++++++++++++++++++++--
> 1 file changed, 109 insertions(+), 6 deletions(-)

Applied, thanks.

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog