From patchwork Tue Jan 30 11:12:44 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: 194008 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1143220dyb; Tue, 30 Jan 2024 03:18:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFl0Vmk12L2Wj9dgNMCTQvwnYChAayM/9BvBsN9bmpMIAMWbDKmzP5uC+2wtjpGJHOWhTib X-Received: by 2002:a5b:6d1:0:b0:dc6:ad45:3c51 with SMTP id r17-20020a5b06d1000000b00dc6ad453c51mr77896ybq.36.1706613492523; Tue, 30 Jan 2024 03:18:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706613492; cv=pass; d=google.com; s=arc-20160816; b=VngYjgrVmwJslTGoBU4yL2d9S1j+ol4omBBS6qEnbLoOU0/xd6PmF1lM9uBmkfDlXz 9BBUeEMDBmBDtCzfctUNqr4t6+UTCplAuBjgBNkuRCZ+mCLaTHcYMbgAYb3REeKaBu9e LvM5INNRX6LNH9vlQf+XzqkbWNumVu0aPjUn1TwNkCULjqINpEmhT6I03jm/Zu9f/END d+G+SEj/amdOZ6n/ZKXrvcsrHMvvOfril182J8U6n8751H0xaP3VnHxdbGnF7SV3L1yU XJDdMiOcNinHoNIgzfuKVF0f7nJVxmDeSK6ZKsfMs9Cr5fQUZiH+wQo/Q2JxUk/DMGm6 gu3g== ARC-Message-Signature: i=2; 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=kR4bT6La4b70SMhP+nILt+ylbLPQkhTEVxwDH/tj0vU=; fh=TdB2JcrCfYG//vC2U/jVG9IoBrdfnUybS1jSXf1pcBE=; b=nPzhE/VLl37mGeaKRcZY2ztAGtJg4IvrJc4jk/edVlipn6Qlho2h82h2S3y3pouK6n 8Hano6HTYmzjfjOoDaWzcKUGsTo3C2RMOEyNs8aU2fn8YKFzrrSAcImiYxANPj+BOVx6 eGSVPhwDvYJ/k0IlL7NR9uUFMHuRhMSmzAK71aLy28H4ZLKOEJWpcTW22/yJuDZ5qFM1 3WLhf1y8qfyKm2/KMp0J8mAxU3csbke6pxfjhzuZbmFsxx9eM67ol9bLGhcVwduATpXV sq/Z0X38VeL1SIApzVmrKlc64FzgSpURZlFUKhwkRAoi8kl+yWPQjdKmNa4fkD0dxNQa l+ag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=1lPMjJgz; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-44481-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44481-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pn22-20020a056214131600b00680f6edff7dsi9950710qvb.357.2024.01.30.03.18.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 03:18:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44481-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=1lPMjJgz; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-44481-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44481-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 518561C243A4 for ; Tue, 30 Jan 2024 11:18:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D9047690F; Tue, 30 Jan 2024 11:13:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="1lPMjJgz" 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 E0F6274E0D; Tue, 30 Jan 2024 11:13:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706613219; cv=none; b=NTmg5F1FQWf83lhqxDdjVXonyiSZsDSUnZw6mY6aZxBqcsMEHXImpA07CxQRWU0r2aL+0l7c8rcpeXV0FNO15ixX2RgLFXo4YYTJP6uX0Ze9pPrIIyHwfGI1r842Kk+UqZ409GASG1e4eThcZs0R3nLy6M7WufDEHRVtJSZOVHs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706613219; c=relaxed/simple; bh=jX8eexMy1avLh8dlPbkEyo4c5yBA7XPn/CK+R650NbY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FNVaqNxAXpB49wac9i9G/Vzsk/7M0p5ZowglsoYR6W1/Ubu4roTmCrn7AVqBYFtlSfhi9SY6JtRlrp6+aI8LvSeEpvib+aEqWz7CofqGFlaMHiXVJltpNCJ8aWjBzCP/VTtdFR3TzMHE3SpzSZNgMMtKQCT4QxBA32/2Pei29bU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=1lPMjJgz; arc=none smtp.client-ip=46.235.227.194 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=1706613216; bh=jX8eexMy1avLh8dlPbkEyo4c5yBA7XPn/CK+R650NbY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1lPMjJgzotfkB90XRVoWGZlENgOEHhc7wkebDfMVFSons4LdaXxnWLlgTJHquu3bj qUlJ/KqMhF7Uc0qtf1K+jYdXnrE7z+HcfdPmomI02IXIZHGrZCRVDj+2t+rZewbuW4 n598Lj0/FjURzHIjqSgv2/oqR1kf253bx9CdsfW0H9eSlo8+uPYsxDlPabyqpH1o8V L7Xr3HvHtpGH5eJVVzO2ReIXQrIQiIsz5zK4C7IKCz1Y3O847OruuGHb4hd4L2sJ+9 OcxXiixsSuIFTxXRN060iKRrO5hTnD7grEagsne3m7VK4O2rPBVmQmISKwnNEZXYX1 65zueO5ac3IxA== 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 7A9043782081; Tue, 30 Jan 2024 11:13:34 +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 12/18] thermal: int340x: processor: Migrate to thermal_zone_device_register() Date: Tue, 30 Jan 2024 12:12:44 +0100 Message-ID: <20240130111250.185718-13-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240130111250.185718-1-angelogioacchino.delregno@collabora.com> References: <20240130111250.185718-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789513949666753004 X-GMAIL-MSGID: 1789513949666753004 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 --- .../processor_thermal_device_pci.c | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c index d7495571dd5d..3170eab57e32 100644 --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c @@ -242,13 +242,19 @@ static struct thermal_zone_device_ops tzone_ops = { .set_trip_temp = sys_set_trip_temp, }; -static struct thermal_zone_params tzone_params = { - .governor_name = "user_space", - .no_hwmon = true, -}; - static int proc_thermal_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) { + struct thermal_zone_device_params tzdp = { + .tzp = { + .type = "TCPU_PCI", + .mask = 1, + .no_hwmon = true, + .ops = &tzone_ops, + }, + }; + struct thermal_governor_params tgp = { + .governor_name = "user_space" + }; struct proc_thermal_device *proc_priv; struct proc_thermal_pci *pci_info; int irq_flag = 0, irq, ret; @@ -289,10 +295,12 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev, const struct pci_device_ psv_trip.temperature = get_trip_temp(pci_info); - pci_info->tzone = thermal_zone_device_register_with_trips("TCPU_PCI", &psv_trip, - 1, 1, pci_info, - &tzone_ops, - &tzone_params, 0, 0); + tzdp.tzp.devdata = pci_info; + tzdp.tzp.trips = &psv_trip; + tzdp.tzp.num_trips = 1; + tzdp.tgp = &tgp; + + pci_info->tzone = thermal_zone_device_register(&tzdp); if (IS_ERR(pci_info->tzone)) { ret = PTR_ERR(pci_info->tzone); goto err_del_legacy;