Re: Using a GPIO as an interrupt line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux