Re: [PATCH 1/4] pinctrl: mcp23s08: IRQ behavior for open-drain interrupts

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

 



On Thu, Jan 25, 2018 at 4:08 PM, Jan Kundrát <jan.kundrat@xxxxxxxxx> wrote:

> The hardware supports three different IRQ modes:
> - open drain, i.e., an active-low output which requires an external
>   pull-up and supports IRQ line sharing,
> - active low, with push-pull output,
> - active high, with push-pull output.
>
> My understanding of electronics is limited, but it is "wrong" to connect
> different push-pull outpus together. It could sort-of work if the
> chips/board actually have some resistors there, but it's an ugly thing
> to do.
>
> In the past, this driver did not touch the ODR bit (for open-drain)
> operation. During power-on-reset, it is set to zero. Unless some
> platform code actually set this bit to one, this means that the code
> never supported open drain operation.
>
> This change makes this handling explicit. If you want sharing of the IRQ
> line, then use the microchip,irq-open-drain mode and add an external
> pull-up.
>
> There's some risk here. If, e.g., the bootloader sets the ODR bit for
> some reason, the HW shares the IRQ lines, and nobody changes the DT,
> then your HW will suddenly use push-pull driver for the IRQ line. If
> there is any other chip on the same lane, the HW might suffer (my chip
> survived this when I "tested" this by accident with no bootloader code
> to set the ODR bit).
>
> Signed-off-by: Jan Kundrát <jan.kundrat@xxxxxxxxx>

I'm holding this patch back pending the discussion with Phil
and any alternative approach from him.

Just resend it if nothing happens for a while.

I still try to apply the other patches for now (2-4).

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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