Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2191118imn; Mon, 1 Aug 2022 14:46:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR5W3jgWI56SxICg2K+1SMS8iDf03yqi7myJrNfywKiYVJYT+M5ue0bSqGTZtI6Yoo0Facj3 X-Received: by 2002:a63:40c:0:b0:41c:3dee:5475 with SMTP id 12-20020a63040c000000b0041c3dee5475mr2839216pge.385.1659390361942; Mon, 01 Aug 2022 14:46:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659390361; cv=none; d=google.com; s=arc-20160816; b=zIoSxINr55V3hUZNU8ahEzZfratAw3cJwTh7lidXRrkTm8MpyTovAjjkQhIdXb06YV SEcpTQoUPiaqK99xabQdFxXXzM4vfEeNMW7mK40F/9b9AMLwCuTu2JQHA2UeaU8jr0vV je4++oWSFaRyfgxg/UTSPagx/reLifUPnTtT++6g4KwxlFeBJq5EJsiCUhMrlWhbsxP5 jDNyiA1R0mbqo2QoYj99+5dExJ+ewX2S8hX0HkOtEJx3JMmEcV4Drozc/GOpM0+Ect9Q +VtnCpAwuTmYWh7PRtQQej7nEJ0F6dwX9Oe8pWqGN262ihSXtrOxqT+kAD1ccemwmD59 wJCA== 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=PbiU9PTGSxIxLyxRnO4IzbiwNyJlJbYE3xA4Gpyuiy+BtD6QULZ6DcEmM2sgzf2oio lHp1SJGRKP2y8YXig1dMxMwf8zSTELWrGZqBS3RWKNIiWICfKx0vz3jbiwuAU1pPqrpr p0Bk4Nx1qvFq12mETr/yCYEo/uyZEokQzlhncHlctOSHoV9FzTAjl+tN640Frn/j/fQd fIE+OrKw/3H7xDKrN8L/TJwydggjlStqb1m0ejLyX2JR8KDS0XF8FAGu/5D4pAGUGFkF 136KwD8KwMtVYPh43CexeEj2hwmwFD1/N80G2ntzGwESaQDYaF9HkahWBUJRLtjxlE50 4kTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linexp-org.20210112.gappssmtp.com header.s=20210112 header.b=F9Rp5XIf; 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 g68-20020a625247000000b0052d9d42a1f2si2429483pfb.158.2022.08.01.14.45.46; Mon, 01 Aug 2022 14:46:01 -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=F9Rp5XIf; 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 S235361AbiHAV0r (ORCPT + 99 others); Mon, 1 Aug 2022 17:26:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235059AbiHAVZe (ORCPT ); Mon, 1 Aug 2022 17:25:34 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81C9748E84 for ; Mon, 1 Aug 2022 14:24:14 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id l4so15625392wrm.13 for ; Mon, 01 Aug 2022 14:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linexp-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=kpAJvHnsGVgVYdV6CGwRXamKol+XLg/BJyowOdExSUs=; b=F9Rp5XIfTNsMRnVUYBaGtl9WsUFHBiNlkLG5UhGRqxRe0iTwGYk81ALUdZg+JpG/3G 85OitBnsTprwJCW8T0AS1CTGhKIGy+QfEXJSdHE0KZ6i3nyjb36u1nYai9GvGnW9X9O1 LAw+RZKjbidHFELCpadPbRpRY0/dJtc/UKPOhwWT8Cl9PHwn7UFL2AuWunjh3M5HiKtW wbIv6wjZ/U5AeLvlvK9ja8iH3Lz2xideY5d0taJEO4JLAORWwykIdxzfgn7j9JoGUEEn KrDGACM1Nl53w5ln23Vg97tgiiZClVdRTPD0uYjXnrehwshvrS/ZqHS/OMX5P9PfpGQz yeAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=kpAJvHnsGVgVYdV6CGwRXamKol+XLg/BJyowOdExSUs=; b=53XRZwdF0gEFnputk1ZCChrlvlzZna7JhRuNbHy6145YhB9nex/mHmRYo0+d2aSadE 3GeVWahvf/21s8sI3n6eZEGshAe1HOrY4d8LKBcw3NsswrZ/R/u8ba50Q02YcBuDoOt6 bEYC7tbNFZRaJIPVpaArUor4+ucIqc3UyFlaYoNW+xoFs7TaMoE60EqkMn9VSp+Ddd8C 99kPvuAzT5ZdQKEB3P8y4+uRziPVbJRYB5XIUy1Lo9uE5v+DCixTEIeo+mJNnWaPm2DW ftUX7slJoskcA2Vq3iGYz0oY2JNKJkxEZkP8UA+HFdnWS87ryGsjJE1isojF5hgNbMLg BmcA== X-Gm-Message-State: ACgBeo0oBBMqSjXrrdSvqYWYfXDgy1KN9skBBikXGVv+ydS6Oteycm+I oEpT+iKO+jOAzt3XCteATyK3zA== X-Received: by 2002:a5d:47c4:0:b0:21f:f34:56fd with SMTP id o4-20020a5d47c4000000b0021f0f3456fdmr10744222wrc.585.1659389052349; Mon, 01 Aug 2022 14:24:12 -0700 (PDT) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:d00:ceb8:9c09:1302]) by smtp.gmail.com with ESMTPSA id c7-20020adffb07000000b0021e501519d3sm12995285wrr.67.2022.08.01.14.24.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Aug 2022 14:24:12 -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 v4 28/32] Input: sun4i-ts - switch to new of thermal API Date: Mon, 1 Aug 2022 23:22:40 +0200 Message-Id: <20220801212244.1124867-29-daniel.lezcano@linexp.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220801212244.1124867-1-daniel.lezcano@linexp.org> References: <20220801212244.1124867-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=ham 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