Received: by 10.223.185.116 with SMTP id b49csp2997295wrg; Mon, 5 Mar 2018 12:10:04 -0800 (PST) X-Google-Smtp-Source: AG47ELsYxTJOtnSaZE2u8TOTlj9+bflALvzfUTmMWs4gkdNhlLOEusfI/9b3HMmWW6gh9JRpvKoc X-Received: by 2002:a17:902:bcc6:: with SMTP id o6-v6mr14315554pls.16.1520280604023; Mon, 05 Mar 2018 12:10:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520280603; cv=none; d=google.com; s=arc-20160816; b=PJ9T4LstH4j6Mx8qenf950+1iS2YlpitQm1ZIJDN+EnEKYknqwhm3O5XsG09hg129F RTFIi+U8DNkx9mjsas7njgfOH/3dvdPHY/mEHzE7ip8ev90HHOJ+IBbcYy+sD5CH4LRz KnVUdN1+UwRDYv/fc1cKZ4/5XqGKOWwDeztUWOJsPqjhMSA+nm1HaE8ig0B/XCJT1DBv d4gLlfc1ZkygOXQ962D2RDo7izIrtxV2NjQoYfNl9TWfLsQY1+kSI4lsXS1VZvasWiBC +WUMgOr5HL2pzkKfHt2AAtk0GZMB36nvhlIZ0gr61IoZAcdOkTn6awffYBG7kYg/RHED 3CxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=VoO8m4NsYY6+85uelt6xqwXQV5O425x/+0twse9GWoo=; b=MQUZsFhvqAHUbQHJfOJPlCTmUhomOiDBmNKTJSuZ/9oJVj9NAzrdgR9gqAHvi2o2dV B/rFDlHag6frrWg9CWPhLynQHH6NMZfXDE6qnL3Xo7kq84zAz3+dlSxoVXlzDwtvIA7F +tLkElo9sVWqpq7JHluFT1F5uozbaPdUh9Rgd6pWbSSIDTv4LOMdXKzj8+03WioPqY0Q Zm4N8WBgzF+sYglcC8PGsLzTT4zwxqlMZlWfQZcH41un42gBNMX1ie8DdUsbNi1Rn3d8 9/JH+GT8adekHeQYm6WXxpayTa+wLOCPQDlGOTKAwqrbaIax25L6dz4U9NWi8peA/yHh vHoA== 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 l77si10778902pfk.210.2018.03.05.12.09.50; Mon, 05 Mar 2018 12:10:03 -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 S1752996AbeCEUI2 (ORCPT + 99 others); Mon, 5 Mar 2018 15:08:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:40430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752507AbeCEUI0 (ORCPT ); Mon, 5 Mar 2018 15:08:26 -0500 Received: from mail-qt0-f173.google.com (mail-qt0-f173.google.com [209.85.216.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A59FC217A0; Mon, 5 Mar 2018 20:08:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A59FC217A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh+dt@kernel.org Received: by mail-qt0-f173.google.com with SMTP id t6so21869267qtn.9; Mon, 05 Mar 2018 12:08:25 -0800 (PST) X-Gm-Message-State: AElRT7G5IuCsfdmH4JsMpZJwripzVlx/uu2Rf4/eJ04Ywv6D/3Gjpjx6 dSjWI5YPTsHxmfos1a+KPt4rio6chHcKkjkN/w== X-Received: by 10.237.39.38 with SMTP id n35mr25048617qtd.327.1520280504728; Mon, 05 Mar 2018 12:08:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.178.131 with HTTP; Mon, 5 Mar 2018 12:08:04 -0800 (PST) In-Reply-To: <3b80853abb45a9e067cf7a16754b07bb67712457.1520274879.git.amit.kucheria@linaro.org> References: <3b80853abb45a9e067cf7a16754b07bb67712457.1520274879.git.amit.kucheria@linaro.org> From: Rob Herring Date: Mon, 5 Mar 2018 14:08:04 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] thermal: of: Allow selection of thermal governor in DT To: Amit Kucheria Cc: devicetree@vger.kernel.org, Ram Chandrasekar , Lina Iyer , Zhang Rui , Eduardo Valentin , Mark Rutland , linux-pm@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 5, 2018 at 12:36 PM, Amit Kucheria wrote: > From: Ram Chandrasekar > > There is currently no way for the governor to be selected for each thermal > zone in devicetree. This results in the default governor being used for all > thermal zones even though no such restriction exists in the core code. > > Add support for specifying the thermal governor to be used for a thermal > zone in the devicetree. The devicetree config should specify the governor > name as a string that matches any available governors. If not specified, we > maintain the current behaviour of using the default governor. > > Signed-off-by: Ram Chandrasekar > Signed-off-by: Amit Kucheria > --- > Documentation/devicetree/bindings/thermal/thermal.txt | 8 ++++++++ > drivers/thermal/of-thermal.c | 6 ++++++ > 2 files changed, 14 insertions(+) > > diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt > index 1719d47..fced9d3 100644 > --- a/Documentation/devicetree/bindings/thermal/thermal.txt > +++ b/Documentation/devicetree/bindings/thermal/thermal.txt > @@ -168,6 +168,14 @@ Optional property: > by means of sensor ID. Additional coefficients are > interpreted as constant offset. > > +- thermal-governor: Thermal governor to be used for this thermal zone. > + Expected values are: > + "step_wise": Use step wise governor. > + "fair_share": Use fair share governor. > + "user_space": Use user space governor. > + "power_allocator": Use power allocator governor. This looks pretty Linux specific. Not that we can't have Linux specific properties, but we try to avoid them. What determines the selection? I'd imagine only certain governors make sense for certain devices. We should perhaps describe those characteristics which can then infer the best governor. Not really sure though... Rob