From patchwork Tue Aug 23 12:42:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: thermal-bot for Lad Prabhakar X-Patchwork-Id: 599653 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38E5FC32774 for ; Tue, 23 Aug 2022 16:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231184AbiHWQWf (ORCPT ); Tue, 23 Aug 2022 12:22:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239399AbiHWQWG (ORCPT ); Tue, 23 Aug 2022 12:22:06 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6461C16D2F2 for ; Tue, 23 Aug 2022 05:43:00 -0700 (PDT) Date: Tue, 23 Aug 2022 12:42:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1661258578; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ahYNFggKQIJwMkStLbZZreeTVSKyok0C61PAas9QNSU=; b=RVWOo+m8/o4avYICl45E2UmLtJYWAsKqDnWaqIOR0uuTFCdJD5rsl+GFWisROp9qLjO5OI m5e+cT1m2jiXeXoJ6rKN0W8rm7XIBz0qZgBaxT3oVkzerIX9KiGxXvtXS2Oe8fV46LgL/C DfgtrmJoxFf7tVj9nRYWm5K3sQGc1liMF0CQpHz2vQTHXx+KjlFnZSJiroQ+0c2ojXkP5L iBG5I2CUncCq2Ri3kUOU0aokJSGbTRoatWfwNTye8kODLZ++Am6YtGX/EfBal3eGqqy92Z 31b/2sBCW/coMtrl43zgd23kaJdaMeDm2T60ZnTqFnr2BlNnegs6x49pxfGfrw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1661258578; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ahYNFggKQIJwMkStLbZZreeTVSKyok0C61PAas9QNSU=; b=uO8/aNtmnGRvRWhLz+kB0TBLUw9sHYmbHUx8veuhLvwHCduP4EZA41xNiyX1GrY7QXl8gl TCs/nF4S/WlVkUBA== From: "thermal-bot for Daniel Lezcano" Sender: tip-bot2@linutronix.de Reply-to: linux-pm@vger.kernel.org To: linux-pm@vger.kernel.org Subject: [thermal: thermal/next] thermal/drivers/maxim: Switch to new of API Cc: Daniel Lezcano , Daniel Lezcano , rui.zhang@intel.com, amitk@kernel.org In-Reply-To: <20220804224349.1926752-23-daniel.lezcano@linexp.org> References: <20220804224349.1926752-23-daniel.lezcano@linexp.org> MIME-Version: 1.0 Message-ID: <166125857757.401.2868022029936767844.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The following commit has been merged into the thermal/next branch of thermal: Commit-ID: ae11d6a87c3e742418baa591be1e719a95788059 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//ae11d6a87c3e742418baa591be1e719a95788059 Author: Daniel Lezcano AuthorDate: Fri, 05 Aug 2022 00:43:38 +02:00 Committer: Daniel Lezcano CommitterDate: Wed, 17 Aug 2022 14:09:38 +02:00 thermal/drivers/maxim: Switch to new of API The thermal OF code has a new API allowing to migrate the OF initialization to a simpler approach. The ops are no longer device tree specific and are the generic ones provided by the core code. Convert the ops to the thermal_zone_device_ops format and use the new API to register the thermal zone with these generic ops. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220804224349.1926752-23-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano --- drivers/thermal/max77620_thermal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/max77620_thermal.c b/drivers/thermal/max77620_thermal.c index 82d06c7..6451a55 100644 --- a/drivers/thermal/max77620_thermal.c +++ b/drivers/thermal/max77620_thermal.c @@ -44,9 +44,9 @@ struct max77620_therm_info { * Return 0 on success otherwise error number to show reason of failure. */ -static int max77620_thermal_read_temp(void *data, int *temp) +static int max77620_thermal_read_temp(struct thermal_zone_device *tz, int *temp) { - struct max77620_therm_info *mtherm = data; + struct max77620_therm_info *mtherm = tz->devdata; unsigned int val; int ret; @@ -66,7 +66,7 @@ static int max77620_thermal_read_temp(void *data, int *temp) return 0; } -static const struct thermal_zone_of_device_ops max77620_thermal_ops = { +static const struct thermal_zone_device_ops max77620_thermal_ops = { .get_temp = max77620_thermal_read_temp, }; @@ -114,7 +114,7 @@ static int max77620_thermal_probe(struct platform_device *pdev) */ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent); - mtherm->tz_device = devm_thermal_zone_of_sensor_register(&pdev->dev, 0, + mtherm->tz_device = devm_thermal_of_zone_register(&pdev->dev, 0, mtherm, &max77620_thermal_ops); if (IS_ERR(mtherm->tz_device)) { ret = PTR_ERR(mtherm->tz_device);