Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030305AbbENUPE (ORCPT ); Thu, 14 May 2015 16:15:04 -0400 Received: from exprod5og122.obsmtp.com ([64.18.0.192]:45713 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030240AbbENUO7 (ORCPT ); Thu, 14 May 2015 16:14:59 -0400 MIME-Version: 1.0 In-Reply-To: References: <1426676484-21812-1-git-send-email-marc.zyngier@arm.com> <1426676484-21812-3-git-send-email-marc.zyngier@arm.com> Date: Thu, 14 May 2015 13:14:57 -0700 Message-ID: Subject: Re: [PATCH v4 2/3] irqchip: GIC: Add support for irq_{get,set}_irqchip_state From: Feng Kan To: Linus Walleij Cc: Marc Zyngier , Abhijeet Dharmapurikar , Stephen Boyd , Phong Vo , Tin Huynh , Y Vo , Thomas Gleixner , Toan Le , Bjorn Andersson , Jason Cooper , Arnd Bergmann , linux-arm-msm , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-gpio@vger.kernel.org" , Alexandre Courbot Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1656 Lines: 41 On Thu, May 14, 2015 at 3:32 AM, Linus Walleij wrote: > On Wed, May 13, 2015 at 5:44 PM, Feng Kan wrote: > >> We are using the gpio driver with gpio_key for power button. The gpio >> status can only be retrieved from the GIC register when the gpio is >> acting as a interrupt. > > OK I understand so much. SPISR is a status register of the state > of the IRQ lines of shared peripherals. > > But surely the GPIO block has its own status register, so are > you saying that this register is unreliable? When the GPIO is used as interrupt, the gpio block does not report the status anymore. Which leaves us stuck with SPISR. > > I can think of a few reasons, like transient IRQs etc but > what is actually causing this? I won't say the obvious. > > Techically the GIC would normally be higher up the food > chain, i.e. one IRQ on the GIC is cascaded to sub-IRQs on > the GPIO chip by virtue of its own struct irq_chip and > irqdomain. The exception is typically only systems where > the GPIO block is fused with the IRQ controller so that each > GPIO line has its own unique IRQ line on the primary, > top-level interrupt controller. > > Which GPIO driver is this? Is it upstream? Yes, it is upstream. It is the xgene slimpro gpio driver. I am starting to think that we ought to switch to use some gpio poll driver rather than using gpio-key. > > 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/