Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4360418rwb; Tue, 6 Sep 2022 06:32:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR5p+Bb5SqF2ytIk+JmQu4rMO1lxBoPJqYT2iNQSoKVEckH2iOOcrF/S11C1yj66sv0wDaW5 X-Received: by 2002:a05:6402:190e:b0:43e:1588:4c32 with SMTP id e14-20020a056402190e00b0043e15884c32mr47225134edz.76.1662471156838; Tue, 06 Sep 2022 06:32:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662471156; cv=none; d=google.com; s=arc-20160816; b=ji2S4X9zKazQNhabCH/DmtVSGCadzObvvt5L6XGKbF0YYfdj7LtGDB16xKEgGhNccg ijEkSuXehQPL//81yiZ7usd0Qy8wfpRk/PAJEUhKOYFDMfZtptIQKx4SvGiDn2oRel4H Pp3rDvlcr52XD5hLNoJ+sd/KXgpHqFe21RpB75jxkL0EIPOnQhXqHaNxzfl0oU/V/2Bo OH7SXxYmbKRrlFYS6/rTPcDR4r8u9nryy5pcn/9d6j1CxVA9PPgrYiQVVNI9KXTVo3bn tTgoHMhWtWDomk1/5YHz1fV6QHo+bd7nFVgM3Znu0ElKiogeP8OtuVdUlkQWWm6NRYht kS1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=QuMl9ylHqrJNpYC9Zy1Hn46/Zh0GzxUk8rmgYhEZ1y0=; b=Uc/P+BPrtgoiScE+3P/n847yybMWNNNiYTS4+CO78K+fWWOPcmiR4aW5WeSEKMFfcb UnHyvt3d7fZo5JV+mIbJG8UGQ7FR0v2uGoZ1VHGsmgh0QTeYTF/0OyUanowu3qynRI2H 4AH0L+vuddawjpPh0/VOZyzCe147HXLhxT84JygZG8vl77ae+it2BLPW2L6KhxtN3u7q no/ZiilzLHTY1JcuBwRPLnXsWMJEOvhpHUc6K91si1hw92Tmn9pleZgLjEm//kWCNGFh imDLOnR5vTU94/jXUlHNBN8qPszEB+yoSQ41QD/idMWPBeIIGhrJfeCKRp0sB02xw1ER KpJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=mOY7c50k; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wy1-20020a170906fe0100b0076f4466cde5si980865ejb.488.2022.09.06.06.32.00; Tue, 06 Sep 2022 06:32:36 -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=pass header.i=@collabora.com header.s=mail header.b=mOY7c50k; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240358AbiIFNLX (ORCPT + 99 others); Tue, 6 Sep 2022 09:11:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240145AbiIFNLT (ORCPT ); Tue, 6 Sep 2022 09:11:19 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 831C3659F8; Tue, 6 Sep 2022 06:11:11 -0700 (PDT) Received: from [192.168.2.145] (109-252-119-13.nat.spd-mgts.ru [109.252.119.13]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id B80DF660037F; Tue, 6 Sep 2022 14:11:06 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662469869; bh=5QO1SLp5eg80ObSSt8FLqmBTFoFhiD0BogISlBa9BUQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mOY7c50kE5+Xmrb35k079cHSMFkYyUhYJe+5NjUUjK8ZUXDK2Cj5ao5UFUt6ANYUq MbENZTEK+MC3hZgppOROxiXeWrvpQjkxT6YjcoMgmWubysUlbKG77vCqaEkWRDRal9 XXpS0HpF4+46bmoLB10JvyBEUVX9ZdQGSREbTyPXFsZn6YfaEG5VzCQDo8FnzKShL+ XBdK7rg58ksb9EzHK9Ozg4bd0EY8Yc3pKrEVM3aopMr0XqtFVapzbd8WRV3eV8G+7D kXDLzfz9Muog+VR73hD4bNVxPc1EBMTiMUwEjla1rHk5Sro9Q91O0seQeTlmhd+iQq 3CWCI7wojCwxQ== Message-ID: Date: Tue, 6 Sep 2022 16:11:03 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v5 07/33] thermal/drivers/tegra: Switch to new of API Content-Language: en-US To: Daniel Lezcano , 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, Amit Kucheria , Mikko Perttunen , "open list:TEGRA ARCHITECTURE SUPPORT" References: <20220804224349.1926752-1-daniel.lezcano@linexp.org> <20220804224349.1926752-8-daniel.lezcano@linexp.org> From: Dmitry Osipenko In-Reply-To: <20220804224349.1926752-8-daniel.lezcano@linexp.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 8/5/22 01:43, Daniel Lezcano wrote: > diff --git a/drivers/thermal/tegra/tegra30-tsensor.c b/drivers/thermal/tegra/tegra30-tsensor.c > index 05886684f429..c34501287e96 100644 > --- a/drivers/thermal/tegra/tegra30-tsensor.c > +++ b/drivers/thermal/tegra/tegra30-tsensor.c > @@ -159,9 +159,9 @@ static void devm_tegra_tsensor_hw_disable(void *data) > tegra_tsensor_hw_disable(ts); > } > > -static int tegra_tsensor_get_temp(void *data, int *temp) > +static int tegra_tsensor_get_temp(struct thermal_zone_device *tz, int *temp) > { > - const struct tegra_tsensor_channel *tsc = data; > + const struct tegra_tsensor_channel *tsc = tz->devdata; > const struct tegra_tsensor *ts = tsc->ts; > int err, c1, c2, c3, c4, counter; > u32 val; > @@ -217,9 +217,9 @@ static int tegra_tsensor_temp_to_counter(const struct tegra_tsensor *ts, int tem > return DIV_ROUND_CLOSEST(c2 * 1000000 - ts->calib.b, ts->calib.a); > } > > -static int tegra_tsensor_set_trips(void *data, int low, int high) > +static int tegra_tsensor_set_trips(struct thermal_zone_device *tz, int low, int high) > { > - const struct tegra_tsensor_channel *tsc = data; > + const struct tegra_tsensor_channel *tsc = tz->devdata; > const struct tegra_tsensor *ts = tsc->ts; > u32 val; > > @@ -240,7 +240,7 @@ static int tegra_tsensor_set_trips(void *data, int low, int high) > return 0; > } > > -static const struct thermal_zone_of_device_ops ops = { > +static const struct thermal_zone_device_ops ops = { > .get_temp = tegra_tsensor_get_temp, > .set_trips = tegra_tsensor_set_trips, > }; > @@ -516,7 +516,7 @@ static int tegra_tsensor_register_channel(struct tegra_tsensor *ts, > tsc->id = id; > tsc->regs = ts->regs + 0x40 * (hw_id + 1); > > - tsc->tzd = devm_thermal_zone_of_sensor_register(ts->dev, id, tsc, &ops); > + tsc->tzd = devm_thermal_of_zone_register(ts->dev, id, tsc, &ops); > if (IS_ERR(tsc->tzd)) { > if (PTR_ERR(tsc->tzd) != -ENODEV) > return dev_err_probe(ts->dev, PTR_ERR(tsc->tzd), Tested-by: Dmitry Osipenko # Nexus7 -- Best regards, Dmitry