From nobody Fri Oct 3 14:43:41 2025 Received: from mail-ed1-f74.google.com (mail-ed1-f74.google.com [209.85.208.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA3652C1587 for ; Sat, 30 Aug 2025 05:34:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756532079; cv=none; b=CBJJn+vLCyaO9sxpEs882Pi9nWE6rQfoEJlZ+Qefa4rNQfSIwaM9M9ywEb638p0R2K+f2ouybU3sIVxhKfLl+npP8SaSIsEUWh3Rn0oIunJM/JMbutjFDItxbroATS/d+tOwA0SZ1mqcAQEZRAHolUMnf7GhZPW8SpBCKsqYxHY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756532079; c=relaxed/simple; bh=tE7h+6Ck152b0ta6W45P08/NelqWtKQJ49igH6GfCXQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=W7+wXsbLkWhywhnMgOazu7rkOAbWtbA7vUKWZnMiTrqy7KqKH2B6Tazis3paFqPvrTiNlCUr+P+Z6ssuh6dauq8EYgHD/gTBO0siGS+9EeGV4jPxOIkmhUwZvHvoVMeKD80ZpxXDM16l9MYn/MAsCFo+5NOwiBs+5rJ3Fc72gUo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--srosek.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=K6fM86XA; arc=none smtp.client-ip=209.85.208.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--srosek.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="K6fM86XA" Received: by mail-ed1-f74.google.com with SMTP id 4fb4d7f45d1cf-61c6e3b4b89so2219321a12.2 for ; Fri, 29 Aug 2025 22:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1756532075; x=1757136875; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=cJWspDoxo9x/XP1u8QC/55JEIhUnUfdlnp+4goH1sDY=; b=K6fM86XADRgPDnB7e+oGgTbZeb2ocq9QImAc4W5TqDl2Fiq7098W+W+EGvU1g1ZDXx 2J8ACBp/4E/anE4Rj9orbHGs2jVAMLqrmTqI0L764HJbVfGZvbRP3PqnD8UXo4OPkXfs E5W4sWbb9XmbZ6B1GLjtfwWJ0A6wpOGRHIlkvhLCO5aa8DU81nJH/8ykJX8ACJb/LoSk cvuFNLaqQURr1pJWoqMPwP/1oLCTJ37geIu+bj9fM3drBEvTYE4mlBT8lMEFk/7QZdkE jLn4gu0sWmyEvBz02L1/9+i08+3s8O+GJn1On2/EzWlQeUGwU7Zq6yvFgnq4bqkp1iRn W+Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756532075; x=1757136875; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cJWspDoxo9x/XP1u8QC/55JEIhUnUfdlnp+4goH1sDY=; b=SqvUBMx2hf4ZO2NovZK3kiMBpyGbm6suJAw2AKuY3rclP2bsHZFr6n3LVCDjMYspby eM66/LjzyoUs18jr7mb0e2MTH2ExX1JbEeue7AX8bnF/7e4DnoZxcbWpDRFWWhRVr96/ y5bzcNbSAOBA2KCYadOJe0/XXutay7MCRtRi8CLYpPO1rjOZ4vXz3nl2AknChTZ+Fe17 84MGXO/9bAE+7nNbucBhlrWyrzuFHTWyZ4ZHqO6iET7ufoo4wkBSfINtXITY38qpHkWL oUaOovqeTpvnsWuB1JZtnlAI8l49qK3XaWBrlN0MOhvA64SDKnTViLRQfdotPzjpDcii pcGw== X-Forwarded-Encrypted: i=1; AJvYcCXfy4Lp+0HfvjX2Dmfirzi1b8VQLPH7FU2nmQl9ITsYkyiUQH4b1PnqenR5n1hZ2i++giv2TOBBmQ7iqFQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzX3yLCJiiaua8E7pbfDFAE58h0eJe1PcpA1Bdl6k8ZsWSGat4p 9+Q+lMhp/hm35Xuz6PfRz2ZhOGL+gJ48552n84YSVcsfiIr9OGi+ss6zYEoH/a+SFAryA5weuyR UhHVJCA== X-Google-Smtp-Source: AGHT+IHhCZBEr1wBakiPy5j+PXcVghhZSHJqFZDur7EAy9lfhOLMwAHt/cfjF1VDIjnk0M9/jmOMuZbLh+Q= X-Received: from edf8.prod.google.com ([2002:a05:6402:21c8:b0:612:9323:1cb1]) (user=srosek job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:34c1:b0:61c:d457:e559 with SMTP id 4fb4d7f45d1cf-61d26c3fb81mr936353a12.23.1756532075255; Fri, 29 Aug 2025 22:34:35 -0700 (PDT) Date: Sat, 30 Aug 2025 05:34:04 +0000 In-Reply-To: <20250830053404.763995-1-srosek@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250830053404.763995-1-srosek@google.com> X-Mailer: git-send-email 2.51.0.318.gd7df087d1a-goog Message-ID: <20250830053404.763995-13-srosek@google.com> Subject: [PATCH v1 12/12] ACPI: DPTF: Move INT340X enumeration to modules From: Slawomir Rosek To: "Rafael J . Wysocki" , Alex Hung , Hans de Goede , Ilpo Jarvinen , AceLan Kao , Daniel Lezcano Cc: Greg Kroah-Hartman , Zhang Rui , Srinivas Pandruvada , Tomasz Nowicki , Stanislaw Kardach , Michal Krawczyk , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org, Slawomir Rosek Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Move enumeration of INT340X ACPI device objects on the platform bus from DPTF core to thermal drivers using ACPI platform core methods Signed-off-by: Slawomir Rosek --- drivers/acpi/dptf/dptf_pch_fivr.c | 2 +- drivers/acpi/dptf/dptf_power.c | 2 +- drivers/acpi/dptf/int340x_thermal.c | 7 +++++-- drivers/acpi/fan_core.c | 2 +- drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 2 +- drivers/thermal/intel/int340x_thermal/int3401_thermal.c | 2 +- drivers/thermal/intel/int340x_thermal/int3402_thermal.c | 2 +- drivers/thermal/intel/int340x_thermal/int3403_thermal.c | 2 +- drivers/thermal/intel/int340x_thermal/int3406_thermal.c | 2 +- 9 files changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/acpi/dptf/dptf_pch_fivr.c b/drivers/acpi/dptf/dptf_pch= _fivr.c index cb81636a5d63..f3cd52c89e8d 100644 --- a/drivers/acpi/dptf/dptf_pch_fivr.c +++ b/drivers/acpi/dptf/dptf_pch_fivr.c @@ -162,7 +162,7 @@ static struct platform_driver pch_fivr_driver =3D { }, }; =20 -module_platform_driver(pch_fivr_driver); +module_acpi_platform_driver(pch_fivr_driver); =20 MODULE_AUTHOR("Srinivas Pandruvada "); MODULE_LICENSE("GPL v2"); diff --git a/drivers/acpi/dptf/dptf_power.c b/drivers/acpi/dptf/dptf_power.c index d7c59f016083..b85e876b2e85 100644 --- a/drivers/acpi/dptf/dptf_power.c +++ b/drivers/acpi/dptf/dptf_power.c @@ -239,7 +239,7 @@ static struct platform_driver dptf_power_driver =3D { }, }; =20 -module_platform_driver(dptf_power_driver); +module_acpi_platform_driver(dptf_power_driver); =20 MODULE_AUTHOR("Srinivas Pandruvada "); MODULE_LICENSE("GPL v2"); diff --git a/drivers/acpi/dptf/int340x_thermal.c b/drivers/acpi/dptf/int340= x_thermal.c index 7d1308b1f513..b2be3a8df9ac 100644 --- a/drivers/acpi/dptf/int340x_thermal.c +++ b/drivers/acpi/dptf/int340x_thermal.c @@ -27,8 +27,11 @@ static const struct acpi_device_id int340x_thermal_devic= e_ids[] =3D { static int int340x_thermal_handler_attach(struct acpi_device *adev, const struct acpi_device_id *id) { - if (IS_ENABLED(CONFIG_INT340X_THERMAL)) - acpi_create_platform_device(adev, NULL); + /* + * Do not attach INT340X devices until platform drivers are loaded. + * Enumeration of INT340X ACPI device objects on the platform bus + * should be done by thermal drivers. + */ return 1; } =20 diff --git a/drivers/acpi/fan_core.c b/drivers/acpi/fan_core.c index 095502086b41..7df3caa59b73 100644 --- a/drivers/acpi/fan_core.c +++ b/drivers/acpi/fan_core.c @@ -473,7 +473,7 @@ static struct platform_driver acpi_fan_driver =3D { }, }; =20 -module_platform_driver(acpi_fan_driver); +module_acpi_platform_driver(acpi_fan_driver); =20 MODULE_AUTHOR("Paul Diefenbaugh"); MODULE_DESCRIPTION("ACPI Fan Driver"); diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/driv= ers/thermal/intel/int340x_thermal/int3400_thermal.c index 6311125c3ebd..0005961328fc 100644 --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -699,7 +699,7 @@ static struct platform_driver int3400_thermal_driver = =3D { }, }; =20 -module_platform_driver(int3400_thermal_driver); +module_acpi_platform_driver(int3400_thermal_driver); =20 MODULE_DESCRIPTION("INT3400 Thermal driver"); MODULE_AUTHOR("Zhang Rui "); diff --git a/drivers/thermal/intel/int340x_thermal/int3401_thermal.c b/driv= ers/thermal/intel/int340x_thermal/int3401_thermal.c index e0603f218d2e..d496f8b171e0 100644 --- a/drivers/thermal/intel/int340x_thermal/int3401_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3401_thermal.c @@ -69,7 +69,7 @@ static struct platform_driver int3401_driver =3D { }, }; =20 -module_platform_driver(int3401_driver); +module_acpi_platform_driver(int3401_driver); =20 MODULE_AUTHOR("Srinivas Pandruvada "); MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver"); diff --git a/drivers/thermal/intel/int340x_thermal/int3402_thermal.c b/driv= ers/thermal/intel/int340x_thermal/int3402_thermal.c index 213d4535f2c1..d06c06fadce5 100644 --- a/drivers/thermal/intel/int340x_thermal/int3402_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3402_thermal.c @@ -100,7 +100,7 @@ static struct platform_driver int3402_thermal_driver = =3D { }, }; =20 -module_platform_driver(int3402_thermal_driver); +module_acpi_platform_driver(int3402_thermal_driver); =20 MODULE_DESCRIPTION("INT3402 Thermal driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/thermal/intel/int340x_thermal/int3403_thermal.c b/driv= ers/thermal/intel/int340x_thermal/int3403_thermal.c index d246c69d4872..33735515b47d 100644 --- a/drivers/thermal/intel/int340x_thermal/int3403_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3403_thermal.c @@ -284,7 +284,7 @@ static struct platform_driver int3403_driver =3D { }, }; =20 -module_platform_driver(int3403_driver); +module_acpi_platform_driver(int3403_driver); =20 MODULE_AUTHOR("Srinivas Pandruvada "); MODULE_LICENSE("GPL v2"); diff --git a/drivers/thermal/intel/int340x_thermal/int3406_thermal.c b/driv= ers/thermal/intel/int340x_thermal/int3406_thermal.c index d05ca8bc4061..03cc026cdffb 100644 --- a/drivers/thermal/intel/int340x_thermal/int3406_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3406_thermal.c @@ -203,7 +203,7 @@ static struct platform_driver int3406_thermal_driver = =3D { }, }; =20 -module_platform_driver(int3406_thermal_driver); +module_acpi_platform_driver(int3406_thermal_driver); =20 MODULE_DESCRIPTION("INT3406 Thermal driver"); MODULE_LICENSE("GPL v2"); --=20 2.51.0.318.gd7df087d1a-goog