From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.53 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796410292; b=dxpvPB3q1m7pM681B8ULmOobQqpZKqmB4TDYX5/vmP1FUXPe8VBH+YCne/wAXJaGUsWg udGpOR6r7xPuj+QeUlb5741eEXsrfhI4dEtAfn2xSJ8dVgMI6hkickwPZ8Xw5/+vi8yDg OtyeeGnRnOC224Fh3SMAeT2s1iUotro0ViPx2ir45ZzLW5hEBH+QLAQMLOFBaqhF3nvL+ /wfrMw3G5uiws7MYCtWNFuxVCIV2xzqKgMRJfmShO/sOnw/DGe8yhZGaip1o+w+UL7hbm MFRqoHxBs6b07W1e7CRZJRRSzXobJtSfCrZK6lBIT45/k6N4s4G4nTolrX8JJE9mgwg== 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=VWhUVAmzZK3hl3oJ/+MUJ6RhjPq9+D3pb/Wnzzqq6yYx+cDdKhlUgQnYH8uekbBcGGIK fMd8dNqDwuQlpt0m6WCkl89XWwk7bFG4CPGPvRTndyId3DmC6eU3J35/0W2rz+6CrKFMS FU/F5Jf8JRioCQ5jm4OZ4xVtQvQW3pT/mieKNE9e4wVnsgXxxjyiGR6NBvjfuH5h9M2Ie fGWll+dITtZmrpP7D16B+tbMhwjb6xaxMPISlVzceZpne6b2XtcmRxTdnbMllKhlAiL1v 8TsFGqLt+kXjblfC/gDk3TuaPoF+BsEWjk/mCRDPTZKzXoddeIwGziuifMT6XxHXjFw== 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=95.215.58.53 Received: from mta1.migadu.com (out-53.mta1.migadu.com [95.215.58.53]) (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 09718606A332 for ; Fri, 4 Dec 2026 18:51:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 09718606A332 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-integrity@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-integrity@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-integrity@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.=