From patchwork Tue Jan 30 11:12:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13537301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2E71C46CD2 for ; Tue, 30 Jan 2024 11:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=43BeawH0dLBtPd2hiFNKw9gQjrJHCvkc1n34Z6sGbZM=; b=bF5UJBWrUqR4v1 ++WUPqyC0CEo4kyCDEL9tEg2kg549L/5N1amOtJilxJG6K2Jw7KhySZrFBssypd/AmyFvckLxF0Ov B+E9AEgVwzSgE1XcPZn6HVyQcFCXdV/5lPpkmL++O2F/SixWxlA5iDPt0NKKlrm0BqTH9SF/mdlnz OCaXIuhW0Cibu/biIWNLhYjA+cqAxtlyWMueLKCTA4qC8Fljzsr9M2DUMgfCfjxgoyrN631PlE/Wj IibmMcPS2DQ+00s6B097G8ej9tHX62SbxEBMASIBaGaZmuk9JMeXesI8viFgiLXOuvnCkl/TGil4V gxB3ojHxEtYmu1ouTugQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUm3J-0000000GM58-1mep; Tue, 30 Jan 2024 11:13:17 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUm3G-0000000GM2S-0wjB for linux-arm-kernel@lists.infradead.org; Tue, 30 Jan 2024 11:13:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1706613189; bh=FKvT+3NXE0I7fW0WyC5auryggLUH8FeVDYu/Te5amRk=; h=From:To:Cc:Subject:Date:From; b=NCX6mMIGSPtDC/LmtlXOv7wqiyqEllBqsI4ssjeqCerI9om4r2MjKgERlBV1U80R3 JP7dunRIUxUyIbaxwr0pfHJnv5q9qOuRACRuudWMN4E5i2ksgSIx6bTiUjStoXBX/D Hrl1/rG/qHjj0FZbYRz/d8w2dhtLxyobHDBb0UG3wzDTs2bTL2JzOLk2lTir09iWSd QTVioyREs3ko1I4jbZoD4JQj8pWG28pSELXgZAP1M+IPT4/lG+Grui+I6/CAu8g7DT WMhgE6Ey3AX3GUsF3YHbd8bGIb3VezTX6mMjZ27pyVDv4nlxUqQN36vp69aX1H25uj SvvubPhfa7+bg== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id AEFED3780FC7; Tue, 30 Jan 2024 11:13:07 +0000 (UTC) From: AngeloGioacchino Del Regno To: daniel.lezcano@linaro.org Cc: miquel.raynal@bootlin.com, rafael@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, support.opensource@diasemi.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, andersson@kernel.org, konrad.dybcio@linaro.org, amitk@kernel.org, thara.gopinath@gmail.com, niklas.soderlund@ragnatech.se, srinivas.pandruvada@linux.intel.com, angelogioacchino.delregno@collabora.com, baolin.wang@linux.alibaba.com, u.kleine-koenig@pengutronix.de, hayashi.kunihiko@socionext.com, d-gole@ti.com, linus.walleij@linaro.org, DLG-Adam.Ward.opensource@dm.renesas.com, error27@gmail.com, heiko@sntech.de, hdegoede@redhat.com, jernej.skrabec@gmail.com, f.fainelli@gmail.com, bchihi@baylibre.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, kernel@collabora.com Subject: [PATCH v1 00/18] Thermal: Part 1 - Introduce new structs and registration Date: Tue, 30 Jan 2024 12:12:32 +0100 Message-ID: <20240130111250.185718-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240130_031314_450649_EBF61F88 X-CRM114-Status: GOOD ( 15.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series is a preparation for a bigger cleanup that will be split in three parts in order to avoid immutable branches on multiple subsystems, as in other parts of this series there will be changes in: - drivers/acpi - drivers/platform/x86 - drivers/power/supply - drivers/net/wireless - drivers/net/ethernet This is the first part which adds new structures and starts reorganizing struct members around, plus, this migrates all of the thermal drivers found in drivers/thermal/ to the new thermal_zone_device_register() function, and advertises that the old registration functions are deprecated and will be removed. The reorganization is supposed to be complete (or mostly) but... - struct thermal_zone_platform_params has a temporary name: this is done in order to avoid compile time failures for the drivers outside of drivers/thermal before migrating them to thermal_zone_device_params/thermal_zone_device_register(); - struct thermal_zone_params temporarily has two duplicated members, governor_name and no_hwmon; Part 2 of this topic will migrate all drivers that are external to drivers/thermal to thermal_zone_device_register(); I will send that part only after part 1 is confirmed to be acceptable, as otherwise I'd be spamming people for no reason :-) After all drivers will be migrated to thermal_zone_device_register(), we won't have to care about changing anything outside of drivers/thermal to finish this set of cleanups/changes (and no immutable branches needed) and this means that... Part 3 of this topic will contain the following changes: - thermal_zone_device_register_with_trips() will be removed - thermal_tripless_zone_device_register() will be removed - thermal_zone_params will be renamed to thermal_governor_ipa_params - governor_name, no_hwmon members will be removed - thermal_zone_platform_params will be renamed to thermal_zone_params - Removal of the THERMAL_NAME_LENGTH limitation for `type` More scheduled changes, which should end up in part 3 (at least that's my intention), or eventually entirely after this cleanup topic, include: - Introduction of Thermal Zone names - Disambiguation of TZ name and type - Addition of `thermal-zones`, `thermal-zone-names` parsing for devicetrees ... Summarizing ... Part 1: - Reorganize structures (some temporary names/leftovers) - New registration function, deprecation of old ones - Migration of drivers/thermal drivers to new registration Part 2: - Migration of drivers in other subsystems to new thermal registration Part 3: - Remove the two leftovers in thermal.h - Rename structures with proper, final names - Everything else, anyway. Cheers, Angelo AngeloGioacchino Del Regno (18): thermal: core: Change governor name to const char pointer thermal: Add new structures and thermal_zone_device_register() thermal: Directly use thermal_zone_platform_params for thermal_zone_device thermal/drivers/da9062: Migrate to thermal_zone_device_register() thermal/drivers/imx: Migrate to thermal_zone_device_register() thermal/drivers/rcar: Migrate to thermal_zone_device_register() thermal/drivers/st: Migrate to thermal_zone_device_register() thermal: intel: pch_thermal: Migrate to thermal_zone_device_register() thermal: intel: quark_dts: Migrate to thermal_zone_device_register() thermal: intel: soc_dts_iosf: Migrate to thermal_zone_device_register() thermal: intel: int340x: Migrate to thermal_zone_device_register() thermal: int340x: processor: Migrate to thermal_zone_device_register() thermal: intel: x86_pkg_temp: Migrate to thermal_zone_device_register() thermal/drivers/armada: Migrate to thermal_zone_device_register() thermal/drivers/dove: Migrate to thermal_zone_device_register() thermal/drivers/kirkwood: Migrate to thermal_zone_device_register() thermal/drivers/spear: Migrate to thermal_zone_device_register() thermal/drivers/int340x: Migrate to thermal_zone_device_register() drivers/thermal/armada_thermal.c | 12 +- drivers/thermal/da9062-thermal.c | 16 +- drivers/thermal/dove_thermal.c | 10 +- drivers/thermal/gov_power_allocator.c | 38 ++-- drivers/thermal/gov_user_space.c | 2 +- drivers/thermal/imx_thermal.c | 21 +- .../intel/int340x_thermal/int3400_thermal.c | 20 +- .../int340x_thermal/int340x_thermal_zone.c | 28 +-- .../processor_thermal_device_pci.c | 26 ++- drivers/thermal/intel/intel_pch_thermal.c | 12 +- .../thermal/intel/intel_quark_dts_thermal.c | 23 +- drivers/thermal/intel/intel_soc_dts_iosf.c | 24 ++- drivers/thermal/intel/x86_pkg_temp_thermal.c | 22 +- drivers/thermal/kirkwood_thermal.c | 10 +- drivers/thermal/qcom/tsens.c | 4 +- drivers/thermal/rcar_thermal.c | 15 +- drivers/thermal/spear_thermal.c | 10 +- drivers/thermal/st/st_thermal.c | 15 +- drivers/thermal/thermal_core.c | 201 +++++++++++------- drivers/thermal/thermal_core.h | 6 +- drivers/thermal/thermal_helpers.c | 22 +- drivers/thermal/thermal_hwmon.c | 8 +- drivers/thermal/thermal_of.c | 12 +- drivers/thermal/thermal_sysfs.c | 64 +++--- drivers/thermal/thermal_trace.h | 8 +- drivers/thermal/thermal_trip.c | 14 +- include/linux/thermal.h | 87 ++++++-- 27 files changed, 461 insertions(+), 269 deletions(-)