Re: [PATCH 11/14] acpi: disable battery and adapter for x86 apple machines

From: Aditya Garg

Date: Fri Dec 04 2026 - 09:57:13 EST




On 04-Dec-26 07:38 PM, Andy Shevchenko wrote:
> On Fri, Dec 04, 2026 at 08:12:51AM -0500, Atharva Tiwari wrote:
>> When macsmc-power is enabled on an Intel Mac, skip acpi-sbs
>> and the ACPI battery and adapter drivers, since macsmc-power
>> now provides them. This avoids duplicate devices.
>
> ...
>
>> + if (IS_ENABLED(CONFIG_MACSMC_ACPI) &&
>> + IS_ENABLED(CONFIG_MACSMC_POWER) && x86_apple_machine)
>> + return -ENODEV;
>
>
> This is a hack. And it's even indented wrongly.

Do you have a better idea to avoid using duplicate devices?
>
> ...
>
>> @@ -664,7 +668,6 @@ static int acpi_sbs_probe(struct platform_device *pdev)
>> acpi_battery_add(sbs, id);
>> }
>> }
>> -
>> if (!sbs->manager_present)
>> acpi_battery_add(sbs, 0);
>
> What the heck is this?
>
> ...
>
> Please, read what you is about to send,
>