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 X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C828C433E9 for ; Mon, 8 Mar 2021 12:01:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA41D64D92 for ; Mon, 8 Mar 2021 12:01:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231558AbhCHMAk (ORCPT ); Mon, 8 Mar 2021 07:00:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229965AbhCHMAY (ORCPT ); Mon, 8 Mar 2021 07:00:24 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5009FC06174A for ; Mon, 8 Mar 2021 04:00:24 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id e10so11109633wro.12 for ; Mon, 08 Mar 2021 04:00:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UScq4Ry4BV1D3nVvylBLbHnwm8LDSH9/8urnS48OvlE=; b=oI5QNIlnIG33NqNlfQkK297Hfx5vX+/l84Rk7wJFB7UKvcQpF50Vnt3lwymKoFkJFq grR1s1Im48ws0tnbCKJuH1Ky5HKftCNhpncBnFtLvs796N5fxbmD9hk8wfhbzrL74FL4 8o0FRJTSZpwXA4kybaeej54XVvBFqUOv6ZXpLJd4IjfhE9/ICMUKGLWlXihtdOpT+oML jBVnz0zL5fb7pbqgllEyp/fjB3QqXhdeRwfMUg3EMqbkznPrg34sNBnjVhqMow4B8HPE tkfIaMuQtrxvFVS1HV4qNsYeV0/ybzlx9s1Y14KRuLP4azf1H4/xhg0VIY4wwvcqz+3a /64A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UScq4Ry4BV1D3nVvylBLbHnwm8LDSH9/8urnS48OvlE=; b=GvtBoylTpy+/5AFsAmi9HsDNWEXs2rNK262Mob5LzDnm5dJeCRHPB25eKCfOudLhl5 pqT2Yo32KEUeOe77Qk0xtvgz32EqR6Y1g8M0BeIQDHkZlpVsrg/TseAItqHt3pJpZWyt LvzSyay5Zg9ww87rAcXFuYpfPiqgbsuIj5tJA1sZed0hm0LCaoejW1S9nUrR8iiy3rXc rX4jZRZQUhTP5PPDFe8ZWHbJJQeDldeATCqCltqLQVWcqWKKeMQFTpRvtNPelS0wFPpU mJCcbZ8rzgjUlCSs40hz5pipDrNkeijb2Hu9Rm4b0unYX+aeapM7Gt3Zdala7VTZ0P2Z E1tA== X-Gm-Message-State: AOAM530yMFR59OWaYhgPl8EELYH/f2hj/o1aOfVQN3kayKhM5c3lj85X +M2em5FNt9/EnqM93ZZLSifkIw== X-Google-Smtp-Source: ABdhPJxBWzV9hIdD/ppivptyrR1Q/BbH6VDl/2J8QOWvz7pwtbP9BUzgcUex4ERGvaxlxqzx0o7WTA== X-Received: by 2002:adf:e38a:: with SMTP id e10mr22674462wrm.37.1615204822703; Mon, 08 Mar 2021 04:00:22 -0800 (PST) Received: from ?IPv6:2a01:e34:ed2f:f020:60f3:8fc:7d4b:c2d9? ([2a01:e34:ed2f:f020:60f3:8fc:7d4b:c2d9]) by smtp.googlemail.com with ESMTPSA id p18sm21700615wro.18.2021.03.08.04.00.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Mar 2021 04:00:22 -0800 (PST) Subject: Re: [PATCH v5 1/4] PM / devfreq: Register devfreq as a cooling device on demand To: Lukasz Luba Cc: cwchoi00@gmail.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, steven.price@arm.com, MyungJoo Ham , Kyungmin Park , Chanwoo Choi References: <20210308091646.28096-1-daniel.lezcano@linaro.org> From: Daniel Lezcano Message-ID: Date: Mon, 8 Mar 2021 13:00:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/03/2021 10:53, Lukasz Luba wrote: > Hi Daniel, > > In general the approach is good. If there is a special GPU driver, which > would like to provide 'struct devfreq_cooling_power *' it would leave > 'is_cooling_device=false' and register manually: > devfreq_cooling_em_register(df, dfc_power); > > Please find only a few minor comments below. > > > On 3/8/21 9:16 AM, Daniel Lezcano wrote: >> Currently the default behavior is to manually having the devfreq >> backend to register themselves as a devfreq cooling device. >> >> Instead of adding the code in the drivers for the thermal cooling >> device registering, let's provide a flag in the devfreq's profile to >> tell the common devfreq code to register the newly created devfreq as >> a cooling device. >> >> Suggested-by: Chanwoo Choi >> Signed-off-by: Daniel Lezcano >> --- [ ... ] >> +    struct thermal_cooling_device *cdev; > > The linux/thermal.h for 'cdev' would be needed in this header. May be just a forward declaration ? struct thermal_cooling_device; >> + >>       struct notifier_block nb_min; >>       struct notifier_block nb_max; >>   }; >> > > With this small changes: > > Reviewed-by: Lukasz Luba > > Regards, > Lukasz -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog