From patchwork Tue Nov 7 12:48:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10046637 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 A682A6031B for ; Tue, 7 Nov 2017 12:49:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90D0829BEC for ; Tue, 7 Nov 2017 12:49:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85A8A2A10C; Tue, 7 Nov 2017 12:49:12 +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 36A4E29BE7 for ; Tue, 7 Nov 2017 12:49:12 +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=F2fCllX3WMJhyftdlQ46iTvXeqfKzTzBHrr6P0dFAvM=; b=VgaBShwhNmxgz9kUihzk3eY+sV vuO3txgyPMcwzsf7lL3tf3G/3x+670TEce1RubJ3D2F2aVWNtaAa8LrJL4A8ZboLFu1RjepvVjWHg qtMO2Kv0LdQKg8eXEwToG/SPOLy86HwP4yKArpWVaM5oKMi6HReFl8YoJ8Ki38rkgqT1axnu2tQOH FTaLEadNdleZHKQ392unSahIJBqiL0Y4QRdkTBUPPcG+hZ5Rsi76UbM8Kr5AZeb5hBOQLwW2Ig2Y+ OvaS3JapJuXG0OXvrZzU2tSwk1GV74A21c6mhKvvREITmYNVU/Vix9mp7sHoQD+uNE+UGqmfNr8c8 RtaelfFA==; 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 1eC3JT-0004AD-88; Tue, 07 Nov 2017 12:49:07 +0000 Received: from xavier.telenet-ops.be ([2a02:1800:120:4::f00:14]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eC3J9-0003w8-K9 for linux-mediatek@lists.infradead.org; Tue, 07 Nov 2017 12:49:02 +0000 Received: from ayla.of.borg ([84.195.106.246]) by xavier.telenet-ops.be with bizsmtp id X0oH1w00D5JzmfG010oH0b; 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-0008AL-Vy; Tue, 07 Nov 2017 13:48:16 +0100 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1eC3Ie-0005fH-Uy; Tue, 07 Nov 2017 13:48:16 +0100 From: Geert Uytterhoeven To: "Rafael J . Wysocki" , Kevin Hilman , Ulf Hansson Subject: [PATCH v3 4/5] soc: rockchip: power-domain: Use GENPD_FLAG_ACTIVE_WAKEUP Date: Tue, 7 Nov 2017 13:48:14 +0100 Message-Id: <1510058895-21712-5-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_940191_25CB23D8 X-CRM114-Status: UNSURE ( 7.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=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: Heiko Stuebner --- Compile-tested only. v3: - Add Acked-by, - Drop RFC status, v2: - New. --- drivers/soc/rockchip/pm_domains.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c index 40b75748835f552c..5c342167b9db7a16 100644 --- a/drivers/soc/rockchip/pm_domains.c +++ b/drivers/soc/rockchip/pm_domains.c @@ -358,17 +358,6 @@ static void rockchip_pd_detach_dev(struct generic_pm_domain *genpd, pm_clk_destroy(dev); } -static bool rockchip_active_wakeup(struct device *dev) -{ - struct generic_pm_domain *genpd; - struct rockchip_pm_domain *pd; - - genpd = pd_to_genpd(dev->pm_domain); - pd = container_of(genpd, struct rockchip_pm_domain, genpd); - - return pd->info->active_wakeup; -} - static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu, struct device_node *node) { @@ -489,8 +478,9 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu, pd->genpd.power_on = rockchip_pd_power_on; pd->genpd.attach_dev = rockchip_pd_attach_dev; pd->genpd.detach_dev = rockchip_pd_detach_dev; - pd->genpd.dev_ops.active_wakeup = rockchip_active_wakeup; pd->genpd.flags = GENPD_FLAG_PM_CLK; + if (pd_info->active_wakeup) + pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP; pm_genpd_init(&pd->genpd, NULL, false); pmu->genpd_data.domains[id] = &pd->genpd;