Re: [PATCH 2/3] pinctrl: mediatek: Add acpi support

Linus Walleij
2025-11-26T09:10:33Z

On Tue, Nov 25, 2025 at 3:36 AM Lei Xue <lei.xue@mediatek.com> wrote:

> Add acpi support in the common part of pinctrl driver. Parsing
> hardware base addresses and irq number to initialize eint
> accroding to the acpi table data.
>
> Signed-off-by: Lei Xue <lei.xue@mediatek.com>

I'd ideally like Andy and the ARM64 ACPI maintainers look on
this. (Added to To:) and CC linux-acpi@vger.kernel.org.

I'm not aware of the best way to deal with ACPI in combined drivers
but things like this:

> - hw->base[i] = devm_platform_ioremap_resource_byname(pdev,
> - hw->soc->base_names[i]);
> + hw->base[i] = is_of_node(fwnode)
> + ? devm_platform_ioremap_resource_byname(pdev, hw->soc->base_names[i])
> + : devm_platform_get_and_ioremap_resource(pdev, i, NULL);

Just look really quirky, I think there are better ways to go about
this and sometimes the ACPI maintainers give some good
pushback about the firmware as well.

Yours,
Linus Walleij