Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp124504rdb; Thu, 21 Dec 2023 04:55:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYWbn2kSNePPVYPVMgrlXE5VW5OdN7L3nfJ1l1kkCb1JKY/Hgm9sfieTQdd1FaioVaY5kM X-Received: by 2002:a05:6a21:a589:b0:195:1775:c96f with SMTP id gd9-20020a056a21a58900b001951775c96fmr341099pzc.1.1703163319457; Thu, 21 Dec 2023 04:55:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703163319; cv=none; d=google.com; s=arc-20160816; b=wlQz9CWiRNXqeDkN3ox7WAomlz8Z7cR6URtGloxhza0IMgYYBltPlyUMH0dQKpHoh+ oWxK/8nLlo19HEHVPI7MD4oV41c+mTtQtr1v0+PriJKuxIM9MGV+EDHpSEb6mNLUt46r xDBXeYuurrZM49ROlW4Ycf6xsyQB7e+6HKuhFMdwDTuyQ6XjLn7N7KAOhFLH8sHRNQGi gkVM07vWvPMdePXwveimHZSxnJKuF4hzkx9tWTpNIsg79LGAxWjIfRY4gyLsG/oLDuQj bR/KJOFw/EcQl/gjFs65GlE9MGH+cuEZskbAVL++lp0JJqZjKzkVHNEYMR9GHLsL3Uuz DvBQ== 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=NckmytK5fdyMArIVq5aYY8zu8Ee0BPFr6sx06wm7Yh4=; fh=tj3vwvS1joPqVAqhm025RI9FzN3aC+9rlGGIIVsXGr8=; b=sjk+oUiJoo7DraINFuzHjtQNRyCcjkNHOZTHAZlWJiOWTzC0tYvQz0eM4hWoL+iYoc t9criT5sg389XLGCoCv5IeOFpfPg00Qdb2cZagSu3iuJEv0LMeAsl+gV4O9liRCUttLR CUKn7Xp8ozBMU3MB9yESxivPxqOQacBPgIro2ULJmvE6dwIbctxsuDv6PPOUXBKB59pS mfrcHC+sWH7w3/AAy1IqSX9fk49t2fXBwPia9xIEwTTVyF/6wutLQeHz4xgQWtI6T72H Epk/TIu8pQ55uAEA9Bdnmu+ssbOVV72UmH4SObP8WMS8uvI8gYN0yYp5incLABOz9kj4 0O+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=cv7ptrkk; spf=pass (google.com: domain of linux-kernel+bounces-8385-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8385-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m14-20020a6562ce000000b005b8f61fcba6si1475961pgv.452.2023.12.21.04.55.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:55:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8385-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=cv7ptrkk; spf=pass (google.com: domain of linux-kernel+bounces-8385-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8385-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id AF948B25D29 for ; Thu, 21 Dec 2023 12:53:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D26F7A218; Thu, 21 Dec 2023 12:48:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="cv7ptrkk" 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 16EBE79475; Thu, 21 Dec 2023 12:48:46 +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=1703162924; bh=93ZKOVlrTVJQ0RvWV6bc6BLDjs7S1OZ1L+ZoHQabC8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cv7ptrkksutYRmpo8MnHwHmsY5ObfJ0q5g3+GHNYYFwn/gC0NK1AJBYKaz9fMQDWo Kl+LvuNPs2fCdiEsiRZaSCf0ehJaB9DtBAnsSAwOV3QaA6yFrUS3D4rMZqDVE9Xyto 0FrCEpdRAnn02ZBfF+We1e1oO5XRNBD89hYxdrhszU17vYtuppLJNzso/4UNnNzUT0 M8E1oUWLT01uLwKdHm2JxnpqWNXREkJpT3drdAnOC1JhEzvKDI1gi+rh9gQcVNyJMT xfwsqW7g2LUwrRAZEDjTOn4eaBNktswoccjnkGDg9kfCoRh8V63BKjaLyd+CYtudxa nJpraJBEM1YrA== 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 2ACA53781F84; Thu, 21 Dec 2023 12:48:44 +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 16/26] thermal/drivers/armada: Migrate to thermal_zone_device_register() Date: Thu, 21 Dec 2023 13:48:15 +0100 Message-ID: <20231221124825.149141-17-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/armada_thermal.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index f783547ef964..f48a776af147 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -864,8 +864,14 @@ static int armada_thermal_probe(struct platform_device *pdev) * into it, which requires the use of regmaps across all the driver. */ if (IS_ERR(syscon_node_to_regmap(pdev->dev.parent->of_node))) { + struct thermal_zone_device_params tzdp = { + .ops = &legacy_ops, + .devdata = priv + }; + /* Ensure device name is correct for the thermal core */ armada_set_sane_name(pdev, priv); + tzdp.type = priv->zone_name; ret = armada_thermal_probe_legacy(pdev, priv); if (ret) @@ -876,9 +882,7 @@ static int armada_thermal_probe(struct platform_device *pdev) /* Wait the sensors to be valid */ armada_wait_sensor_validity(priv); - tz = thermal_tripless_zone_device_register(priv->zone_name, - priv, &legacy_ops, - NULL); + tz = thermal_zone_device_register(&tzdp); if (IS_ERR(tz)) { dev_err(&pdev->dev, "Failed to register thermal zone device\n"); -- 2.43.0