Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754435AbcCUKJl (ORCPT ); Mon, 21 Mar 2016 06:09:41 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:3638 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754216AbcCUKJU (ORCPT ); Mon, 21 Mar 2016 06:09:20 -0400 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Mon, 21 Mar 2016 03:07:43 -0700 Subject: Re: [PATCH 08/15] genirq: Add runtime power management support for IRQ chips To: Grygorii Strashko , Thomas Gleixner , Jason Cooper , Marc Zyngier , =?UTF-8?Q?Beno=c3=aet_Cousson?= , Tony Lindgren , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Stephen Warren , Thierry Reding References: <1458224359-32665-1-git-send-email-jonathanh@nvidia.com> <1458224359-32665-9-git-send-email-jonathanh@nvidia.com> <56EBE244.6070400@ti.com> <56EBF447.8070808@nvidia.com> <56EC0F7D.8050106@ti.com> <56EC1362.2000005@nvidia.com> <56EC1719.5020408@nvidia.com> <56EC404A.9060001@ti.com> CC: Kevin Hilman , Geert Uytterhoeven , Lars-Peter Clausen , Linus Walleij , , , , From: Jon Hunter Message-ID: <56EFC848.6030301@nvidia.com> Date: Mon, 21 Mar 2016 10:09:12 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56EC404A.9060001@ti.com> X-Originating-IP: [10.21.132.114] X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1676 Lines: 48 On 18/03/16 17:52, Grygorii Strashko wrote: > On 03/18/2016 04:56 PM, Jon Hunter wrote: >> >> On 18/03/16 14:40, Jon Hunter wrote: >>> On 18/03/16 14:23, Grygorii Strashko wrote: >>>> On 03/18/2016 02:27 PM, Jon Hunter wrote: >>>>> >>>>> On 18/03/16 11:11, Grygorii Strashko wrote: >> >> [snip] >> >>>> oh :( That will require updating of all drivers (and if it will be taken into account that >>>> wakeup can be configured from sysfs + devm_ - it will be painful). >>> >>> Will it? I know that there are a few gpio chips that have some hacked >>> ways to get around the PM issue, but I wonder how many drivers this >>> really impacts. What sysfs entries are you referring too? > > echo enabled > /sys/devices/platform/44000000.ocp/48020000.serial/tty/ttyS2/power/wakeup > >> >> Thinking about this some more, yes I guess it would impact all drivers >> that use a gpio but don't use it for a wake-up. I could see that could >> be a few drivers indeed. > > yep. I've just tested it > - gpio was requested through sysfs and configured as IRQ > - do suspend > > the same is if GPIO is requested as IRQ only and not configured as wakeup source > > [ 319.669760] PM: late suspend of devices complete after 0.213 msecs > [ 319.671195] irq 191 has no wakeup set and has not been freed! > [ 319.673453] PM: noirq suspend of devices complete after 2.258 msecs > > this is very minimal configuration - the regular one is at ~30-50 devices > most of them will use IRQ and only ~10% are used as wakeup sources. Then it is working as intended :-) However, if this is too verbose for some irqchips, then as I mentioned we can have a flag to avoid these messages. Cheers Jon