Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp38451imn; Wed, 27 Jul 2022 14:31:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sTTOftUhnkUky598cnhJMJk1sVdI9NHiUAUkQsnQytlSTjisC2b8+hfDNLEt2LjHj4ymcp X-Received: by 2002:a63:1a4c:0:b0:416:1821:733d with SMTP id a12-20020a631a4c000000b004161821733dmr20134290pgm.444.1658957468496; Wed, 27 Jul 2022 14:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658957468; cv=none; d=google.com; s=arc-20160816; b=b3sEg+crEJjQux1/+xdn17PBN/VERvcf52Y1V3lR6G9CNdDd1tsZQEod/AZddqVncd u2Mmg3UeiVSz58tBBhqmTzfez3TZ53ZvwuNcO/CDr882JHYq+lvncMNhi5Bi2LiqR5cO XOWljjuc4xRWb2wBDW1Omm0Dq1zSXIjsncz5BdKMNk8RRq5tcUzQ0B5MOUDe0tezzw+z bGpuuCh4M329PmTXtEIhYvnltjHD73Rg0xvNbK1N1DlX9jqFYUha7kVGw4C1hai98YI1 XPxacKzCtNIH7O1KKZf1OpGgVrXHOp7tCWMYWkO8ETU6c4qEbZ6MTq/7YHqCHxbrtGJN aoLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kpAJvHnsGVgVYdV6CGwRXamKol+XLg/BJyowOdExSUs=; b=jfXWoyCMojkschN58TtTN8iwLgkSNvs9yh+vkLX/gbCjAECnsUXPdsiOrUp8s/NaTU ix7BdSbjpCKpzk9bOWK80OBCgKo454P7ob5zjVgSPO/eh6kU5mBfkUjMot1hfV/wS7+L EF0hcpJoua+9WwOn9voG63BPdtWxFAwuWlQ79KmwS2a0I5qMf65J165L10T88M4fGBDc 6QKQXfYbdCM7xjkb/NqIp524+/u12A3oZZCN5dcJNgo1+8rLfCi9CySleYTytcgUEwvG L1AWWCT57F7xTHNiHxlTHD2xL3bFjJuqq/9cALDnBAdCTTxw8ipfr9LM7uWQaa7IYY8k zGDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linexp-org.20210112.gappssmtp.com header.s=20210112 header.b=gBmx9wqQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x13-20020a170902ec8d00b0016bf943aeafsi13117243plg.28.2022.07.27.14.30.53; Wed, 27 Jul 2022 14:31:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@linexp-org.20210112.gappssmtp.com header.s=20210112 header.b=gBmx9wqQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237631AbiG0VGO (ORCPT + 99 others); Wed, 27 Jul 2022 17:06:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237007AbiG0VFo (ORCPT ); Wed, 27 Jul 2022 17:05:44 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC6EF6172B for ; Wed, 27 Jul 2022 14:04:21 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id w8-20020a05600c014800b003a32e89bc4eso92731wmm.5 for ; Wed, 27 Jul 2022 14:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linexp-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kpAJvHnsGVgVYdV6CGwRXamKol+XLg/BJyowOdExSUs=; b=gBmx9wqQLoqOz1G8d20izBhuJqPdHv57Lnkp1oGme86ifNa1BX5VaVX6Qxni4w11x0 M5zasePCyPuhkkRG7E4ecxaZtVm3iRm5eHLpLZPBANzAUDlBB29l7RG7wxAdPCjmW+K8 I3ErWXL6Gwezl/+usLr2NQm7fGLJM1fjDkrbCY+RZSK7VCNfKlRaiEg79sLuQ6TtiXWb BaaMSQ+T81j7SbXHZbGqpSl905NGyHTffwPDdGqHZXhrRr6lKrF0G2Z4cpEdNb8PTKnP aneAxR3IUSJHYeTylaPGo2J/cIAjCJMsSXhMh8D3cOr3wS1Ms7vEJsdwrjb8KMZlxRj3 Figw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kpAJvHnsGVgVYdV6CGwRXamKol+XLg/BJyowOdExSUs=; b=5Y29py/GyolYEuLjYpfaywYisUvHbdu24PKbxzDNQPI/UV7S383eqZHA3c+l7iWe7c omHH5ShT6Ruk0Obf78ZZuKpzAvzZKIJIstYXUDMQ1B2Wg3UQM1WckMuqGJrCsv2IO4Qj 0o9yK2eYHTXn6Fac6NMA1yu30STfrwASaPrRtNVAP/DLmt/h4uEa9kkmKqY2QLWdg0Xu bsj4efBl94xAWEFMjgQY8PknYWnngcn9zPjSmXKnmEYDGD3IWXQmzthC+aU6bQ8KXgfF OCQVGnwK/UCOHIo67HzL5jJbprjZ6RQ9D16rvNkj4cgLqPNg/FYGicNiMdinGhDaEE4+ GWLQ== X-Gm-Message-State: AJIora/vba/TsBk68h0waWgBA7jZlwannSWqnsSLIO959PNOO8Cix303 8T5E2JOsQg8ncHudUkRsaoqkDg== X-Received: by 2002:a05:600c:1d1b:b0:3a3:e2:42d1 with SMTP id l27-20020a05600c1d1b00b003a300e242d1mr4242428wms.137.1658955858007; Wed, 27 Jul 2022 14:04:18 -0700 (PDT) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:65a8:ebd8:4098:d9d0]) by smtp.gmail.com with ESMTPSA id h6-20020a05600c350600b003a38606385esm37908wmq.3.2022.07.27.14.04.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 14:04:17 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: rui.zhang@intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, abailon@baylibre.com, lukasz.luba@arm.com, broonie@kernel.org, damien.lemoal@opensource.wdc.com, heiko@sntech.de, hayashi.kunihiko@socionext.com, mhiramat@kernel.org, talel@amazon.com, thierry.reding@gmail.com, digetx@gmail.com, jonathanh@nvidia.com, anarsoul@gmail.com, tiny.windzz@gmail.com, baolin.wang7@gmail.com, f.fainelli@gmail.com, bjorn.andersson@linaro.org, mcoquelin.stm32@gmail.com, glaroque@baylibre.com, miquel.raynal@bootlin.com, shawnguo@kernel.org, niklas.soderlund@ragnatech.se, matthias.bgg@gmail.com, j-keerthy@ti.com, Dmitry Torokhov , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-input@vger.kernel.org (open list:INPUT (KEYBOARD, MOUSE, JOYSTICK , TOUCHSCREEN)...), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Allwinner sunXi SoC support), linux-sunxi@lists.linux.dev (open list:ARM/Allwinner sunXi SoC support) Subject: [PATCH v3 28/32] Input: sun4i-ts - switch to new of thermal API Date: Wed, 27 Jul 2022 23:02:49 +0200 Message-Id: <20220727210253.3794069-29-daniel.lezcano@linexp.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220727210253.3794069-1-daniel.lezcano@linexp.org> References: <20220727210253.3794069-1-daniel.lezcano@linexp.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Dmitry Torokhov --- drivers/input/touchscreen/sun4i-ts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c index 742a7e96c1b5..73eb8f80be6e 100644 --- a/drivers/input/touchscreen/sun4i-ts.c +++ b/drivers/input/touchscreen/sun4i-ts.c @@ -192,12 +192,12 @@ static int sun4i_get_temp(const struct sun4i_ts_data *ts, int *temp) return 0; } -static int sun4i_get_tz_temp(void *data, int *temp) +static int sun4i_get_tz_temp(struct thermal_zone_device *tz, int *temp) { - return sun4i_get_temp(data, temp); + return sun4i_get_temp(tz->devdata, temp); } -static const struct thermal_zone_of_device_ops sun4i_ts_tz_ops = { +static const struct thermal_zone_device_ops sun4i_ts_tz_ops = { .get_temp = sun4i_get_tz_temp, }; @@ -356,8 +356,8 @@ static int sun4i_ts_probe(struct platform_device *pdev) if (IS_ERR(hwmon)) return PTR_ERR(hwmon); - thermal = devm_thermal_zone_of_sensor_register(ts->dev, 0, ts, - &sun4i_ts_tz_ops); + thermal = devm_thermal_of_zone_register(ts->dev, 0, ts, + &sun4i_ts_tz_ops); if (IS_ERR(thermal)) return PTR_ERR(thermal); -- 2.25.1