From patchwork Sat Jun 22 00:34:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravana Kannan X-Patchwork-Id: 11011155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CF43A6C5 for ; Sat, 22 Jun 2019 00:34:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBCBF28958 for ; Sat, 22 Jun 2019 00:34:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A93D828BAB; Sat, 22 Jun 2019 00:34:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5058228958 for ; Sat, 22 Jun 2019 00:34:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726274AbfFVAey (ORCPT ); Fri, 21 Jun 2019 20:34:54 -0400 Received: from mail-vk1-f201.google.com ([209.85.221.201]:54061 "EHLO mail-vk1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbfFVAey (ORCPT ); Fri, 21 Jun 2019 20:34:54 -0400 Received: by mail-vk1-f201.google.com with SMTP id b13so3059681vkf.20 for ; Fri, 21 Jun 2019 17:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=KfmaNk0Eu1BHVI+WPNp421IderZkjqwVQ/bXD2IsfF8=; b=NfLabKRBPTogQTjXkgamtEim4i76vkVJwx83MWI3SCzeuWvF9TwwKaNDvMPurCPAjR +talnPvE7Lku2Pcox/DE0vrSCLDWOWksEpLBWnTeyFb+m2DUXjNsclsDPld122aYvVoh P91Yed+76BhBWM7O3oOPV25IDxHfWP0qfh+npG1V856TUCIRmN4sXt63vLOTVt2JyTBr ymMAmaPC9t+TnkfT4CAl5fd36UWAd/JKKxHHkZJXq3uOFuW2JbGF2oiP8wVxO2VHZTvj jShcAjhAr4uQj7HtBG6/PFiaOAJJIbM9PG7kfaeTuUl1SBnkI/Dd2KqWgpbypE/RXAIu QmsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=KfmaNk0Eu1BHVI+WPNp421IderZkjqwVQ/bXD2IsfF8=; b=DCKEcPinI3x2F8v4Labg0/iCjaKudWD99CElKhRRoqZEtkI5I7nXJL2do6LzaBnXhb A+Z/Ud4CNULHS6+kUHCpr4dcMWTPTGNJs0VLkYlIe+8Hik7gvRRaOLr+lKQmCU7wZ+B6 /H2rrASMLOXV5h8sm9XS0c104K+s/SOgkVIoygzCAv8x4Lizjvgi6IIhOK9sL95UIYNi f1FXrgeSfYU+knk8Hm9lCk6hqv2I6eajpE5BIEE/3g4wcBsLMaprvqYGDYP+LXgsTOfE yjy0BGDQ14dkcLPfOI7aMnJPoVte2SzS19p4+xSw7t72RkeX/mygAENDuYNO9tRtaMy8 TcMQ== X-Gm-Message-State: APjAAAWV5bk7jfgvMP+rmLzlS8qMYOfOfAy8n7miqK8wK7+dKPwP9d7m iaTIxWAqIqtNS2L/nCPwfefQFQuqP65aISo= X-Google-Smtp-Source: APXvYqxI0kCH/VP1Tj1BapDK721tlVshuyp1M7qa5xUpC1IcNzSxjKfvyULOjetXxfShkRYS5JKc0oVN8dcjsKo= X-Received: by 2002:a1f:2b07:: with SMTP id r7mr30702582vkr.65.1561163693358; Fri, 21 Jun 2019 17:34:53 -0700 (PDT) Date: Fri, 21 Jun 2019 17:34:45 -0700 Message-Id: <20190622003449.33707-1-saravanak@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog Subject: [PATCH v1 0/3] Add required-opps support to devfreq passive gov From: Saravana Kannan To: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" Cc: Saravana Kannan , kernel-team@android.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The devfreq passive governor scales the frequency of a "child" device based on the current frequency of a "parent" device (not parent/child in the sense of device hierarchy). As of today, the passive governor requires one of the following to work correctly: 1. The parent and child device have the same number of frequencies 2. The child device driver passes a mapping function to translate from parent frequency to child frequency. When (1) is not true, (2) is the only option right now. But often times, all that is required is a simple mapping from parent's frequency to child's frequency. Since OPPs already support pointing to other "required-opps", add support for using that to map from parent device frequency to child device frequency. That way, every child device driver doesn't have to implement a separate mapping function anytime (1) isn't true. -Saravana Saravana Kannan (3): OPP: Allow required-opps even if the device doesn't have power-domains OPP: Add function to look up required OPP's for a given OPP PM / devfreq: Add required OPPs support to passive governor drivers/devfreq/governor_passive.c | 25 +++++++++++-- drivers/opp/core.c | 56 +++++++++++++++++++++++++++++- drivers/opp/of.c | 14 -------- include/linux/pm_opp.h | 11 ++++++ 4 files changed, 89 insertions(+), 17 deletions(-)