Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753257AbdDKJyv (ORCPT ); Tue, 11 Apr 2017 05:54:51 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36780 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752191AbdDKJyt (ORCPT ); Tue, 11 Apr 2017 05:54:49 -0400 Date: Tue, 11 Apr 2017 10:54:45 +0100 From: Lee Jones To: Tony Lindgren Cc: Samuel Ortiz , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Charles Keepax , Marcel Partap , Michael Scott , Sebastian Reichel Subject: Re: [PATCH 1/3] mfd: cpcap: Fix interrupt to use level interrupt Message-ID: <20170411095445.egoderehaiwovj5b@dell> References: <20170404031556.5093-1-tony@atomide.com> <20170404031556.5093-2-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170404031556.5093-2-tony@atomide.com> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1790 Lines: 45 On Mon, 03 Apr 2017, Tony Lindgren wrote: > I made a mistake assuming the device tree configuration for interrupt > triggering was somehow passed to the SPI device but it's not. > > In the Motorola Linux kernel tree CPCAP PMIC is configured as a rising > edge triggered interrupt, but then then it's interrupt handler keeps > looping until the GPIO line goes down. So the CPCAP interrupt is clearly > a level interrupt and not an edge interrupt. > > Earlier when I tried to configure it as level interrupt using the > device tree, I did not account that the triggering only gets passed > to the SPI core and it also needs to be specified in the CPCAP driver > when we do devm_regmap_add_irq_chip(). > > Fixes: 56e1d40d3bea ("mfd: cpcap: Add minimal support") > Cc: Charles Keepax > Cc: Marcel Partap > Cc: Michael Scott > Cc: Sebastian Reichel > Signed-off-by: Tony Lindgren > --- > drivers/mfd/motorola-cpcap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. > diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c > --- a/drivers/mfd/motorola-cpcap.c > +++ b/drivers/mfd/motorola-cpcap.c > @@ -126,7 +126,7 @@ static int cpcap_init_irq_chip(struct cpcap_ddata *cpcap, int irq_chip, > > ret = devm_regmap_add_irq_chip(&cpcap->spi->dev, cpcap->regmap, > cpcap->spi->irq, > - IRQF_TRIGGER_RISING | > + irq_get_trigger_type(cpcap->spi->irq) | > IRQF_SHARED, -1, > chip, &cpcap->irqdata[irq_chip]); > if (ret) { -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog