Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp1078456lqh; Fri, 29 Mar 2024 06:44:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWBGEeji94AHEv0V/0QW3uMYNw0CNUtcobxdYZpf4O494ir3neBbQCMnGdd+8gNG6YyOXOKg+5omE4OmBOUKjNCs4uibYCSBjJg/7Os0w== X-Google-Smtp-Source: AGHT+IGmNfZgGS8sssf6iHED/mdSjRe5vCFjDUFSYhyW55pSlmR1sUOsHqKhMyE3Vv5/bkEUA07A X-Received: by 2002:a17:906:24d7:b0:a4e:1aef:2d03 with SMTP id f23-20020a17090624d700b00a4e1aef2d03mr1544530ejb.69.1711719888961; Fri, 29 Mar 2024 06:44:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711719888; cv=pass; d=google.com; s=arc-20160816; b=XffJJ+Z9azZd8Pe5wLEHWJuD7pbWOs20T7JBYDj1qeXKZeHbCtCR3s2eAGEETwo4n3 fq9pAs5Yy/qgWMRxgtaCvuDZIdY+U5n9ZSQKGQr+xAryLDYMWjtwcw9ngz2F0d5zOwVY H675jX+HQEKkRXArtXKf25JFkXR8LPAVt8aRCu7+rdCCI7Zy2nXJtiu5DZuEDVUuW5uW D0mw9N2Ni0Q2B1G6KNgQaOeGB3jrXlBmCbzkpaH5LxJY2jjunxrgND28DfhCa3KfzhDa UeF7w2gGzxIl6bprXw6Gcd9Vek+hBKogE/Yl9HMK/Q0j4ZQuiA/Xng4j8F4iCWCmKqyB LwjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=eq+HZbF617/w53t/BNUc/lMQJUt+7BJbUFbuRn7cAVI=; fh=/Cykq5QGcYPesX6q4AvgJdRYazKAxne+e19Imf1EIKE=; b=GnUeC4UF3Vf2jT/iqAxdthpofSXhbRYkw6Z5TR/+wbf2uFEvWouElXWF68d87QEoqF 1QVlBwUHEvvpvsYpDrxQ9/T7p/LevM90FCjPVfr9m0NVcj94E+saAQ3VqAo5mrfkYON0 mlADr6y8sgp/b96MYPHfP3DdE4/CJ+iJ9LbQXN1AUGAxd5yxHjoQN/V+/9CyJQQuk+Ds TxJMV0FzqR23EfipXS7dsG/+1UlUYxUI49/NDgjkk9lacjYs7LPvwaSYkd54nq9TXTrb Sg69+2dKHiq0HISh+XeOuY+SkpmQueIZVM5b7a9YHIdTViQN3U0rsZUQxoAAYPEoeBUu W6QA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FKedmES6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124761-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t3-20020a170906178300b00a4761adde1bsi1813446eje.607.2024.03.29.06.44.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 06:44:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124761-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FKedmES6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124761-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 715071F225B7 for ; Fri, 29 Mar 2024 13:44:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34C851482E3; Fri, 29 Mar 2024 12:41:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FKedmES6" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45E5A180A7D; Fri, 29 Mar 2024 12:41:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716096; cv=none; b=PS44Vm6pghE35mSWN1zx39PXTkihhPmc/OSa4YGiYktOBSIWjUEgof9CIvzuZZqpEcwAVUfAID9lLDsUpePrMOYydyz61b3ePSgFQTHe4YdnVmGdZpoyDHunSy+G8UNIlDzHrp/3uu+MDgxE/PpmhpvpxPt6Hnpvog7CsykFV4M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716096; c=relaxed/simple; bh=QPLVn594emU0I3NOpLawSQgMidgeuHWuB6usbt5H/qc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jxdLLrcfFEsE9p04ynPX1roDeB3TqKVI9Exx2yt9G+E5+iGjQn0o9H2aQofTZHhGrXoiefhSdFX+C76SRJNWAhi7mNCCrWDPBevG4Jp7E3S8k9+cr9n/beNmPp07YBomgfQPsKDPwHaw4ZpuO6A+gzPSRta6Jg/Im0yDIjobzNw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FKedmES6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1B76C433F1; Fri, 29 Mar 2024 12:41:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711716096; bh=QPLVn594emU0I3NOpLawSQgMidgeuHWuB6usbt5H/qc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FKedmES6H/JWp8nR2f6srX7xgMyyP4C3pLqROWjk+r/vdVOwi63CsqmXY9taUaK6Z UYfh2yTt4eSXquor0J/8JsqcyoJtzog2wRwe6oTX8wldNfQRdkNeqQgybeepRA3E7r 9W3ICBPLEK9kA57Ut9zZH8DKNVUNg50X2VvN5hkamktVSIi60CiMc7GW51bGO389E7 91EJS/JAaemet3Ou9+YX1UU89++uEErfmj0bVoBnCkmLp4Uz97jqOJcIGocBIrm/Ds 591w7qY3xDodG7i+jpr9zpYcurgr05W7PAsUexCWdhG4Gm6fxuPLB0NATuo5TYqQot PpM7ue27z6TlQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans de Goede , "Rafael J . Wysocki" , Sasha Levin , rafael@kernel.org, robert.moore@intel.com, mika.westerberg@linux.intel.com, mario.limonciello@amd.com, michal.wilczynski@intel.com, raag.jadav@intel.com, mail@mariushoch.de, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [PATCH AUTOSEL 6.8 52/98] ACPI: x86: Move acpi_quirk_skip_serdev_enumeration() out of CONFIG_X86_ANDROID_TABLETS Date: Fri, 29 Mar 2024 08:37:23 -0400 Message-ID: <20240329123919.3087149-52-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240329123919.3087149-1-sashal@kernel.org> References: <20240329123919.3087149-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.8.2 Content-Transfer-Encoding: 8bit From: Hans de Goede [ Upstream commit 7c86e17455de1a442ec906d3449148b5e9a218a4 ] Some recent(ish) Dell AIO devices have a backlight controller board connected to an UART. This UART has a DELL0501 HID with CID set to PNP0501 so that the UART is still handled by 8250_pnp.c. Unfortunately there is no separate ACPI device with an UartSerialBusV2() resource to model the backlight-controller. The next patch in this series will use acpi_quirk_skip_serdev_enumeration() to still create a serdev for this for a backlight driver to bind to instead of creating a /dev/ttyS0. This new acpi_quirk_skip_serdev_enumeration() use is not limited to Android X86 tablets, so move it out of the ifdef CONFIG_X86_ANDROID_TABLETS block. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/x86/utils.c | 18 ++++++++++++++---- include/acpi/acpi_bus.h | 14 +++++++------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c index bc65ebfcdf767..8829a907eee02 100644 --- a/drivers/acpi/x86/utils.c +++ b/drivers/acpi/x86/utils.c @@ -428,7 +428,7 @@ bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev) } EXPORT_SYMBOL_GPL(acpi_quirk_skip_i2c_client_enumeration); -int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip) +static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bool *skip) { struct acpi_device *adev = ACPI_COMPANION(controller_parent); const struct dmi_system_id *dmi_id; @@ -436,8 +436,6 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *s u64 uid; int ret; - *skip = false; - ret = acpi_dev_uid_to_integer(adev, &uid); if (ret) return 0; @@ -463,7 +461,6 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *s return 0; } -EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration); bool acpi_quirk_skip_gpio_event_handlers(void) { @@ -478,8 +475,21 @@ bool acpi_quirk_skip_gpio_event_handlers(void) return (quirks & ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS); } EXPORT_SYMBOL_GPL(acpi_quirk_skip_gpio_event_handlers); +#else +static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bool *skip) +{ + return 0; +} #endif +int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip) +{ + *skip = false; + + return acpi_dmi_skip_serdev_enumeration(controller_parent, skip); +} +EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration); + /* Lists of PMIC ACPI HIDs with an (often better) native charger driver */ static const struct { const char *hid; diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index e4d24d3f9abb5..446225aada50d 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -749,6 +749,7 @@ bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *s bool acpi_quirk_skip_acpi_ac_and_battery(void); int acpi_install_cmos_rtc_space_handler(acpi_handle handle); void acpi_remove_cmos_rtc_space_handler(acpi_handle handle); +int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip); #else static inline bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *status) @@ -766,23 +767,22 @@ static inline int acpi_install_cmos_rtc_space_handler(acpi_handle handle) static inline void acpi_remove_cmos_rtc_space_handler(acpi_handle handle) { } +static inline int +acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip) +{ + *skip = false; + return 0; +} #endif #if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS) bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev); -int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip); bool acpi_quirk_skip_gpio_event_handlers(void); #else static inline bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev) { return false; } -static inline int -acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip) -{ - *skip = false; - return 0; -} static inline bool acpi_quirk_skip_gpio_event_handlers(void) { return false; -- 2.43.0