Re: [PATCH 2/2] gpio: pca953x: use a per instance irq_chip structure

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

 



On Wed, Jan 16, 2019 at 10:32 AM Thomas Petazzoni
<thomas.petazzoni@xxxxxxxxxxx> wrote:

> When a system has two PCA953x GPIO expanders, the kernel complains with:
>
> gpio gpiochip2: (0-0021): detected irqchip that is shared with multiple gpiochips: please fix the driver.
>
> Indeed, there is a single instance of "struct irq_chip" that gets
> re-used for both PCA953x instance. This commit moves the "struct
> irq_chip" to be part of the "struct pca953x_chip", so that we have one
> "struct irq_chip" per PCA953X instance.
>
> As part of this, the name of the irq_chip is also made different on a
> per-instance basis, now using the dev_name() of the I2C device. This
> changes what is visible in /proc/interrupts.
>
> Before:
>
>  47:          0          0   pca953x  10 Edge      e0100000.sdhci cd
>  48:          0          0   pca953x   6 Edge      e0101000.sdhci cd
>
> After:
>
>  47:          0          0    0-0020  10 Edge      e0100000.sdhci cd
>  48:          2          0    0-0020   6 Edge      e0101000.sdhci cd
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxx>

Patch applied.

Yours,
Linus Walleij



[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