Re: [PATCH 11/14] acpi: disable battery and adapter for x86 apple machines
From: Andy Shevchenko
Date: Fri Dec 04 2026 - 15:14:24 EST
On Fri, Dec 04, 2026 at 10:02:46PM +0200, Andy Shevchenko wrote:
> On Sat, Dec 05, 2026 at 12:21:14AM +0530, Aditya Garg wrote:
> > > On 4 Dec 2026, at 10:45 PM, Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> > > On Fri, Dec 04, 2026 at 08:26:48PM +0530, Aditya Garg wrote:
> > >>> On 04-Dec-26 07:38 PM, Andy Shevchenko wrote:
> > >>> On Fri, Dec 04, 2026 at 08:12:51AM -0500, Atharva Tiwari wrote:
...
> > >>>> + 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?
> > >
> > > The commit message is poorly written to advice anything.
> > > It's unclear why we have duplicate drivers for the same ACPI HID to begin with.
> > > Can MAC case be enumerated differently? When the SMS driver is not compiled
> > > this one is still in use, why is it not a problem? So, there are many unaswered
> > > questions...
> >
> > On Macs you can get battery and adapter stats using both ACPI and SMC. The
> > SMC reported values are more reliable so we developed a driver for that. But
> > if we use that driver, Linux thinks there are 2 batteries, one from ACPI and
> > other from SMC. So we need to disable it from ACPI.
> >
> > One way is to simply check is the device is a Mac and disable ACPI
> > permanently. Other way is check if SMC is compiled or not. If not, fall back
> > to ACPI so that we don't loose battery.
>
> Should we just disable ACPI0002 enumeration via a quirk in somewhere drivers/acpi/ ?
> Like acpi_create_platform_device() blocks the devices in the forbidden_id_list.
Since we have already acpi_quirk_skip_acpi_ac_and_battery() quirk, perhaps the
proper place is to have it only in utils.c and apply in sbs.c via a call to
acpi_quirk_skip_acpi_ac_and_battery(). Would that work?
> > I understand the issue with commit messages. The author's native language
> > isn't English so he is unable to communicate properly and thus is using AI to
> > write the messages. I'll try and help him here.
--
With Best Regards,
Andy Shevchenko