From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.213 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796396234; b=0jvJL9hbVCzu9GEWsp/khyqTzUTA0k/xtWXqAmV1lB3EQrj6N9jGK8imBJ/aXEGrZE0u xI6tKuPEIvAe7NEv2p//vB2xt59Vh615Ta3IwtDA589nMKJse+rKkKfVnJCi5Ic0l653r 6J7uDCZxJomy1KThAFlRZVpD3JdesbBc916wOc7/Kf2Ne4LGQtFblqOiY3tQTowgNIWqG Z3jezt32CBgWi6U9MHEjqf7yqnscsCO4opzfccO8b8/CGCXRtem85Su3vsJ1n6IKkDEGu ye9OCFVFILB3brL3OYoiWNKl8XAyp9/cGhZe38VMfo4WjlBKjAQFzY6+kgHRaGd/zYQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796396234; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=5qrttvcxnckYT6W/9+zd48NRVKEEHM3ZSzsPRiFEViA=; b=4BLtbXNkcFitzX/QkQE8ndpyeIYsqAlB3g+1zvuSew3qgf09U0ciRF4fBY/CuxJkhYHU fEMfDFXKAtcEbn+Y7JMKG2pf7Jb+qdtBCiFPdydhUjdlql7QOnZGEx8U1uwBXTGBqvIVD GQ8qg5JJs99LiIihAASTHjNrtvmxZwGdRnesssXFLUCR4NnSVpRISgzykKdwblPO4X2Kj aCuAcvPgPA9AKB754wkfPuAKLgB5JTi2gcw/JKi9f9NZCj/s7oeLkKQTxOY0ppmTteIjh xsOGu3w7QBSyWx/dZFXtCxTOln90xppim6iNIw61FUxFmvluHxiuW1NPbicWcYgFUAA== 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="uiWnPu6/"; arc=none smtp.remote-ip=95.215.58.213 Received: from mta1.migadu.com (out-213.mta1.migadu.com [95.215.58.213]) (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 680F6606A69F for ; Fri, 4 Dec 2026 14:57:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 680F6606A69F 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=uiWnPu6/ X-Envelope-To: linux-watchdog@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=7wxoQOrcbYufVPrEZ3eLtNmHZ7sefa7dN5CF0Y6N3ZI=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796396224; v=1; x=1797001024; b=uiWnPu6/p9gJ3dwbqFi7Kp3sVIi3phw+YKTpHAF5h/y1ZLv58l5NYc2vFbP4T+qux2lzjHKm BkQQ0cDNps0g/9uIbC/af/n36qF4szCBakxPUMwAD1RyH56iFK2o7ExTm1MiJkAdHBMFyouC3YK MznQDLtvD4Ph8c+Fl80Yq9pA= X-Envelope-To: linux-watchdog@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id fb8099c699a7548d; Fri, 04 Dec 2026 14:57:04 +0000 X-Mizu-Trace-ID: fb8099c699a7548d X-Migadu-Flow: FLOW_OUT Message-ID: <185f1d2a-fdf8-44f5-95b4-148dade83930@linux.dev> Date: Fri, 4 Dec 2026 20:26:48 +0530 X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 11/14] acpi: disable battery and adapter for x86 apple machines To: Andy Shevchenko , Atharva Tiwari Cc: 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=C3=A1?= , 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 References: <20261204131619.5059-1-atharvatiwarilinuxdev@gmail.com> <20261204131619.5059-12-atharvatiwarilinuxdev@gmail.com> Content-Language: en-US From: Aditya Garg In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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, >