From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Marc Gonzalez <marc.w.gonzalez@free.fr>
Cc: GPIO <linux-gpio@vger.kernel.org>,
MSM <linux-arm-msm@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
Marc Zyngier <marc.zyngier@arm.com>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: Using a GPIO as an interrupt line
Date: Tue, 19 Nov 2019 09:57:48 +0000 [thread overview]
Message-ID: <20191119095748.GX25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <f0d383f3-8efa-ae68-62af-68f69cd4143f@free.fr>
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
WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Marc Gonzalez <marc.w.gonzalez@free.fr>
Cc: Marc Zyngier <marc.zyngier@arm.com>,
GPIO <linux-gpio@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
MSM <linux-arm-msm@vger.kernel.org>
Subject: Re: Using a GPIO as an interrupt line
Date: Tue, 19 Nov 2019 09:57:48 +0000 [thread overview]
Message-ID: <20191119095748.GX25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <f0d383f3-8efa-ae68-62af-68f69cd4143f@free.fr>
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-11-19 9:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-19 9:28 Using a GPIO as an interrupt line Marc Gonzalez
2019-11-19 9:28 ` Marc Gonzalez
2019-11-19 9:57 ` Russell King - ARM Linux admin [this message]
2019-11-19 9:57 ` Russell King - ARM Linux admin
2019-11-19 10:46 ` Marc Gonzalez
2019-11-19 10:46 ` Marc Gonzalez
2019-11-19 10:56 ` Uwe Kleine-König
2019-11-19 10:56 ` Uwe Kleine-König
2019-11-19 11:00 ` Russell King - ARM Linux admin
2019-11-19 11:00 ` Russell King - ARM Linux admin
2019-11-19 11:03 ` Uwe Kleine-König
2019-11-19 11:03 ` Uwe Kleine-König
2019-11-19 10:58 ` Russell King - ARM Linux admin
2019-11-19 10:58 ` Russell King - ARM Linux admin
2019-11-19 11:46 ` Marc Gonzalez
2019-11-19 11:46 ` Marc Gonzalez
2019-11-19 19:19 ` Bjorn Andersson
2019-11-19 19:19 ` Bjorn Andersson
2019-11-19 19:23 ` Jeffrey Hugo
2019-11-19 19:23 ` Jeffrey Hugo
2019-11-19 19:35 ` Bjorn Andersson
2019-11-19 19:35 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191119095748.GX25745@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=marc.w.gonzalez@free.fr \
--cc=marc.zyngier@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.