From patchwork Thu Dec 21 12:48:04 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: 182187 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp384234dyi; Thu, 21 Dec 2023 04:50:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9QbLU92sZ+D2u9i+vNzi7A9ln75eNPI+PLuzEkJypxpj4qNhKNUR/i8z1kZUO9k425sdK X-Received: by 2002:a05:622a:1352:b0:423:7062:8120 with SMTP id w18-20020a05622a135200b0042370628120mr28854515qtk.49.1703163023083; Thu, 21 Dec 2023 04:50:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703163023; cv=none; d=google.com; s=arc-20160816; b=sEBIW9ExwHvrPAYYyBSlHzYd6TpkJiYHDlhgwsyeYO3NWwO0RtYjmDFVZXpa4QkhND IVuxMDG4yF0ByYejup8s8jEajeDu47USmjviZ6r4A8nIrK/ZbbXB4C6ZtXlQd1PIkhZ2 HUQ/v0AXMhh6rUYh8Igdsa4Yg2ySHzsG8snGhho1x/m9OYI2HTR/T3tF4cAtgFyeLZNW g9tvnXUCgccgbF3XxCEcMp5QqlbQJbTDlxfGsmUkv7pgU/ccPAEXSmcvrFY0farLIVZN 0ZXxXwj4XqHKgjBl1Sg2B85fkN7zhv+cZfIp47PbwI4cWXBxVdJ/O4EsMLspwYpD71ju L+8Q== 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=lgwe8OPxC0+WfW87ZaCNGB9zRBo9XLtZg6nzBoJnTJo=; fh=tj3vwvS1joPqVAqhm025RI9FzN3aC+9rlGGIIVsXGr8=; b=ZF+qq5qXsuPDp+mqj4/YTxqXNouwqs9cTssUy+mZUBNrdeUn/iY2E8KOsTx98+JajT vI726hboxz7kDpancPccwLoPiyBYqWhth9KEa+Gqzz2JPY3rVpJg+ijTyNdK9Mth3rFV GBnE+yXRZ71A+uoAGncGYqz1+pfzqeIBscpqLBenlWvqOAQ1QWFXbWL/fHC/fE73lG1s eIVlWOeAtZAx2F6S3pF/PRPAZD21yeq/NVRPvezuCSxiemi9u40MvtgINEdFR/hW2KWj 4DUkJT67xyZPveTxUm4/nV8/HID1E1HHAyrP+uD2hvOwrXjp4ZhFhl5bmp7mPqzcShTr jTng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ikf7JBCI; spf=pass (google.com: domain of linux-kernel+bounces-8372-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8372-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 d13-20020ac85d8d000000b004278fb8875esi2008790qtx.243.2023.12.21.04.50.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:50:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8372-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=ikf7JBCI; spf=pass (google.com: domain of linux-kernel+bounces-8372-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8372-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 D64251C23C11 for ; Thu, 21 Dec 2023 12:50:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E961976DDE; Thu, 21 Dec 2023 12:48:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="ikf7JBCI" 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 02E93745DB; Thu, 21 Dec 2023 12:48:37 +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=1703162916; bh=YEdNV8O2ZLegd5j1TKwdVy1YO9G9N8uipcA77IFh0Is=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ikf7JBCIVuDx0XjW6bUxY8Km5aIJDQ0XVnXJ8lQ36aoi766ELdxsB9EjkDO/RXatK ofv6xc4Mu6qQdHFKgX1VE2dG/tQRgRISGBwDP4DZWHvr+xVGEXEsnTVUq5T0BzjVwu gRfmVPYft4GxC12Qh4SIBw9y5C252zsnYFwj/FGg6MXUr8x1MGTJrA16vt/7/Mb2AT 7SOGuT5B4b9sD46GOOVn3nO2zcbfMLXbIEYuqKckclPsSHUgfgXbMcDJx6n2WLATHR 7h9DIEF1E/zrcCkQTYYAnYN1jubLUGdr1yulKU89WZ7duUddfwGvBWMfz7x2xTmYle YoXgaKji/gC0Q== 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 AB43C3782001; Thu, 21 Dec 2023 12:48:35 +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 05/26] thermal/drivers/da9062: Migrate to thermal_zone_device_register() Date: Thu, 21 Dec 2023 13:48:04 +0100 Message-ID: <20231221124825.149141-6-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: 1785895870049990908 X-GMAIL-MSGID: 1785895870049990908 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/da9062-thermal.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/da9062-thermal.c b/drivers/thermal/da9062-thermal.c index 160d64913057..10b1fe74c43e 100644 --- a/drivers/thermal/da9062-thermal.c +++ b/drivers/thermal/da9062-thermal.c @@ -158,6 +158,11 @@ MODULE_DEVICE_TABLE(of, da9062_compatible_reg_id_table); static int da9062_thermal_probe(struct platform_device *pdev) { + struct thermal_zone_device_params tzdp = { + .ops = &da9062_thermal_ops, + .trips = trips, + .num_trips = ARRAY_SIZE(trips), + }; struct da9062 *chip = dev_get_drvdata(pdev->dev.parent); struct da9062_thermal *thermal; const struct of_device_id *match; @@ -196,10 +201,11 @@ static int da9062_thermal_probe(struct platform_device *pdev) INIT_DELAYED_WORK(&thermal->work, da9062_thermal_poll_on); mutex_init(&thermal->lock); - thermal->zone = thermal_zone_device_register_with_trips(thermal->config->name, - trips, ARRAY_SIZE(trips), 0, thermal, - &da9062_thermal_ops, NULL, pp_tmp, - 0); + tzdp.type = thermal->config->name; + tzdp.devdata = thermal; + tzdp.passive_delay = pp_tmp; + + thermal->zone = thermal_zone_device_register(&tzdp); if (IS_ERR(thermal->zone)) { dev_err(&pdev->dev, "Cannot register thermal zone device\n"); ret = PTR_ERR(thermal->zone);