Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752722AbbKVQjL (ORCPT ); Sun, 22 Nov 2015 11:39:11 -0500 Received: from mail-yk0-f176.google.com ([209.85.160.176]:34081 "EHLO mail-yk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752362AbbKVQjJ (ORCPT ); Sun, 22 Nov 2015 11:39:09 -0500 Date: Sun, 22 Nov 2015 11:38:55 -0500 From: William Breathitt Gray To: linus.walleij@linaro.org, gnurou@gmail.com Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpio: 104-idio-16: Disable IRQ on device probe Message-ID: <20151122163855.GA18100@sophia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1092 Lines: 32 IRQ should be disabled on device probe so that the device IRQ is in a known starting state. If IRQ is not disabled, interrupts may be reported as handled by the IRQ handler, despite no irq_unmask calls made by the user. Signed-off-by: William Breathitt Gray --- drivers/gpio/gpio-104-idio-16.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpio-104-idio-16.c b/drivers/gpio/gpio-104-idio-16.c index 81b6904..efe3ff7 100644 --- a/drivers/gpio/gpio-104-idio-16.c +++ b/drivers/gpio/gpio-104-idio-16.c @@ -242,6 +242,9 @@ static int __init idio_16_probe(struct platform_device *pdev) goto err_gpio_register; } + /* Disable IRQ by default */ + outb(0, base + 2); + err = gpiochip_irqchip_add(&idio16gpio->chip, &idio_16_irqchip, 0, handle_edge_irq, IRQ_TYPE_NONE); if (err) { -- 2.4.10 -- 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/