Message ID | 20231221124825.149141-1-angelogioacchino.delregno@collabora.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-8367-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp383663dyi; Thu, 21 Dec 2023 04:49:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBffNuiImkkqKjRW+2dmHzK+5kh3kncmZh9VXxr8ZJl5EW5Lkqk2yetG/6Vocze/0HJj5E X-Received: by 2002:ad4:43ec:0:b0:67e:e816:8ef9 with SMTP id f12-20020ad443ec000000b0067ee8168ef9mr16466895qvu.85.1703162958703; Thu, 21 Dec 2023 04:49:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703162958; cv=none; d=google.com; s=arc-20160816; b=StocbwskHfJpGRvqC4WJwTNibcoFtyGhNGS3k9puH7uq18Wj27pxyogjvgCG1EjTDL ZJNgDyC6ZloNSy7qos9h2Y48jEbv5KkovNNMhnpztK7paNkqJp9kyzH6PxG9uwWm6WEO tPX8cdxAVs5PsG2fQdCDcUKIlrJSClph67PRqvGuIC+MuOZ0KzbkFMqfuSxED7+g94jE kdJzMfZ4iS+RbTJR/5esajyXz9dIOljSu4TtkmCE/Gw8BYF1PTHR/S2D0wH1nRk6bKlC 83RACFWiJl6GP7akuSxAO/6WhaU9/maDYsHqT5yXfitM9I0iexZyHCKSQRHcvitGWMLy LxrQ== ARC-Message-Signature: i=1; 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:message-id:date:subject:cc:to :from:dkim-signature; bh=Btjhs+xpkW7ZZg7KpV8LVrZC5rjD9iVAH9yeo4jbBAk=; fh=tj3vwvS1joPqVAqhm025RI9FzN3aC+9rlGGIIVsXGr8=; b=CEHMhnkCDO9Nuo1Q1dPE0BJqGYQmeI3U5fGD2rsIPEHC+UgPwc+fj+E/Fzo4cuqjD2 4gEQgqPIEhN3LcPVlK7ttCkt/XLC/FRfHdt+2P7F92yhCWiIenOfHkT5vP1Bb1PghsC7 0CmBnpElgr9iWjSLfCuVe6CnIK98cns/76FxtNwO9gVLfr5r48wti4AgV/wRIRYcqDAE uCSgwaU/6Rq1Pwxj65eTB9agp7nxFIeQ+9/Ft5ocAjtda9jF3mmihmzAEyWdIFfLXqK2 5axutAr5C9SZzpb0/j6y6+/XE74LzFwijn948EtDFsKuazComTbeFBh7qQ3k774t9rvL 287g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=EAOGMCt6; spf=pass (google.com: domain of linux-kernel+bounces-8367-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8367-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q12-20020a0c9a4c000000b0067ec48b21e2si2010468qvd.575.2023.12.21.04.49.18 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:49:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8367-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=EAOGMCt6; spf=pass (google.com: domain of linux-kernel+bounces-8367-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8367-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7F8BD1C20B04 for <ouuuleilei@gmail.com>; Thu, 21 Dec 2023 12:49:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B372974E12; Thu, 21 Dec 2023 12:48:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="EAOGMCt6" X-Original-To: linux-kernel@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 7E22E6EB63; Thu, 21 Dec 2023 12:48:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703162912; bh=2NCEeLfcBTGldq8y38nz7ZWXoN1JW/y1+OmDgAsYgXo=; h=From:To:Cc:Subject:Date:From; b=EAOGMCt68cmj+wdZMGdZ1VpamGZvkorPLseeE/zWVz5O7IVZwQT9dM8x8ZKUYZyn8 u/VgkRM6XEAj7ZPYR353W9VLptOfB6LjfnkYG7kZkqX38azs8jpgHQqotAlaZ8irPg MZ/de6lcu0CBB9R1DKIeY3hW60ueKi905x06swnhEsyy3krfjBbgdR6V7kJAEkgVDF MjrSh5q8yk41i96uZ7tqrIDF8w5xx2T2TiWNWHgKvc8iPFqJ/0Bw0PN0qiS30fpNWG ZCO0N8f4AEotZv1cwoLkCRgDinKNRcsldOSeviOkq7zo0P+uKJr2X+h00wHKuGsbIf +9hwZS4FbevIQ== 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 B75CE3781485; Thu, 21 Dec 2023 12:48:31 +0000 (UTC) From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> To: daniel.lezcano@linaro.org Cc: rafael@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, kernel@collabora.com Subject: [RFC PATCH 00/26] Add thermal zones names and new registration func Date: Thu, 21 Dec 2023 13:47:59 +0100 Message-ID: <20231221124825.149141-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785895802592223510 X-GMAIL-MSGID: 1785895802592223510 |
Series |
Add thermal zones names and new registration func
|
|
Message
AngeloGioacchino Del Regno
Dec. 21, 2023, 12:47 p.m. UTC
** This RFC was sent only to thermal API maintainers + reviewers on purpose ** As per previous discussion with Daniel [1], I've prepared this series adding a new struct thermal_zone_device_params, used in a new registration function for thermal zones thermal_zone_device_register(), deprecating and, finally, replacing functions thermal_tripless_zone_device_register() and thermal_zone_device_register_with_trips(). The new flow to register a thermal zone becomes the following: - Declare a struct thermal_zone_device_params (`tzp` in this example) - Fill in all the params (instead of passing all of them to a function) - Call thermal_zone_device_register(tzp) Moreover, I've also introduced the concept of `name` for a thermal zone, and set, as suggested, a constraint for which: - Multiple thermal zones can have the same `type` (so, no change), and - A thermal zone's name must be *unique*. This should then help (in a later series?) to disambiguate thermal zone name vs type, as most of (if not all) the users seem to actually be misusing the TZ type referring to / using it as a TZ name. Please note that this series is currently a RFC because it's apparently growing bigger than I wanted - and because I probably have to add some more code on top. Before doing so, I'm trying to get feedback on what I've done until now. P.S.: I know, there's a fixup commit in the mix, will obviously fix that for v1 :-) [1]: https://lore.kernel.org/all/20231115144857.424005-1-angelogioacchino.delregno@collabora.com/ AngeloGioacchino Del Regno (26): thermal: Introduce thermal_zone_device_register() and params structure thermal/of: Migrate to thermal_zone_device_register() platform/x86: acerhdf: Migrate to thermal_zone_device_register() ACPI: thermal: Migrate to thermal_zone_device_register() 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() power: supply: core: 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() wifi: iwlwifi: mvm: Migrate to thermal_zone_device_register() cxgb4: Migrate to thermal_zone_device_register() mlxsw: core_thermal: Migrate to thermal_zone_device_register() fixup! power: supply: core: Migrate to thermal_zone_device_register() thermal: Remove tripless_zone_register and register_with_trips functions thermal: Introduce thermal zones names drivers/acpi/thermal.c | 18 +-- .../ethernet/chelsio/cxgb4/cxgb4_thermal.c | 18 ++- .../ethernet/mellanox/mlxsw/core_thermal.c | 93 +++++++------- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 27 ++-- drivers/platform/x86/acerhdf.c | 25 ++-- drivers/power/supply/power_supply_core.c | 14 +- drivers/thermal/armada_thermal.c | 10 +- drivers/thermal/da9062-thermal.c | 14 +- drivers/thermal/dove_thermal.c | 8 +- drivers/thermal/imx_thermal.c | 19 ++- .../intel/int340x_thermal/int3400_thermal.c | 17 +-- .../int340x_thermal/int340x_thermal_zone.c | 28 ++-- .../processor_thermal_device_pci.c | 23 ++-- drivers/thermal/intel/intel_pch_thermal.c | 11 +- .../thermal/intel/intel_quark_dts_thermal.c | 21 +-- drivers/thermal/intel/intel_soc_dts_iosf.c | 22 +++- drivers/thermal/intel/x86_pkg_temp_thermal.c | 20 +-- drivers/thermal/kirkwood_thermal.c | 8 +- drivers/thermal/rcar_thermal.c | 13 +- drivers/thermal/spear_thermal.c | 8 +- drivers/thermal/st/st_thermal.c | 15 ++- drivers/thermal/thermal_core.c | 120 +++++++++--------- drivers/thermal/thermal_of.c | 38 +++--- drivers/thermal/thermal_sysfs.c | 9 ++ drivers/thermal/thermal_trace.h | 17 ++- include/linux/thermal.h | 50 ++++++-- 26 files changed, 391 insertions(+), 275 deletions(-)
Comments
On Thu, Dec 21, 2023 at 1:48 PM AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote: > > ** This RFC was sent only to thermal API maintainers + reviewers on purpose ** > > As per previous discussion with Daniel [1], I've prepared this series adding > a new struct thermal_zone_device_params, used in a new registration function > for thermal zones thermal_zone_device_register(), deprecating and, finally, > replacing functions thermal_tripless_zone_device_register() and > thermal_zone_device_register_with_trips(). > > The new flow to register a thermal zone becomes the following: > - Declare a struct thermal_zone_device_params (`tzp` in this example) > - Fill in all the params (instead of passing all of them to a function) > - Call thermal_zone_device_register(tzp) > > Moreover, I've also introduced the concept of `name` for a thermal zone, > and set, as suggested, a constraint for which: > - Multiple thermal zones can have the same `type` (so, no change), and > - A thermal zone's name must be *unique*. > > This should then help (in a later series?) to disambiguate thermal zone > name vs type, as most of (if not all) the users seem to actually be > misusing the TZ type referring to / using it as a TZ name. > > Please note that this series is currently a RFC because it's apparently > growing bigger than I wanted - and because I probably have to add some > more code on top. Before doing so, I'm trying to get feedback on what > I've done until now. And it is very unlikely that I will be able to provide any useful feedback on this series before 6.8-rc1 is out. Thanks!
Il 21/12/23 14:38, Rafael J. Wysocki ha scritto: > On Thu, Dec 21, 2023 at 1:48 PM AngeloGioacchino Del Regno > <angelogioacchino.delregno@collabora.com> wrote: >> >> ** This RFC was sent only to thermal API maintainers + reviewers on purpose ** >> >> As per previous discussion with Daniel [1], I've prepared this series adding >> a new struct thermal_zone_device_params, used in a new registration function >> for thermal zones thermal_zone_device_register(), deprecating and, finally, >> replacing functions thermal_tripless_zone_device_register() and >> thermal_zone_device_register_with_trips(). >> >> The new flow to register a thermal zone becomes the following: >> - Declare a struct thermal_zone_device_params (`tzp` in this example) >> - Fill in all the params (instead of passing all of them to a function) >> - Call thermal_zone_device_register(tzp) >> >> Moreover, I've also introduced the concept of `name` for a thermal zone, >> and set, as suggested, a constraint for which: >> - Multiple thermal zones can have the same `type` (so, no change), and >> - A thermal zone's name must be *unique*. >> >> This should then help (in a later series?) to disambiguate thermal zone >> name vs type, as most of (if not all) the users seem to actually be >> misusing the TZ type referring to / using it as a TZ name. >> >> Please note that this series is currently a RFC because it's apparently >> growing bigger than I wanted - and because I probably have to add some >> more code on top. Before doing so, I'm trying to get feedback on what >> I've done until now. > > And it is very unlikely that I will be able to provide any useful > feedback on this series before 6.8-rc1 is out. > > Thanks! Thanks for telling - but hey, obviously there's no rush, please take your time. Cheers! Angelo