From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 272D4C432C3 for ; Tue, 19 Nov 2019 09:58:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C560D20857 for ; Tue, 19 Nov 2019 09:57:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="JTI0qAU2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726000AbfKSJ57 (ORCPT ); Tue, 19 Nov 2019 04:57:59 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:48996 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725280AbfKSJ57 (ORCPT ); Tue, 19 Nov 2019 04:57:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gZElBFP+ZpH77PfQXR56bEvjt6aoOvjVgweRa6xnEqM=; b=JTI0qAU20VpGo/fITm907fTqS TZ52bT2HAr949tARrT+hadXSfUWbZAb+Tu46W7mFWDVijXLEZ6+POf6rXOnay9iUPwhxx6DDANLdc On7PMrFnFnkjABHsiv8M8HENcH4iSGyS42/i+/epbkuPDJoeCK/8hpwPK4tCKM1S2B1LRY2vBkt0K AIRVsSplF3l0W/B7eEWA9/Vos00yB4ASzAV74ki6deetynL6YobtEpOd1NFAtWrWeOkOLhW8R3O1O D2pAN7n9hF64PgKK/KTwcilclE9BKJI1DV7cXhpFJWUwWVpbR2wdE9FEo19asR5FkZIoV64fA8//A htRzD9IJw==; Received: from shell.armlinux.org.uk ([2002:4e20:1eda:1:5054:ff:fe00:4ec]:37516) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iX0Ge-0000UC-Bm; Tue, 19 Nov 2019 09:57:52 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1iX0Ga-0000ch-Hs; Tue, 19 Nov 2019 09:57:48 +0000 Date: Tue, 19 Nov 2019 09:57:48 +0000 From: Russell King - ARM Linux admin To: Marc Gonzalez Cc: GPIO , MSM , Linux ARM , Marc Zyngier , Linus Walleij Subject: Re: Using a GPIO as an interrupt line Message-ID: <20191119095748.GX25745@shell.armlinux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Tue, Nov 19, 2019 at 10:28:15AM +0100, Marc Gonzalez wrote: > Hello, > > The board I'm working on provides a TCA9539 I/O expander. > Or, as the datasheet(*) calls it, a "Low Voltage 16-Bit I2C and > SMBus Low-Power I/O Expander with Interrupt Output, Reset Pin, > and Configuration Registers" > > (*) http://www.ti.com/lit/ds/symlink/tca9539.pdf > > The binding is documented in Documentation/devicetree/bindings/gpio/gpio-pca953x.txt > > I have some doubts about the interrupt output, described as: > > Optional properties: > - interrupts: interrupt specifier for the device's interrupt output. > > In my board's DT, the I/O expander is described as: > > exp1: gpio@74 { > compatible = "ti,tca9539"; > reg = <0x74>; > gpio-controller; > #gpio-cells = <2>; > reset-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; > pinctrl-names = "default"; > pinctrl-0 = <&top_exp_rst>; > interrupt-parent = <&tlmm>; > interrupts = <42 IRQ_TYPE_LEVEL_HIGH>; This specifies an interrupt signal, number 42, on the tlmm interrupt controller. It isn't a GPIO specification. Not every interrupt is a GPIO, and some SoCs can have dedicated interrupt pins that are exactly that. Hence, needlessly limiting an external device to requiring a GPIO for its interrupt is detrimental. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up