On Sun, Jun 25, 2017 at 11:34 AM, Lorenzo Bianconi <lorenzo.bianconi83@xxxxxxxxx> wrote: >> In common with the mpu3050 which was the first driver in IIO to do open drain, I think I implemented it on the ST sensors first actually. >> I think you need to think about precedence as we allow for IRQF_RISING >> and IRQF_FALLING already. Open drain only allows for shared interrupts >> if IRQF_FALLING (I think) >>> err = devm_request_threaded_irq(hw->dev, hw->irq, >>> st_lsm6dsx_handler_irq, >>> st_lsm6dsx_handler_thread, > > I have not got the difference between IRQF_RISING and IRQF_FALLING > when the irq line > is marked as shared (when open drain is enabled). > Looking at the code, mpu3050 gyro sensor does not support shared interrupts > with IRQF_RISING and IRQF_TRIGGER_HIGH. Is it a hw limitation? It seems like I have inverted the logic in the MPU3050 driver. I'll send a patch. > Speaking with digital designer, lsm6dsx series allows open drain mode > even if the requested irq line > is IRQF_TRIGGER_HIGH or IRQF_RISING, we need to add a pull-down resistor. > Moreover ST framework already supports open drain if the requested > interrupt is IRQF_RISING. This seems correct. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html