Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2973495iog; Mon, 20 Jun 2022 08:33:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sZ5oyrPIUfMk33fDtfdJqzFByizUXLjuXky/AXfvVEERsq/xAq8v1Ca+SOsr+uphi+BYof X-Received: by 2002:a17:907:16ab:b0:711:f0dd:91c with SMTP id hc43-20020a17090716ab00b00711f0dd091cmr20900532ejc.575.1655739212562; Mon, 20 Jun 2022 08:33:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655739212; cv=none; d=google.com; s=arc-20160816; b=nedjOWoPae6A67Iudab7eEvXQRlFzwiJnUIxCsSQtqLCp7nLXGlYJXTLDWc6PCE09h 0qWTUHBN4WLoB/R0KffYs0W35O0yk8POZyyJiaoQg4IbhWIPvG20605CHsJtAlam5X0p kdqKGuMgzgjOwrIL4BdTU++lbm3ERrjTOidYubVusUxCSIEzCBEynYvd44uXxhOHZ3oM mebP2LFa7XCAdeytpIAx04lDE13ZTuA5GIzgqjPpZKjDNsOVkCrSItB6KYY79NPWCoJe k+C8ZvBfIJubWhAb06Tmxe5xQMUsRFtV5CdyMtiW41GeU2vHh+OLE0M48A4j32esL/Ru c2Tg== 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=zrL5Ko404zTn2sYJajwJygSYjcByLv+eeU7NKJf9fRQ=; b=f1gzwhP0X8YqMVKRRAI5D8MxbMZ1gENVGmkp2ye9ymhgSFLNl1uZosXmpZXVhZyEpg JtgqoWr6mXvcm8aWanjpWQ5r+bFqA1MicnLc4n/5HQCQCHXX9htUhBeLnOL2SGILz+Ug I2CMG7dlUTyJgOUnJvWdAkIiEMtgUY4Y/534sKzAz0I2G2dg8+awmCEdQ3vZb99dq4R8 Dyj3hC0coHtk4VnU1nReAcxKU3docdKPaVa1xRBCk9E19TswvAkxhr5BemEGRgPDVy7y mEyPMyY4KxOPoQLEM8ZXLaVQVdHEOdN3dhTK1GxzD2yLx8C3ApgKYFS9BYmHw4JSNpJf kJIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dj0IODvl; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id et11-20020a056402378b00b004357d86c16csi4281284edb.191.2022.06.20.08.33.04; Mon, 20 Jun 2022 08:33:32 -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=@linaro.org header.s=google header.b=Dj0IODvl; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242154AbiFTPWt (ORCPT + 99 others); Mon, 20 Jun 2022 11:22:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243945AbiFTPWh (ORCPT ); Mon, 20 Jun 2022 11:22:37 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44280BBD for ; Mon, 20 Jun 2022 08:17:13 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id v14so15144148wra.5 for ; Mon, 20 Jun 2022 08:17:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=zrL5Ko404zTn2sYJajwJygSYjcByLv+eeU7NKJf9fRQ=; b=Dj0IODvlLKHMAhfvaoGfnoMmAfAx3IOmxYS3nagMCoZlJWf//OmKMweRJAErq381Dg urx+BkuXRjugobs2/XkV1aNZ7IGzadwGxZ4jhcVrMO8ifQb4O7PuAXhzk9eNrv+xjh0O hSR40o7ZIvUpJb10nMzwzZskS1ucP+EXvrPdbpRwgnxWQUU6qWNJlgRFZl2xtwWrBSBS xWL9gKfBPkpuaTf2nA1fq1hK0zlH/btnEs5CXeVr/+CTAybALZVYEC6vbgHbI1vkHcPA Wucy2Q32Te47VAHjUkD8lk7giyDh5OwUg97POcuszq/PeL7Y5asHC5KonSvDPTLJZo2Y Za+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=zrL5Ko404zTn2sYJajwJygSYjcByLv+eeU7NKJf9fRQ=; b=xb+Ma0Hku0gv1yQ7RjbFthhKMYpu+qu5ofOJRS6SFw/ImpOI4C+AnpnoLHyiYDsaTJ plPw9vadvq4MB3wEnl6tb+KsdL+oXcOkXyLzf9WRl5aodTsYzD6jqJ6j4Z52Ab0slOS/ uO9MhVhJ9LNDSrrRWsfbx+nynuHDncsh1N7WCWjl5C4uAUDZrurQVJ/puIFVxrBUal1w Q0rosY7jiwnkKymq/LMBNURuS7l3O7JrjO/3HN4rJk5ZHTK16EDlIzB3+skjxQVgozHU tayY9KcsVxCj4tzRsMGyY8MHRY9ufVLHQFrpnu4cMz5dtiRRKEdOgvp+UtzPRBdsyRhE WNZg== X-Gm-Message-State: AJIora83M3yVE4vc28hsDKuVPzDR+r3S3wjlFtcZIw8gRim8BRfMT7o2 g/Wz+JHfe8JB9Vsmod3il0QBCg== X-Received: by 2002:a05:6000:1686:b0:219:b932:ffba with SMTP id y6-20020a056000168600b00219b932ffbamr23977107wrd.227.1655738231674; Mon, 20 Jun 2022 08:17:11 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:1c7:92c1:7b6f:f9? ([2a05:6e02:1041:c10:1c7:92c1:7b6f:f9]) by smtp.googlemail.com with ESMTPSA id i9-20020a05600c354900b003975c7058bfsm15724611wmq.12.2022.06.20.08.17.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jun 2022 08:17:10 -0700 (PDT) Message-ID: <20db85cb-1d16-3aad-c9b0-0a2a602f20ec@linaro.org> Date: Mon, 20 Jun 2022 17:17:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 2/3] thermal/drivers/tegra: Remove get_trend function Content-Language: en-US To: Dmitry Osipenko , rafael@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Amit Kucheria , Zhang Rui , Thierry Reding , Jonathan Hunter , "open list:TEGRA ARCHITECTURE SUPPORT" References: <20220616202537.303655-1-daniel.lezcano@linaro.org> <20220616202537.303655-2-daniel.lezcano@linaro.org> <6d5b2bfc-f449-668c-8c97-638eb806cb66@gmail.com> From: Daniel Lezcano In-Reply-To: <6d5b2bfc-f449-668c-8c97-638eb806cb66@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, 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 18/06/2022 14:44, Dmitry Osipenko wrote: > 16.06.2022 23:25, Daniel Lezcano пишет: >> The get_trend function does already what the generic framework does. >> >> Remove it. >> >> Signed-off-by: Daniel Lezcano >> --- [ ... ] >> static void thermal_irq_enable(struct tegra_thermctl_zone *zn) >> { >> u32 r; >> @@ -716,7 +685,6 @@ static int tegra_thermctl_set_trips(void *data, int lo, int hi) >> static const struct thermal_zone_of_device_ops tegra_of_thermal_ops = { >> .get_temp = tegra_thermctl_get_temp, >> .set_trip_temp = tegra_thermctl_set_trip_temp, >> - .get_trend = tegra_thermctl_get_trend, >> .set_trips = tegra_thermctl_set_trips, >> }; >> > > The framework doesn't use the trip temperature, is it really the same? > Previously, if temperature was above the trip and was dropping, then it > was THERMAL_TREND_STABLE instead of THERMAL_TREND_DROPPING. Actually, the only difference is the temp > trip and the temperature < last_temperature. It results in the STABLE trend and the governor does nothing. With the core trend function for the same inputs, temperature < last_temperature results in a DROPPING but as temp > trip the 'throttle' boolean is true in the governor, and get_next_state() with DROPPING + throttle=true, results in nothing because the action happens when throttle=false. All the combinations result at end at the same action from the governor. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog