From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752052AbdKBLcS (ORCPT ); Thu, 2 Nov 2017 07:32:18 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:53407 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750722AbdKBLcQ (ORCPT ); Thu, 2 Nov 2017 07:32:16 -0400 X-Google-Smtp-Source: ABhQp+SELb0NDhqrXiZeW+upTjX9N742sH9AJ2p5n2jXs2B5lFCKugWLheVhwQeAIllC0JBcLChbOg== Subject: Re: [PATCH v2 3/5] [RFC] soc: mediatek: Use GENPD_FLAG_ACTIVE_WAKEUP To: Geert Uytterhoeven , "Rafael J . Wysocki" , Ulf Hansson , Kevin Hilman Cc: Simon Horman , Magnus Damm , Heiko Stuebner , linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <1509473494-19740-1-git-send-email-geert+renesas@glider.be> <1509473494-19740-4-git-send-email-geert+renesas@glider.be> From: Matthias Brugger Message-ID: <81cf254c-66b9-a139-0344-81c5cb560f88@gmail.com> Date: Thu, 2 Nov 2017 12:32:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1509473494-19740-4-git-send-email-geert+renesas@glider.be> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/31/2017 07:11 PM, Geert Uytterhoeven wrote: > Set the newly introduced GENPD_FLAG_ACTIVE_WAKEUP, which allows to > remove the driver's own flag-based 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". > > Compile-tested only. > > v2: > - New. > --- > drivers/soc/mediatek/mtk-scpsys.c | 14 ++------------ > 1 file changed, 2 insertions(+), 12 deletions(-) > Acked-by: Matthias Brugger > 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; >