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, >
- Re: [PATCH 07/14] rtc: add support for x86 macs in ma... Andy Shevchenko
- Re: [PATCH 07/14] rtc: add support for x86 macs i... Aditya Garg
- Re: [PATCH 07/14] rtc: add support for x86 ma... Sven Peter
- Re: [PATCH 07/14] rtc: add support for x86 ma... Andy Shevchenko
- Re: [PATCH 07/14] rtc: add support for x8... Aditya Garg
- Re: [PATCH 07/14] rtc: add support f... Andy Shevchenko
- [PATCH 09/14] treewide: disable other rtc's in t2 macs Atharva Tiwari
- [PATCH 12/14] hwmon/macsmc: add more types Atharva Tiwari
- [PATCH 11/14] acpi: disable battery and adapter for x86 ap... Atharva Tiwari
- Re: [PATCH 11/14] acpi: disable battery and adapter f... Andy Shevchenko
- Re: [PATCH 11/14] acpi: disable battery and adapt... Aditya Garg
- Re: [PATCH 11/14] acpi: disable battery and a... Andy Shevchenko
- Re: [PATCH 11/14] acpi: disable battery a... Aditya Garg
- Re: [PATCH 11/14] acpi: disable batt... Andy Shevchenko
- Re: [PATCH 11/14] acpi: disable ... Andy Shevchenko
- [PATCH 05/14] iio/accel: add driver for apple SMS Atharva Tiwari
- Re: [PATCH 00/14] Add macsmc support for Intel Macs, repla... Andy Shevchenko
- [PATCH 10/14] power/supply: add support for x86 macs in ma... Atharva Tiwari
- [PATCH 08/14] treewide: Add a flag to detect the Apple T2 ... Atharva Tiwari
- [PATCH 01/14] treewide: Add backend for macsmc Atharva Tiwari
