Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp121979rdb; Thu, 21 Dec 2023 04:50:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJjlzWFbJql1WG0d/MG0ucCVCqulV7mZecC2pH4uRIOsuNUxZFqIhCAXFtlrJrlCn2bFPD X-Received: by 2002:a50:aa94:0:b0:553:69f5:b599 with SMTP id q20-20020a50aa94000000b0055369f5b599mr3373774edc.3.1703163000817; Thu, 21 Dec 2023 04:50:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703163000; cv=none; d=google.com; s=arc-20160816; b=xsub/kX3hmo/LMaFynmSLCsUWMJn9IueO4n4wrjgW6g10hzFHVeecTxlUU2CS9vAFm qStMnpCrh7a0MJVWhamYUT+M9VuGYu+s8/xkKUq4QGvYHPLzNdKNBrqLIi4YGA3CPXgv zqmXd691tM2vbTrvl73Q3i+Mi3HeSPsy0B7Ou7Lg+BN+LZ/86o+JPzMemfGPxrbtp0hv Eeg/ILQBv2Ky8W1Me5KGExID6goWJZlcwrOoByIrqT4oZZ0pLyf+28lGVVkeHq5e8PAn xCHLpNV4plElMUmBtjhJdnPmSQY/bqzD8KT/nPI+gp+ikbLKhPmmTKA1Jyc5Byk8702q 0YlA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vegmaxzgxoMK+QwZ3PMOGhWm1enk0FFAYfe5j7xy01w=; fh=tj3vwvS1joPqVAqhm025RI9FzN3aC+9rlGGIIVsXGr8=; b=j8RNlKWDX+F79SNZE0ooMBG2X5CZZiUeAjQpaQSC2NDgI7FNHzUaiAHVuQBQAhBmvP 2Rgk0gFILqcRo4z4DCISC9VlbwoIrpYP92r/HILQNEEYxWCF7Hmyc8hN9mhMoiscraMZ v6p7z85655bgctOh4I8oCi+rDjGd+ny9drSmOBm9208rpcNbhmb94NiO6zevA6gVUEXb 8340vztgViXd+hWoTnXIkjFsoXGkLLBc5elsiAAExm0pRzhs47F91colIQZMcjI2KVE4 MSWxjFED1yKlJGHxLyCAXKycfW/WYfqaAHtrcXyGnRPq/Ir95JEZORFTso+eNB5Xp9Zg Q5iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ixzJ9PR5; spf=pass (google.com: domain of linux-kernel+bounces-8373-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8373-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id co8-20020a0564020c0800b0055406914794si810499edb.524.2023.12.21.04.50.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:50:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8373-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ixzJ9PR5; spf=pass (google.com: domain of linux-kernel+bounces-8373-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8373-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3E6051F257F8 for ; Thu, 21 Dec 2023 12:50:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ACAC576DA4; Thu, 21 Dec 2023 12:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="ixzJ9PR5" 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 9B38B745FF; Thu, 21 Dec 2023 12:48:38 +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=1703162917; bh=7dSyaW0hHfrvS4WptTVuedCjr1NJ6UZhYXzsUhQDe0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ixzJ9PR5Qvi8/Dv5L2i9OxPhQnafYOqL7SI7PEbPmzcJHbdzy5tgPlVb2yCNW1OuJ IAp1JyD0xcm8bSioyrJyj1W2LbOjlsteD+FeNbBayNoScu473kz4z5Gj5Tbv6g0vHD xKwybpGLgW1CoMtRcTGvij9ahpd7IAxPYSgJRhgVO4VKvMzmC+Yr+K7WVKG243d3U0 oP00LSC6k1jbuPGuvUGWBa8dyHzFBmIt6DdssXnd5Pf+5gStHnE0ZLQW5TmbTwQ5s+ 4w3S76UeVnqpTBbP2C/Xp04tCJurF4yce8a4pRpVyHPdAwSqIXuBlY44aTaUF2DGX/ Vccj3R9MksCdg== 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 68CED3782009; Thu, 21 Dec 2023 12:48:36 +0000 (UTC) From: AngeloGioacchino Del Regno 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 , kernel@collabora.com Subject: [RFC PATCH 06/26] thermal/drivers/imx: Migrate to thermal_zone_device_register() Date: Thu, 21 Dec 2023 13:48:05 +0100 Message-ID: <20231221124825.149141-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231221124825.149141-1-angelogioacchino.delregno@collabora.com> References: <20231221124825.149141-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The thermal API has a new thermal_zone_device_register() function which is deprecating the older thermal_zone_device_register_with_trips() and thermal_tripless_zone_device_register(). Migrate to the new thermal zone device registration function. Signed-off-by: AngeloGioacchino Del Regno --- drivers/thermal/imx_thermal.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 7019c4fdd549..61b332e1b899 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -599,6 +599,13 @@ static inline void imx_thermal_unregister_legacy_cooling(struct imx_thermal_data static int imx_thermal_probe(struct platform_device *pdev) { + struct thermal_zone_device_params tzdp = { + .type = "imx_thermal_zone", + .ops = &imx_tz_ops, + .mask = BIT(IMX_TRIP_PASSIVE), + .passive_delay = IMX_PASSIVE_DELAY, + .polling_delay = IMX_POLLING_DELAY, + }; struct imx_thermal_data *data; struct regmap *map; int measure_freq; @@ -696,13 +703,11 @@ static int imx_thermal_probe(struct platform_device *pdev) goto legacy_cleanup; } - data->tz = thermal_zone_device_register_with_trips("imx_thermal_zone", - trips, - ARRAY_SIZE(trips), - BIT(IMX_TRIP_PASSIVE), data, - &imx_tz_ops, NULL, - IMX_PASSIVE_DELAY, - IMX_POLLING_DELAY); + tzdp.devdata = data; + tzdp.trips = &trips; + tzdp.num_trips = ARRAY_SIZE(trips); + + data->tz = thermal_zone_device_register(&tzdp); if (IS_ERR(data->tz)) { ret = PTR_ERR(data->tz); dev_err(&pdev->dev, -- 2.43.0