From patchwork Tue Nov 7 12:48:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10046631 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 421D06031B for ; Tue, 7 Nov 2017 12:49:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30A5928F3B for ; Tue, 7 Nov 2017 12:49:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2585228FBE; Tue, 7 Nov 2017 12:49:05 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D9FFB29BEC for ; Tue, 7 Nov 2017 12:49:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=q2wROAtU7Td2fIdw8QOapCURnt9s0SL744TWBD1x6c8=; b=Mt1ZliXia+krXnrPOqaDJ+2ynU lcOGq0ReHmK4bRQu2+q6E+4v0tSWodZpouAefM4ulKZgZ9/GppYxOUAEFgBZoY1D5dsbwmBMLqTKB LaY6wgaBmjuAJvmYcx3bL/mh/VPrYmLFTQJllLSx7amVDQ7w1ravRhhwUvkF289HTw+GkCux7g64G qyQxrQEO5HTeKTHTcRdIL1OT2BZxg6jbm23adVKI5q4c8v86OEGqO99+5hLEVObwKQz07MJjks035 ppug93bKR6AOe+0Th7D5XV3jdpE2E5muWHJGMnxLwEawRdzs0XEPjrF6kNxhuHX1GfWp7Z0aNHwrf B6qvkTXw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eC3JP-000471-U4; Tue, 07 Nov 2017 12:49:03 +0000 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eC3J9-0003wW-81 for linux-rockchip@lists.infradead.org; Tue, 07 Nov 2017 12:48:58 +0000 Received: from ayla.of.borg ([84.195.106.246]) by michel.telenet-ops.be with bizsmtp id X0oH1w00D5JzmfG060oHnk; Tue, 07 Nov 2017 13:48:21 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1eC3Ie-0008AJ-VI; Tue, 07 Nov 2017 13:48:16 +0100 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1eC3Ie-0005fC-UI; Tue, 07 Nov 2017 13:48:16 +0100 From: Geert Uytterhoeven To: "Rafael J . Wysocki" , Kevin Hilman , Ulf Hansson Subject: [PATCH v3 3/5] soc: mediatek: Use GENPD_FLAG_ACTIVE_WAKEUP Date: Tue, 7 Nov 2017 13:48:13 +0100 Message-Id: <1510058895-21712-4-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510058895-21712-1-git-send-email-geert+renesas@glider.be> References: <1510058895-21712-1-git-send-email-geert+renesas@glider.be> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171107_044847_616174_4B84F625 X-CRM114-Status: UNSURE ( 8.58 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Geert Uytterhoeven , linux-pm@vger.kernel.org, Magnus Damm , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, Simon Horman , linux-mediatek@lists.infradead.org, Matthias Brugger MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Set the newly introduced GENPD_FLAG_ACTIVE_WAKEUP, which allows to remove the driver's own flag-based callback. Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Acked-by: Matthias Brugger --- Compile-tested only. v3: - Add Acked-by, - Drop RFC status, v2: - New. --- drivers/soc/mediatek/mtk-scpsys.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c index e1ce8b1b5090aa0a..e570b6af2e6ffbdd 100644 --- a/drivers/soc/mediatek/mtk-scpsys.c +++ b/drivers/soc/mediatek/mtk-scpsys.c @@ -361,17 +361,6 @@ static int scpsys_power_off(struct generic_pm_domain *genpd) return ret; } -static bool scpsys_active_wakeup(struct device *dev) -{ - struct generic_pm_domain *genpd; - struct scp_domain *scpd; - - genpd = pd_to_genpd(dev->pm_domain); - scpd = container_of(genpd, struct scp_domain, genpd); - - return scpd->data->active_wakeup; -} - static void init_clks(struct platform_device *pdev, struct clk **clk) { int i; @@ -466,7 +455,8 @@ static struct scp *init_scp(struct platform_device *pdev, genpd->name = data->name; genpd->power_off = scpsys_power_off; genpd->power_on = scpsys_power_on; - genpd->dev_ops.active_wakeup = scpsys_active_wakeup; + if (scpd->data->active_wakeup) + genpd->flags |= GENPD_FLAG_ACTIVE_WAKEUP; } return scp;