Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp912623imm; Thu, 31 May 2018 11:36:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJr7eTI45EYF4h7JvPUiyIoRFv/Pu0Z80h+eHx5p5iYP0lhGqVNtuHM5Cz/tRAjUJ+i6l8A X-Received: by 2002:a17:902:bb8d:: with SMTP id m13-v6mr8151178pls.46.1527791788982; Thu, 31 May 2018 11:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527791788; cv=none; d=google.com; s=arc-20160816; b=OewVntSgV5O6GeafUUhKobnCRI+S6SzX9SwOvgfSlZioXXyX/z+ggYaO1cU09A4wVi m/aorbqd2xsUxcImpuiqLa77noDme8iO47zqtlMqgGJDONt00zPTr1DuX0jC74HfVX6E Oo/qaIv9qJnXLAgHe9dqlPE3uek4kxJNn1ze/1SkZ7r4pBgeFGYBUGaF7yjihvgqEjCs ksNvxZnx5uE0HoB2BKjD9LQibcilGLVc6cdgEq9pJtJsew7nKNp59ZLLPomW2h3r1zAD rqTADwkWBaQZpgyEv2PzfjyUeofoGR1j2A+oR9WcPueJ/1lQzI79rIM44Snlw6MH2edh Fvrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=2VXXU7U4bXeGfLFMbj9sjthl5j8jspGtlvR1DJGq6qM=; b=qU3447Fh70sdAYIBQH2bbxoOzeCL0qX7k29E+uzQo6B3omBUysIzC7qFynHo9ZbJg1 DTSTNzXSZxXxngS0iZwrfdluJR6Fgl3+IGz2OvNEoQLTymx92US4ecYDRp46wO9qE/L7 QO7cm6U52WtvbR0fkzcjoj6V+CDfeFQYEGBchLXv8GtmHsyEBL7zW/P9I9k6J0ZMu6vE cMblNSpy9OsohafsdghqiRyyJZms7lffm1WKfTR+1fzjLnn0grDP9bkDkfXuEAxCrnCh QKFjykBnT2PKcGI6l0ktIcy6fT7TbtQR2qfyRc9l9pvXYN23KCStXfKIvibPp3jAzvlk d9uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=R9z43+pH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4-v6si37600146pll.118.2018.05.31.11.36.14; Thu, 31 May 2018 11:36:28 -0700 (PDT) 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; dkim=pass header.i=@chromium.org header.s=google header.b=R9z43+pH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755967AbeEaSeK (ORCPT + 99 others); Thu, 31 May 2018 14:34:10 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:42633 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755900AbeEaSeG (ORCPT ); Thu, 31 May 2018 14:34:06 -0400 Received: by mail-pg0-f68.google.com with SMTP id p9-v6so10074677pgc.9 for ; Thu, 31 May 2018 11:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2VXXU7U4bXeGfLFMbj9sjthl5j8jspGtlvR1DJGq6qM=; b=R9z43+pH+BD4OUIdLmq9yesGFVW6VjKjHGbBqFLsXbprzZj0CxPU/F/TdXtCikR+5t NJknbmilLF68+YknOrwqQkBBhD2/ysck1eQcpVpojPWHbTmQK/0yB4beik2RhWjZTDmu rK/319kt8lZfLCNQcRGchODynD7+GBgx/OD7E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2VXXU7U4bXeGfLFMbj9sjthl5j8jspGtlvR1DJGq6qM=; b=H50lmzxrx1ED9jCirLvP/P3SFAXrWJHlP0xneneuEESxnz99yyXKXHQe0F2IVX0Pt7 a8OSaaaAnTGajwpAoeIV40ezCReOWs/dP7F99CbCky25yje2O0rJZEPaEnVxBPUBzPMl 15SUHgLrSudX95DxK0aw69CBHRZn90DkQpd+yv75coaqCYv2/YE1lHSpUPdb7cl05oFd yM5xdFQl3z8eXXM4qTzn299KkTiJvY9U7iWqMGqch1ZSi0YElJnKZWKfUWRnueWJSoT5 mggAAloZCcFElRmkLQcVP0sIbQYBmO7fq4T7pVaNanX+bbEckobbstuRvdcDW9AZFasq +9Kw== X-Gm-Message-State: ALKqPwfqJ7XeaQzjvyfO2OFskqC7/bPScTInl1Z/vt3JXV477nxNOiE8 1tMDUAgDn2G1ujFPhFlLoIus7Q== X-Received: by 2002:a65:4cc3:: with SMTP id n3-v6mr6343794pgt.98.1527791645657; Thu, 31 May 2018 11:34:05 -0700 (PDT) Received: from localhost ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id w134-v6sm66702062pfd.187.2018.05.31.11.34.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 May 2018 11:34:05 -0700 (PDT) Date: Thu, 31 May 2018 11:34:04 -0700 From: Matthias Kaehlcke To: Rob Herring Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Arnd Bergmann , Greg Kroah-Hartman , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Norris , Douglas Anderson Subject: Re: [PATCH 10/11] dt-bindings: misc: add bindings for throttler Message-ID: <20180531183404.GB88063@google.com> References: <20180525203043.249193-1-mka@chromium.org> <20180525203043.249193-11-mka@chromium.org> <20180531163159.GA4369@rob-hp-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180531163159.GA4369@rob-hp-laptop> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On Thu, May 31, 2018 at 11:31:59AM -0500, Rob Herring wrote: > On Fri, May 25, 2018 at 01:30:42PM -0700, Matthias Kaehlcke wrote: > > Commit msg? Will add some more info in the next revision. > > Signed-off-by: Matthias Kaehlcke > > --- > > .../devicetree/bindings/misc/throttler.txt | 41 +++++++++++++++++++ > > 1 file changed, 41 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/misc/throttler.txt > > > > diff --git a/Documentation/devicetree/bindings/misc/throttler.txt b/Documentation/devicetree/bindings/misc/throttler.txt > > new file mode 100644 > > index 000000000000..92f13e94451a > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/misc/throttler.txt > > @@ -0,0 +1,41 @@ > > +Throttler driver > > + > > +The Throttler is used for non-thermal throttling of system components like > > +CPUs or devfreq devices. > > This all looks very Linux specific and not a h/w device. Perhaps you can > add hint properties to OPP tables as to what entries can be used for > throttling, but otherwise this doesn't belong in DT. My idea is to allow multiple throttlers, which might operate on different throttling devices or use different OPPs for the same device. To support this a simple boolean hint that the OPP can be used for throttling would not be sufficient. What should work is a property with an array of phandles of the throttlers that use a given OPP. AFAIK it is currently not possible to enumerate the devfreq devices in the system, so besides the info in the OPPs the throttler itself would still need a phandle to the devfreq device(s) it uses. I envision something like this: gpu_opp_table: opp-table2 { compatible = "operating-points-v2"; opp00 { opp-hz = /bits/ 64 <200000000>; opp-microvolt = <800000>; }; opp01 { opp-hz = /bits/ 64 <297000000>; opp-microvolt = <800000>; opp-throttlers = <&cros_ec_throttler>; }; ... }; cros_ec_throttler: cros-ec-throttler { compatible = "google,cros-ec-throttler"; devfreq-devices = <&gpu>; }; Would this be acceptable? Thanks Matthias