From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967043AbcAZRSp (ORCPT ); Tue, 26 Jan 2016 12:18:45 -0500 Received: from www.linutronix.de ([62.245.132.108]:37750 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965001AbcAZRSl (ORCPT ); Tue, 26 Jan 2016 12:18:41 -0500 Date: Tue, 26 Jan 2016 18:17:26 +0100 (CET) From: Thomas Gleixner To: Ulf Hansson cc: Jon Hunter , Jason Cooper , Marc Zyngier , Jiang Liu , Stephen Warren , Thierry Reding , Kevin Hilman , Geert Uytterhoeven , Grygorii Strashko , Lars-Peter Clausen , Linus Walleij , Soren Brinkmann , "linux-kernel@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" Subject: Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips In-Reply-To: Message-ID: References: <1450349309-8107-1-git-send-email-jonathanh@nvidia.com> <1450349309-8107-4-git-send-email-jonathanh@nvidia.com> <569E1366.8070005@nvidia.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Jan 2016, Ulf Hansson wrote: > Here's a small collection of drivers that I easily picked up as > candidates for using these new APIs. > In principle, they would invoke these new APIs from their runtime PM callbacks. > > drivers/spi/spi-atmel.c > drivers/spi/spi-pl022.c > drivers/i2c/busses/i2c-omap.c > drivers/i2c/busses/i2c-nomadik.c > drivers/i2c/busses/i2c-sh_mobile.c > drivers/mmc/host/mtk-sd.c > drivers/mmc/host/mmci.c Instead of adding those calls to each driver, we can be smart and flag the interrupt as AUTO_RUNTIME_SUSPEND or such. So the runtime_pm core can handle it when invoking the dev_pm_ops->runtime_suspend()/resume() callbacks. Unfortunately the devres stuff is exceptionally bad to be used for this, but with some surgery it should be doable. Thanks, tglx