From patchwork Wed Nov 23 13:51:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Jakobi X-Patchwork-Id: 9443329 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 44C87600BA for ; Wed, 23 Nov 2016 13:52:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30AF526224 for ; Wed, 23 Nov 2016 13:52:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 229B22624C; Wed, 23 Nov 2016 13:52:51 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 B1D4A26224 for ; Wed, 23 Nov 2016 13:52:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964829AbcKWNwu (ORCPT ); Wed, 23 Nov 2016 08:52:50 -0500 Received: from smtp.math.uni-bielefeld.de ([129.70.45.10]:58253 "EHLO smtp.math.uni-bielefeld.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964828AbcKWNwu (ORCPT ); Wed, 23 Nov 2016 08:52:50 -0500 Received: from chidori.dhcp.uni-bielefeld.de (dhcp-10-68-170-113.dhcp.uni-bielefeld.de [10.68.170.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by smtp.math.uni-bielefeld.de (Postfix) with ESMTPSA id 248F65FA83; Wed, 23 Nov 2016 14:52:48 +0100 (CET) From: Tobias Jakobi To: linux-samsung-soc@vger.kernel.org Cc: linux-pm@vger.kernel.org, m.reichl@fivetechno.de, myungjoo.ham@gmail.com, cw00.choi@samsung.com, Tobias Jakobi Subject: [RFC 3/4] PM / devfreq: exynos-bus: add support for suspend OPP Date: Wed, 23 Nov 2016 14:51:26 +0100 Message-Id: <1479909087-22659-4-git-send-email-tjakobi@math.uni-bielefeld.de> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1479909087-22659-1-git-send-email-tjakobi@math.uni-bielefeld.de> References: <1479909087-22659-1-git-send-email-tjakobi@math.uni-bielefeld.de> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP TODO: write desc Signed-off-by: Tobias Jakobi --- drivers/devfreq/exynos-bus.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index 29866f7..8a91970 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -335,6 +335,7 @@ static int exynos_bus_parse_of(struct device_node *np, struct exynos_bus *bus) { struct device *dev = bus->dev; + struct dev_pm_opp *suspend_opp; unsigned long rate; int ret; @@ -368,6 +369,13 @@ static int exynos_bus_parse_of(struct device_node *np, ret = PTR_ERR(bus->curr_opp); goto err_opp; } + + suspend_opp = dev_pm_opp_get_suspend_opp(dev); + if (suspend_opp) { + bus->devfreq->suspend_freq = dev_pm_opp_get_freq(suspend_opp); + printk("DEBUG: suspend opp found!\n"); + } + rcu_read_unlock(); return 0;