Re: [PATCH 2/8] firmware: arm_scmi: Extend transport driver macro to support ACPI

Sudeep Holla
2025-10-21T09:07:11Z

On Mon, Oct 20, 2025 at 06:11:06PM +0100, Jonathan Cameron wrote:
> On Fri, 17 Oct 2025 14:23:45 +0100
> Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> > Extend the SCMI transport driver helper to also support ACPI-based
> > systems. Introduce an internal helper macro that accepts both OF and
> > ACPI match tables, and expose two wrappers:
> >
> > - DEFINE_SCMI_TRANSPORT_DRIVER(...) -> DT/OF wrapper (unchanged ABI)
> > - DEFINE_SCMI_ACPI_TRANSPORT_DRIVER(...) -> ACPI wrapper
> >
> > For ACPI, the generated platform_driver now sets .acpi_match_table via
> > ACPI_PTR() so that builds without CONFIG_ACPI remain safe (becomes NULL).
> In general it doesn't normally matter if ACPI_PTR() isn't used.
>
> What specifically is this preventing? If CONFIG_ACPI isn't set then we'll never
> use those paths anyway. Using ACPI_PTR() tends to need ifdef magic or
> __maybe_unused markings that are rarely worth the effort for these tiny
> tables.
>

You are right, my bad. I had assumed acpi_device_id is defined only when
CONFIG_ACPI=y which clearly is not the case. I will update the last patch
and this commit message accordingly.

--
Regards,
Sudeep