On Thu, Sep 7, 2017 at 5:10 PM, Guenter Roeck <linux@xxxxxxxxxxxx> wrote: > On Wed, Sep 06, 2017 at 11:50:01PM +0200, Davide Hug wrote: >> - Which solution is preferable? > > Neither. If the gpio subsystem does not support interrupts on > bidirectional gpio pins, it sould really refuse to change direction > on a pin which has an interrupt assigned to it. I think this needs to be fixed properly in gpio, but I just can't see the solution. It's essentially IRQ on an open drain line I think? (I tried to explain basic open drain concepts in Documentation/gpio/driver.txt as I understand them.) Since open drain is a bit "in-between" it should (I guess) be allowed to have IRQs on them even if they are output for a while, but then I guess they should be masked/unmasked in the irqchip part of the driver at the same time. Maybe part of the problem is simply that the line is not set up as open drain in the hardware? We have open drain flags for device trees and board files using the new descriptor infrastructure. Davide can you investigate using the opendrain flag when requesting the line? Maybe the driver needs to be converted to use GPIO descriptors first though :/ Also: which GPIO controller is this used with, so I can check how/if it supports open drain? Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html