Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp995454ybz; Wed, 29 Apr 2020 13:06:06 -0700 (PDT) X-Google-Smtp-Source: APiQypJBPeAl8zQcNvC71PHbyrxSj/1tJve1aVOU3IcNeGslreIf7S4blf2aUJPPVBr330bsOCRb X-Received: by 2002:aa7:c306:: with SMTP id l6mr4139952edq.356.1588190765932; Wed, 29 Apr 2020 13:06:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588190765; cv=none; d=google.com; s=arc-20160816; b=BK5jwuAEhYinSxgP9I8IzW/26+eIQC99hsXRZXveeiTfbGxB7aA8cut04rWXduJ7Rh hEEnZaFRWprXhLItVAltO7yjRBiTi1jmRXz+j1XpoEjiim05DmqDAVggIzPZNYj4Aj7C mvd9o3ploefaZSxRJmgZu5bE1SqCMSHUiDcPlrxrWDjD0TRUtsN1HJKrWOB2EcDEZ7dZ SpW0DGEmFOFcf/Su6rrKVG+QIVsMcQDbhV/s4poiXgcMens/uNaTlyyLDL4zP/6+/EKa EdL47Z/czd6qmvMC9D+IQyXKRR9TTy01JpTYVEdjL2f4qusFO3nHdgGX8/WXQjqGHuSg Fcpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=MzIOr3JnhwtqMxbXavKkTcihyFsoqP8T3MrjLB1Fz2E=; b=QbFp9aGsdgeBfahJn8vpzHjWxlpxXhxB/fHVH4cntvTXcOTUZNEkpyG3FXSHxgWg0u /8iq1jO/GXfbzlcWXQNuLJT0GJRQ3zcF14Sg7SVX38XOgPEiYafGi3sHUVSJylAnB8kx yAYa4/sUF6U6uSdSQzz4CQd51XYih3PIP3dxIPNylj2RkPwkc6aCcDaQMXCNmBNDhLOf sEfeXR9DZu0bbp+aehmE5QPNufGeK0P1/VtO1BjB0tparT23pQ7QmfgvbUwDclEYGvCA yb7SYPDPdMqKab1IVNlCdcBmqiPrDVmS4vJG8xuiJJ0jp3IIYV+2R65wfIkz6mnLjDGK NzcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q7si4592313edt.339.2020.04.29.13.05.42; Wed, 29 Apr 2020 13:06:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727863AbgD2UCs (ORCPT + 99 others); Wed, 29 Apr 2020 16:02:48 -0400 Received: from foss.arm.com ([217.140.110.172]:44232 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbgD2UCm (ORCPT ); Wed, 29 Apr 2020 16:02:42 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 47A581063; Wed, 29 Apr 2020 13:02:41 -0700 (PDT) Received: from [10.37.12.43] (unknown [10.37.12.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 330973F68F; Wed, 29 Apr 2020 13:02:39 -0700 (PDT) Subject: Re: [PATCH v4 4/4] thermal: cpuidle: Register cpuidle cooling device To: Daniel Lezcano , rui.zhang@intel.com Cc: "Rafael J. Wysocki" , Lorenzo Pieralisi , Sudeep Holla , "open list:CPU IDLE TIME MANAGEMENT FRAMEWORK" , open list , "open list:CPUIDLE DRIVER - ARM PSCI" References: <20200429103644.5492-1-daniel.lezcano@linaro.org> <20200429103644.5492-4-daniel.lezcano@linaro.org> From: Lukasz Luba Message-ID: <99b3bc79-f48a-3d51-a8ae-8b9ca4856d36@arm.com> Date: Wed, 29 Apr 2020 21:02:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200429103644.5492-4-daniel.lezcano@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/29/20 11:36 AM, Daniel Lezcano wrote: > The cpuidle driver can be used as a cooling device by injecting idle > cycles. The DT binding for the idle state added an optional > > When the property is set, register the cpuidle driver with the idle > state node pointer as a cooling device. The thermal framework will do > the association automatically with the thermal zone via the > cooling-device defined in the device tree cooling-maps section. > > Signed-off-by: Daniel Lezcano > --- > - V4: > - Do not check the return value as the function does no longer return one > --- > drivers/cpuidle/cpuidle-arm.c | 3 +++ > drivers/cpuidle/cpuidle-psci.c | 3 +++ > 2 files changed, 6 insertions(+) > > diff --git a/drivers/cpuidle/cpuidle-arm.c b/drivers/cpuidle/cpuidle-arm.c > index 9e5156d39627..8c758920d699 100644 > --- a/drivers/cpuidle/cpuidle-arm.c > +++ b/drivers/cpuidle/cpuidle-arm.c > @@ -8,6 +8,7 @@ > > #define pr_fmt(fmt) "CPUidle arm: " fmt > > +#include > #include > #include > #include > @@ -124,6 +125,8 @@ static int __init arm_idle_init_cpu(int cpu) > if (ret) > goto out_kfree_drv; > > + cpuidle_cooling_register(drv); > + > return 0; > > out_kfree_drv: > diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c > index bae9140a65a5..1f38e0dfc9b2 100644 > --- a/drivers/cpuidle/cpuidle-psci.c > +++ b/drivers/cpuidle/cpuidle-psci.c > @@ -9,6 +9,7 @@ > #define pr_fmt(fmt) "CPUidle PSCI: " fmt > > #include > +#include > #include > #include > #include > @@ -313,6 +314,8 @@ static int __init psci_idle_init_cpu(int cpu) > if (ret) > goto out_kfree_drv; > > + cpuidle_cooling_register(drv); > + > return 0; > > out_kfree_drv: > Reviewed-by: Lukasz Luba Regards, Lukasz