Re: [PATCH v2 3/5] platform/chrome: cros_ec_lpc: Add a new quirk for ACPI id

From: Ben Walsh
Date: Mon Jun 03 2024 - 15:15:51 EST


Mario Limonciello <mario.limonciello@xxxxxxx> writes:

> On 6/3/2024 04:30, Tzung-Bi Shih wrote:
>> On Mon, Jun 03, 2024 at 07:38:32AM +0100, Ben Walsh wrote:
>>> @@ -436,6 +463,8 @@ static int cros_ec_lpc_probe(struct platform_device *pdev)
>>>
>>> ec_lpc->mmio_memory_base = EC_LPC_ADDR_MEMMAP;
>>>
>>> + adev = ACPI_COMPANION(dev);
>>> +
>>
>> The change is irrelevant to the patch.
>
> It looks relevant to me. The companion needs to get set before the
> quirk overwrites it.

That was my thinking. You can either update "adev" and use it to refer
to the ACPI companion device, or (as Tzung-Bi suggests) use
"ACPI_COMPANION" / "ACPI_COMPANION_SET" as needed.

I really don't mind either way. I'm happy to change it if necessary.