Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3386848imu; Mon, 28 Jan 2019 04:05:39 -0800 (PST) X-Google-Smtp-Source: ALg8bN6DDGKqdvx1EGofwrQgWX9kjSAR7rZDuDZY1YuNnU03IuhentB6q8EAFInFS0Pgh23NQuOc X-Received: by 2002:a17:902:2aaa:: with SMTP id j39mr22039926plb.335.1548677139019; Mon, 28 Jan 2019 04:05:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548677138; cv=none; d=google.com; s=arc-20160816; b=H0y/iCnsOgpe77r39V2JzEAR7FrF0Kt3sRaJfSTPUUPcf6BApPl4wKmYdK8dBlplUg RO3sOY4NXq96StU/udstKxDdkZq+zVZ0k8I+0vsb9yzyh2CXBWXlt6hFeVh6MQUNsJfd NHCOLTbKMQoyFvnA3hqy53wOPlvzsZ50GD6Ps34qJDA007f5t6JVxFgxy7VqcRHNzcvP LWBmeMiYYRYoxp/xBaWuAEEtgZ6foStxnPKw6rbrHu+dVxYzluU7egMEIqRbbqr2SbID UJfAOpwFVjz00n7p/AjEDvq7H9fu3nrZQjmWLI9Ul8JKRUGdoObzqbrUtPHL2fXAwSI5 l9UQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=tEKXvP/3Wf6VUn/OyVVqGD4slYk3Qgf3vzsJbc3g/3Y=; b=I/j/778juEfXecyLHWZfpn0BhkWjdNVsUejdU8EglyyM6qPieFL7DpXqY5PDjFLi+1 BZNW7Nn2ez6j8/VVo1UlbzWqJD8SpAuqP4506GBzA1n47R0uQMcGfy+PEA704r3A80xI yE4TfxHm3vnhU45okn6CZsUHeQRnXHJtMu7O+j06TIMvZvLPeuuilV4+yxo/nhmfTmBN 6S2y367z08J9UdO/LX0DDlXW6oi7mcQ63sAl5zW3CDgxC7fAaelK7W2DQsMlL13LtifB iTByWmtmT4tL9rDD3Hmx2TyuS69wfLrb8CzrRWse8TbKBv5jnHGth3EZkCjk/+hNf5Jp OPRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k134si33516806pga.401.2019.01.28.04.05.23; Mon, 28 Jan 2019 04:05:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727035AbfA1MEl (ORCPT + 99 others); Mon, 28 Jan 2019 07:04:41 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:59053 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726672AbfA1MEk (ORCPT ); Mon, 28 Jan 2019 07:04:40 -0500 Received: from 79.184.255.169.ipv4.supernova.orange.pl (79.184.255.169) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.183) id cd1a21482ae1fd7b; Mon, 28 Jan 2019 13:04:38 +0100 From: "Rafael J. Wysocki" To: Daniel Lezcano Cc: Amit Kucheria , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, viresh.kumar@linaro.org, edubezval@gmail.com, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Peter Zijlstra (Intel)" , Tao Wang , Sudeep Holla , linux-pm@vger.kernel.org Subject: Re: [PATCH v4 2/9] cpufreq: Auto-register the driver as a thermal cooling device if asked Date: Mon, 28 Jan 2019 13:03:20 +0100 Message-ID: <12294707.IXbBkGfcfl@aspire.rjw.lan> In-Reply-To: <3afd5b04-5caf-053d-48c9-f719eec58da0@linaro.org> References: <3afd5b04-5caf-053d-48c9-f719eec58da0@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, January 28, 2019 9:32:44 AM CET Daniel Lezcano wrote: > On 28/01/2019 07:41, Amit Kucheria wrote: > > All cpufreq drivers do similar things to register as a cooling device. > > Provide a cpufreq driver flag so drivers can just ask the cpufreq core > > to register the cooling device on their behalf. This allows us to get > > rid of duplicated code in the drivers. > > > > In order to allow this, we add a struct thermal_cooling_device pointer > > to struct cpufreq_policy so that drivers don't need to store it in a > > private data structure. > > > > Suggested-by: Stephen Boyd > > Suggested-by: Viresh Kumar > > Signed-off-by: Amit Kucheria > > Reviewed-by: Matthias Kaehlcke > > Tested-by: Matthias Kaehlcke > > --- > > [ ... ] > > > +/* > > + * Set by drivers that want the core to automatically register the cpufreq > > + * driver as a thermal cooling device. > > + */ > > +#define CPUFREQ_AUTO_REGISTER_COOLING_DEV BIT(7) > > + > > Isn't the CPUFREQ_IS_COOLING_DEV more appropriate? We define a property > of the cpufreq driver and the resulting action is to auto-register, no? Yes. Cheers, Rafael