Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932586AbbLVKEG (ORCPT ); Tue, 22 Dec 2015 05:04:06 -0500 Received: from mail-ob0-f177.google.com ([209.85.214.177]:34258 "EHLO mail-ob0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752896AbbLVKD7 (ORCPT ); Tue, 22 Dec 2015 05:03:59 -0500 MIME-Version: 1.0 In-Reply-To: <5673E38B.7060702@nvidia.com> References: <1450349309-8107-1-git-send-email-jonathanh@nvidia.com> <1450349309-8107-9-git-send-email-jonathanh@nvidia.com> <5673E38B.7060702@nvidia.com> Date: Tue, 22 Dec 2015 11:03:59 +0100 Message-ID: Subject: Re: [RFC PATCH V2 8/8] irqchip/gic: Add support for tegra AGIC interrupt controller From: Linus Walleij To: Jon Hunter Cc: "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Thomas Gleixner , Jason Cooper , Marc Zyngier , Jiang Liu , Stephen Warren , Thierry Reding , Kevin Hilman , Geert Uytterhoeven , Grygorii Strashko , Lars-Peter Clausen , Soren Brinkmann , "linux-kernel@vger.kernel.org" , "linux-tegra@vger.kernel.org" , Ulf Hansson Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1739 Lines: 42 On Fri, Dec 18, 2015 at 11:44 AM, Jon Hunter wrote: > On 17/12/15 13:32, Linus Walleij wrote: >> On Thu, Dec 17, 2015 at 11:48 AM, Jon Hunter wrote: >> >>> Add a driver for the Tegra-AGIC interrupt controller which is compatible >>> with the ARM GIC-400 interrupt controller. >> (...) >>> +static const struct dev_pm_ops gic_pm_ops = { >>> + SET_RUNTIME_PM_OPS(gic_runtime_suspend, >>> + gic_runtime_resume, NULL) >>> + SET_SYSTEM_SLEEP_PM_OPS(gic_suspend, gic_resume) >>> +}; >> >> Now you do what I commented on in the earlier patch: assign >> the runtime PM functions to normal suspend/resume. >> >> This will have the effect of inhibiting any IRQs marked for >> wakeup on the GIC, even if you just want to go to sleep until >> something happens, will it not? >> >> You should turn on the alarm clock before going to bed, not >> turn it off, as figure of speak ... > > Yes I am alway having problems with my alarm, may be this is why ;-) > > I see what you are saying, so if there are any wake-ups enabled then we > should not suspend the chip. Right? Yep, so I think you should just wrap the normal suspend functions into some function that check if we have some wakeup active and then just return 0, else if everything is clear, call the same runtime PM hooks, and it will work nicely I think. IIUC the wakeup flag is only for the suspend/resume/sleep case so this should be enough. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/