From patchwork Mon Oct 16 13:55: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: 10008381 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 158BE601D5 for ; Mon, 16 Oct 2017 13:55:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 090D928599 for ; Mon, 16 Oct 2017 13:55:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1C39285AB; Mon, 16 Oct 2017 13:55:33 +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=unavailable 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 A7BFE28599 for ; Mon, 16 Oct 2017 13:55:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753061AbdJPNza (ORCPT ); Mon, 16 Oct 2017 09:55:30 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:58702 "EHLO baptiste.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752977AbdJPNz2 (ORCPT ); Mon, 16 Oct 2017 09:55:28 -0400 Received: from ayla.of.borg ([84.195.106.246]) by baptiste.telenet-ops.be with bizsmtp id NDvP1w00L5JzmfG01DvPJs; Mon, 16 Oct 2017 15:55:26 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1e45rX-0000cJ-5l; Mon, 16 Oct 2017 15:55:23 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1e45rX-0001L2-40; Mon, 16 Oct 2017 15:55:23 +0200 From: Geert Uytterhoeven To: Michael Turquette , Stephen Boyd , Simon Horman , Magnus Damm , "Rafael J . Wysocki" , Kevin Hilman , Ulf Hansson Cc: Sergei Shtylyov , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , linux-clk@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 08/10] [RFC] soc: renesas: rcar-sysc: Use GENPD_FLAG_ACTIVE_WAKEUP Date: Mon, 16 Oct 2017 15:55:14 +0200 Message-Id: <1508162116-5043-9-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508162116-5043-1-git-send-email-geert+renesas@glider.be> References: <1508162116-5043-1-git-send-email-geert+renesas@glider.be> 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 Set the newly introduced GENPD_FLAG_ACTIVE_WAKEUP, which allows to remove the driver's own "always true" callback. Signed-off-by: Geert Uytterhoeven --- This must not be applied before "PM / Domain: Enable genpd users to specify default active wakeup behavior" has landed upstream, hence the "RFC". --- drivers/soc/renesas/rcar-sysc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/soc/renesas/rcar-sysc.c b/drivers/soc/renesas/rcar-sysc.c index beb8b483a62abaca..ac4df1c43b2fbdbe 100644 --- a/drivers/soc/renesas/rcar-sysc.c +++ b/drivers/soc/renesas/rcar-sysc.c @@ -194,11 +194,6 @@ static int rcar_sysc_pd_power_on(struct generic_pm_domain *genpd) static bool has_cpg_mstp; -static bool rcar_sysc_pd_active_wakeup(struct device *dev) -{ - return true; -} - static void __init rcar_sysc_pd_setup(struct rcar_sysc_pd *pd) { struct generic_pm_domain *genpd = &pd->genpd; @@ -229,8 +224,7 @@ static void __init rcar_sysc_pd_setup(struct rcar_sysc_pd *pd) if (!(pd->flags & (PD_CPU | PD_SCU))) { /* Enable Clock Domain for I/O devices */ - genpd->flags |= GENPD_FLAG_PM_CLK; - genpd->dev_ops.active_wakeup = rcar_sysc_pd_active_wakeup; + genpd->flags |= GENPD_FLAG_PM_CLK | GENPD_FLAG_ACTIVE_WAKEUP; if (has_cpg_mstp) { genpd->attach_dev = cpg_mstp_attach_dev; genpd->detach_dev = cpg_mstp_detach_dev;