Re: [PATCH v4 3/3] pinctrl: mcp23s08: add open drain configuration for irq output

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

 



On Tuesday, February 20, 2018, 6:15:46 PM CET Jan Kundrát wrote:
> I was told that the appropriate way forward are device drivers which do not
> specify the IRQ polarity. Apparently, people are supposed to do that in
> their DT.
> 
> So, in this context:
> 
> - pinctrl-mcp23s08.c should only specify IRQF_ONESHOT | IRQF_SHARED
> - the DT should use an appropriate IRQ_TYPE_LEVEL_LOW or
> IRQ_TYPE_LEVEL_HIGH based on what the CPU expects to see on its IRQ pins
> - the DT must also set a property to configure the MCP23xxx device to
> *generate* an IRQ by the active-high flag, or another flag for an
> open-drain active-low IRQ output suitable for connecting directly to an
> interrupt line which gets shared by several open-drain IRQ producers
> - whoever supplies the DT must now check that their settings "make sense"
> 
> Yes, this means that people might have to update their DTs. To me, that
> makes sense. If you ask me, the DT is already sort-of broken because it's
> using IRQF_SHARED with a push-pull IRQ output. Yes, one can fix that with
> extra transistors, but that sounds quite ugly, doesn't it. 

Well, that is the exact situation on the board I had to deal with. The MCP was 
attached to a transisitor inverting the signal. The output on MCP has to be 
push-pull as there was no pull-up oder -down. But the line connecting the 
inverter to the CPU was an open-drain one and this line was actually a shared 
IRQ line. So of course the line bewteen MCP and inverter cannot be shared, but 
the IRQ used on CPU is actually shared. How can this be respresented in DT?

Best reagrds,
Alexander

--
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