iio: gyro: mpu3050: Allow open drain with anything
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 29 Jun 2017 11:57:04 +0000 (13:57 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 2 Jul 2017 09:24:51 +0000 (10:24 +0100)
Open drain should work fine with rising or high level IRQs,
this code was due to some misunderstanding on my part.

Reported-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/gyro/mpu3050-core.c

index 2be2a5d..e0d241a 100644 (file)
@@ -1063,11 +1063,6 @@ static int mpu3050_trigger_probe(struct iio_dev *indio_dev, int irq)
        case IRQF_TRIGGER_RISING:
                dev_info(&indio_dev->dev,
                         "pulse interrupts on the rising edge\n");
-               if (mpu3050->irq_opendrain) {
-                       dev_info(&indio_dev->dev,
-                                "rising edge incompatible with open drain\n");
-                       mpu3050->irq_opendrain = false;
-               }
                break;
        case IRQF_TRIGGER_FALLING:
                mpu3050->irq_actl = true;
@@ -1078,11 +1073,6 @@ static int mpu3050_trigger_probe(struct iio_dev *indio_dev, int irq)
                mpu3050->irq_latch = true;
                dev_info(&indio_dev->dev,
                         "interrupts active high level\n");
-               if (mpu3050->irq_opendrain) {
-                       dev_info(&indio_dev->dev,
-                                "active high incompatible with open drain\n");
-                       mpu3050->irq_opendrain = false;
-               }
                /*
                 * With level IRQs, we mask the IRQ until it is processed,
                 * but with edge IRQs (pulses) we can queue several interrupts