From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7EF46C00140 for ; Sun, 31 Jul 2022 12:04:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Iyo5pYtqNiMWCDa6aO6TUqFjfrUJA4G1+3IZ8DTJjrc=; b=mwju6BLsEkouzL IalYR9yig2q1Y+vwLVY569ksTPNOTUwGK1bOYJG9xLsfSOAUtLzwWMnvWFSq6WmnWPFl2cf/OC/Xr 8OYLpR830yP47mkEnrIONooR2vm/5EWiYrv/UoB4I4d8nOYAxqgjXdb3tTO7nPux5XJtNkf/ujx4L VZatrlSHbwMMneTHRe4wHfuoLWB//bpgvc+6j5uMO0ciWER/ANcOObgoHyCJ0ONaZ1KfE4EekWrul u4NcI6B1NvtyjIjd5j58KNqpqO6Ov0FK7tVqpS6EhSio7Clk1lrUDovz2+YadWamH+C617AwBxZ6Q 4N4e7/liwls20VIf/Kog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oI7fP-00C0gu-1g; Sun, 31 Jul 2022 12:03:31 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oI7fL-00C0du-MR for linux-arm-kernel@lists.infradead.org; Sun, 31 Jul 2022 12:03:29 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A188AB80D22; Sun, 31 Jul 2022 12:03:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E52CC433D6; Sun, 31 Jul 2022 12:03:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659269003; bh=dgiL09k3fn1iAi1x9FpXJw4FrC+NXMosnHbICt8S4Zs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JHQK9Pl3O8Vnrcfj3/YDIY+pWrMUG0hvj6nyIrkJ7tCFKK21Ncfec/QzojLSvDARe lr7o0yzRQLgJPTbozA0g4qVRpxpOVddLE8Cbk9bzVU5MVbHHq3GPtsHTbYZl+9Bp0x RDTc1fS9WNoDB3Z8Pa/hIeAwaidUaAqlEksqllwiqwL//DTKNHkAhEk9KcBqzekef6 MD/ktPdll/uLze02Gb3/vqdV89Tavmope2E223OB+k63KAOZoOjKqc8X7sTGh7Gob3 M3mQ4WKjwtOvXcsR/5y3dwsDMSuzK0agZtMtpBgA+MZ+XvgS1rGY9M64kPie3Rr9f7 Grz3f+dzYSQIA== Date: Sun, 31 Jul 2022 13:13:28 +0100 From: Jonathan Cameron To: Daniel Lezcano Cc: daniel.lezcano@linaro.org, rafael@kernel.org, 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, Lars-Peter Clausen , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-iio@vger.kernel.org (open list:IIO SUBSYSTEM AND DRIVERS), 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: Re: [PATCH v3 27/32] iio/drivers/sun4i_gpadc: Switch to new of thermal API Message-ID: <20220731131328.7301de32@jic23-huawei> In-Reply-To: <20220727210253.3794069-28-daniel.lezcano@linexp.org> References: <20220727210253.3794069-1-daniel.lezcano@linexp.org> <20220727210253.3794069-28-daniel.lezcano@linexp.org> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220731_050328_060042_D4F2FE51 X-CRM114-Status: GOOD ( 26.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 27 Jul 2022 23:02:48 +0200 Daniel Lezcano wrote: > 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 Whilst making no pretence at having checked what the new calls do, I'm fine with this patch affecting the driver in IIO and going through appropriate thermal tree. Acked-by: Jonathan Cameron > --- > drivers/iio/adc/sun4i-gpadc-iio.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c > index 2d393a4dfff6..13d1e937357c 100644 > --- a/drivers/iio/adc/sun4i-gpadc-iio.c > +++ b/drivers/iio/adc/sun4i-gpadc-iio.c > @@ -412,9 +412,9 @@ static int sun4i_gpadc_runtime_resume(struct device *dev) > return 0; > } > > -static int sun4i_gpadc_get_temp(void *data, int *temp) > +static int sun4i_gpadc_get_temp(struct thermal_zone_device *tz, int *temp) > { > - struct sun4i_gpadc_iio *info = data; > + struct sun4i_gpadc_iio *info = tz->devdata; > int val, scale, offset; > > if (sun4i_gpadc_temp_read(info->indio_dev, &val)) > @@ -428,7 +428,7 @@ static int sun4i_gpadc_get_temp(void *data, int *temp) > return 0; > } > > -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_gpadc_get_temp, > }; > > @@ -637,9 +637,9 @@ static int sun4i_gpadc_probe(struct platform_device *pdev) > pm_runtime_enable(&pdev->dev); > > if (IS_ENABLED(CONFIG_THERMAL_OF)) { > - info->tzd = thermal_zone_of_sensor_register(info->sensor_device, > - 0, info, > - &sun4i_ts_tz_ops); > + info->tzd = thermal_of_zone_register(info->sensor_device, > + 0, info, > + &sun4i_ts_tz_ops); > /* > * Do not fail driver probing when failing to register in > * thermal because no thermal DT node is found. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel