From patchwork Thu Dec 21 12:48:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 182196 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp385525dyi; Thu, 21 Dec 2023 04:52:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQnObMoySAzGi74nGkWW6m0FgxwVczVwJ46TIViU5c7wRFWkX9D0lpwvFzZuO4Flxaq3Og X-Received: by 2002:a50:c316:0:b0:554:3d38:6305 with SMTP id a22-20020a50c316000000b005543d386305mr57675edb.9.1703163177137; Thu, 21 Dec 2023 04:52:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703163177; cv=none; d=google.com; s=arc-20160816; b=JguPQHH5s7vsJYw1nA0uO6YgM4d2Ak1itXcN6F5Tw32vmZ02qoEglR3QOvys0s4vRJ 1ztw+ekhnuwE/wG7ZGyqHPkgowIkniiXxr+7FxgPNudeyPK4+1djj/jXLG8A9MDPwmoT GNZ4rzzReTKoRkoxFll2wUwU2GJOnZtVsig+0E8j0+n0K1sBCt1tO7KHX/qqXhe4CDwJ wUWbS29VKS8B21vkfsSoRYx8iWxmpmfw1TR6GTUsPvLPaSzPLKEzKs96Genc1hCSdpC1 umUEidjE5CRCjPAWPAmX2HgFmR24W6U7xt4DEBDkxatrfqQyrrTCX8GSYIztX2qzF9cA 4mJQ== 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=+f/6CL6DE+fL+D6DLIFIJxWO9QLHFp4vmXoBQUmxtHM=; fh=tj3vwvS1joPqVAqhm025RI9FzN3aC+9rlGGIIVsXGr8=; b=uASjIXcE39Ghyk6q6VBPpBEnvjlwVla/e9cac1o9Cvtdrv8D9SLTQBR8Y/R2FZ2yTa 1q+jWwLuGTLW5GL8EkYlpYmBj2Y2v90JEJ69YkcXghtQO6+G4ZbSEl4oavL6CbfBbbHh Wn0dZIdZRKvyeDg9U0XDJVhYVMHdw+5Mfdnc7CJ/YhJT4CsdtjWaKl73KeiTFxubTyKq GGUT6Dhib6Fsgl4Z4SUlfNEfey5BGz4yq9KJTU3UoTjMAxZO8NYoz1gc4PmV1fiBNw2k L3tAwQVFYl/4NYJC4yciOizQtkXDN8S+XVNyxE0QPhLt1elsqjvAJoGQbR0gPGlxW3rE 48qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=qVC94pb6; spf=pass (google.com: domain of linux-kernel+bounces-8382-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8382-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c20-20020a05640227d400b0055344c8cfccsi845148ede.567.2023.12.21.04.52.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:52:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8382-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=qVC94pb6; spf=pass (google.com: domain of linux-kernel+bounces-8382-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8382-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 am.mirrors.kernel.org (Postfix) with ESMTPS id BB9371F25F29 for ; Thu, 21 Dec 2023 12:52:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E91FE7A20D; Thu, 21 Dec 2023 12:48:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="qVC94pb6" 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 F3EBD73183; Thu, 21 Dec 2023 12:48:43 +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=1703162922; bh=ets5nsuLlL8i2zc6z+9zFMpYPN9x47J3B6r/zyrf0o0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qVC94pb6NlGn9J1easJVCRLh0S7amPjKMQr1Hz0ix0GAY1zpO8002qwQ4e+yEcwiT Uh/+Lm2zTx6s6uSsb/GV6X8/oXMSgEGdbBwdjk9BfhAt6fylqZWPlwQBQh/ftLnVyT 6Ux63gwR4HWGbOGvDLBRxfX9senJxLWhGCbLLfQCxSjwpjZhyBlxiK5PiUovHK0EJ1 YVjzXD7ZbzRZY2DkMWAHlGumKiRmCbHzAzO+5LHgijH7zGTBBANkPN9xk1xXRpZytz pXq5mR2+L1xtFxgOcqcXuydCj+lVO72M9DA0ZkHKKUd6Wiv3C3+mbaLEfnjDXhYE0T yZQ5l3sS30BCw== 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 D1843378201A; Thu, 21 Dec 2023 12:48:41 +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 13/26] thermal: int340x: processor: Migrate to thermal_zone_device_register() Date: Thu, 21 Dec 2023 13:48:12 +0100 Message-ID: <20231221124825.149141-14-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785896031912470564 X-GMAIL-MSGID: 1785896031912470564 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 | 23 +++++++++++-------- 1 file changed, 14 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..1e7b9172e11d 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,17 @@ 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 = { + .type = "TCPU_PCI", + .tzp = { + .governor_name = "user_space", + .no_hwmon = true, + }, + .ops = &tzone_ops, + .mask = 1, + }; struct proc_thermal_device *proc_priv; struct proc_thermal_pci *pci_info; int irq_flag = 0, irq, ret; @@ -289,10 +293,11 @@ 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.devdata = pci_info; + tzdp.trips = &psv_trip; + tzdp.num_trips = 1; + + pci_info->tzone = thermal_zone_device_register(&tzdp); if (IS_ERR(pci_info->tzone)) { ret = PTR_ERR(pci_info->tzone); goto err_del_legacy;