From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796410292; b=o6x/nOnB2fYGKXOT9wOhHc+XXqxYR+UdmyNVsczyauoimvd6MmYjxy3UUeqUPbbWF/46 /CIP380HQSrFuYWtM+fpJ93V5r1LvFnlBoKT9nUQnhzAWRkb1X7G/Y1olc7dee9zEN4Kf o3ujycPXoux/YK37G6vDVCFiLbXRpA58ROLKLh//CaHSctWv0wVG/2RlucCRCImLJftTz 1DcizFNxHdksb1sMe3tIB+2KM8cLlrf+jLuQaRvE7fZNT396g0NvS10QC3HgcvSRG9wqX oqCq4SVeD4vQ9OmCFU5SWe8taqe7+vE/KuCJomRHrPrFc8wo5j56sgSLk1RdHO+gfKQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796410292; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Content-Type:Content-Transfer-Encoding: From:Mime-Version:Subject:Date:Message-Id:References:Cc:In-Reply-To: To:X-Mailer; bh=+sdtuj2H5fEM/tU1uJhBHWtACZg9Ssk1WQ41y2/SPxk=; b=VHhTcGhx3WgMqyAMc675om+HNkEg0Tjl2uz7u5VvCSYGux0KOTWok+sEvd6sq1CcYLJ+ 0agu8w7y41iqq2976JN2X18eiIdZtKgHjnkLvsAxPCP7J7eUJgRAIU9AjrEYA4bTabedF IAt+WV3XG/Vrrm5I5YUyKso/3GYUNuintJyMZBuPslJTtvFtSPYdDDJIEyU5l1h65VFKH MXDZf56IbP0CwTXFlB5s/VvM5/9opdtpbi9jRiD+jENY/htc2QhBqGWSYLpWgPXV3m7OI J6ExE9b23hWHKON3wwjOX33ObCVQmXdkrBNE0niIiQAD4+pNIEj77o/haKJx9pzWjog== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=hxOa0J0M; arc=none smtp.remote-ip=91.218.175.131 Received: from mta0.migadu.com (out-131.mta0.migadu.com [91.218.175.131]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ECB1606A333 for ; Fri, 4 Dec 2026 18:51:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0ECB1606A333 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=hxOa0J0M X-Envelope-To: linux-rtc@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=PJNEmn32tA59nRqLOEdvZZrPudSNoM7wQov/sGO9vfc=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796410289; v=1; x=1797015089; b=hxOa0J0MZdfVOrycJx0ejo7FK65c2WpCNsMdFG24lBzY6nUbzB2BLOH6lsSVvqxrBbJOazJn UgwjJxVkncqKmnbXeTtiyCaXSlAjzW3iZEbEbPC4dnahPNUOwt0BSzuHH2+6/GQtPkhop2Q9mdu X0GpXbdvcIcFKafxoleX2IjE= X-Envelope-To: linux-rtc@vger.kernel.org Received: by mta12.migadu.com with ESMTPS id c914a38758e8f9c5; Fri, 04 Dec 2026 18:51:28 +0000 X-Mizu-Trace-ID: c914a38758e8f9c5 X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Aditya Garg X-Mailing-List: linux-rtc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 11/14] acpi: disable battery and adapter for x86 apple machines Date: Sat, 5 Dec 2026 00:21:14 +0530 Message-Id: References: Cc: Atharva Tiwari , Ihor Odainyi , Antoine Sidem , Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , "Rafael J. Wysocki" , Len Brown , Linus Walleij , Bartosz Golaszewski , Sven Peter , Janne Grunau , Neal Gompa , Guenter Roeck , Jonathan Cameron , David Lechner , =?utf-8?Q?Nuno_S=EF=BF=BD?= , Andy Shevchenko , Lee Jones , Pavel Machek , Griffin Kroah-Hartman , Hans de Goede , =?utf-8?Q?Ilpo_J=C3=A4rvinen?= , Sebastian Reichel , Alexandre Belloni , Wim Van Sebroeck , Jarkko Sakkinen , Mimi Zohar , Roberto Sassu , Dmitry Kasatkin , Eric Snowberg , Paul Moore , James Morris , "Serge E. Hallyn" , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, linux-iio@vger.kernel.org, linux-leds@vger.kernel.org, mfd@lists.linux.dev, platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org In-Reply-To: To: Andy Shevchenko X-Mailer: iPad Mail (24B156) > On 4 Dec 2026, at 10:45=E2=80=AFPM, Andy Shevchenko wrote: >=20 > =EF=BB=BFOn 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: >=20 > ... >=20 >>>> + if (IS_ENABLED(CONFIG_MACSMC_ACPI) && >>>> + IS_ENABLED(CONFIG_MACSMC_POWER) && x86_apple_machine) >>>> + return -ENODEV; >>>=20 >>> This is a hack. And it's even indented wrongly. >>=20 >> Do you have a better idea to avoid using duplicate devices? >=20 > The commit message is poorly written to advice anything. > It's unclear why we have duplicate drivers for the same ACPI HID to begin w= ith. > Can MAC case be enumerated differently? When the SMS driver is not compile= d > this one is still in use, why is it not a problem? So, there are many unas= wered > questions... On Macs you can get battery and adapter stats using both ACPI and SMC. The S= MC reported values are more reliable so we developed a driver for that. But i= f we use that driver, Linux thinks there are 2 batteries, one from ACPI and o= ther 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 permanent= ly. Other way is check if SMC is compiled or not. If not, fall back to ACPI s= o that we don't loose battery. I understand the issue with commit messages. The author's native language is= n't English so he is unable to communicate properly and thus is using AI to w= rite the messages. I'll try and help him here.=