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=-14.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 3668BC33CA3 for ; Thu, 9 Jan 2020 03:37:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C86420838 for ; Thu, 9 Jan 2020 03:37:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="QriXxRhH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727821AbgAIDha (ORCPT ); Wed, 8 Jan 2020 22:37:30 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:46960 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727671AbgAIDh3 (ORCPT ); Wed, 8 Jan 2020 22:37:29 -0500 Received: by mail-oi1-f196.google.com with SMTP id 13so2816083oij.13 for ; Wed, 08 Jan 2020 19:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EBxPdPI6aGH8o6hu5DCWy787QjzgPIZLXI5gO+WcD1Y=; b=QriXxRhHliJ3F/O3q0F2UmNA0QcFD7cijma9/Wt6o+qK90uPmfucUNK0n87888Y3Ke 3aufsx2bK7ekHdLdoK4qcpIJbn1zaW7R5dXT9D7tbxC2KwIgg/F5SWxbkCpRZn23VNxI VYfYenU2XvlqEaadnZWM1rkSQtrCbBveapwdS5lWiBh5rTbellnWqG72eF/z3hrr5c7n /x8YuKYUEt0jWq0gKzxLSniEMZi4/A16mjHl8/j4hu+L7eSeLXr3e8xTWP6dHmGeurQg sTo9pbNc2bfNfN7pBwDkbCoywkC+LzWeOz+aIAbkYKK4DYiXEzke9wl26C6FNRT47X9z PmhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EBxPdPI6aGH8o6hu5DCWy787QjzgPIZLXI5gO+WcD1Y=; b=pVFwmz0OVdy4rCR5iSNPiO0a8wA9TLipIpLxpQdhSwAgkGwpAfCpD9jUoqEDu24z+r koOpbNo6QdLUuBHBJ2P/ZnH/zZd7CJrOwLibEDBw8FPRRkBUZQHfeKR+Bo+/L2Ds4om+ dgHX6w9TmGoQvF3wnd1KmVbqEk//ICSDa3bM6NkNLqDUgpIHWJdvebanGRXgwUmXA3J+ CNjnrTUPt3WrwcXJU//8+SNeIMCHnu1hkLg2YrR+lWavpMoeeYjHfB77HkU/5cGnRbgA s849zV0MkX6YpJcPSB/CCS0LGOnCz+163SN/B2U3zuPFordg4CdIrwVyd9C7b9Oz4Rvk 86rw== X-Gm-Message-State: APjAAAWS3yZWQjNx89nBqsUz4czlul4ZpcQsB+dp+repTVcCwsCf7VOX trfuABzZ8ApQqnX2cG0jmvCSn5E2p0G33ZVe5JJlxQ== X-Google-Smtp-Source: APXvYqx3Uob/RWYjP3Mq5nseaUALTA1i4stN0ZiBAI3/wbVgdUWsj38KXuEm4Va+vnVVWxZ1CTr9+sKRSuUfGnQT+hg= X-Received: by 2002:aca:5490:: with SMTP id i138mr1579922oib.69.1578541048669; Wed, 08 Jan 2020 19:37:28 -0800 (PST) MIME-Version: 1.0 References: <20191207002424.201796-1-saravanak@google.com> <20191207002424.201796-4-saravanak@google.com> <20200108111947.q5aafrlz26tnk3nq@vireshk-i7> In-Reply-To: From: Saravana Kannan Date: Wed, 8 Jan 2020 19:36:52 -0800 Message-ID: Subject: Re: [PATCH v6 3/3] OPP: Add helper function for bandwidth OPP tables To: Viresh Kumar Cc: Rob Herring , Mark Rutland , Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" , Georgi Djakov , Vincent Guittot , "Sweeney, Sean" , David Dai , adharmap@codeaurora.org, Rajendra Nayak , Sibi Sankar , Bjorn Andersson , Evan Green , Android Kernel Team , Linux PM , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML Content-Type: text/plain; charset="UTF-8" Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Wed, Jan 8, 2020 at 4:58 PM Saravana Kannan wrote: > > On Wed, Jan 8, 2020 at 3:19 AM Viresh Kumar wrote: > > > > On 06-12-19, 16:24, Saravana Kannan wrote: > > > The frequency OPP tables have helper functions to search for entries in the > > > table based on frequency and get the frequency values for a given (or > > > suspend) OPP entry. > > > > > > Add similar helper functions for bandwidth OPP tables to search for entries > > > in the table based on peak bandwidth and to get the peak and average > > > bandwidth for a given (or suspend) OPP entry. > > > > > > Signed-off-by: Saravana Kannan > > > --- > > > drivers/opp/core.c | 301 +++++++++++++++++++++++++++++++++++------ > > > include/linux/pm_opp.h | 43 ++++++ > > > 2 files changed, 305 insertions(+), 39 deletions(-) > > > > > > diff --git a/drivers/opp/core.c b/drivers/opp/core.c > > > index c79bbfac7289..3ff33a08198e 100644 > > > --- a/drivers/opp/core.c > > > +++ b/drivers/opp/core.c > > > @@ -127,6 +127,29 @@ unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp) > > > } > > > EXPORT_SYMBOL_GPL(dev_pm_opp_get_freq); > > > > > > +/** > > > + * dev_pm_opp_get_bw() - Gets the bandwidth corresponding to an available opp > > > + * @opp: opp for which peak bandwidth has to be returned for > > > > s/peak // > > Ack Actually, isn't this correct as is? peak bandwidth is "returned". Average bandwidth is updated through the pointer. -Saravana