iio: imu: inv_mpu6050: Fix probe() failure on older ACPI based machines
commit2a221c04228bbf683fc8d3cb5d177aebb38b393c
authorHans de Goede <hdegoede@redhat.com>
Mon, 18 Jun 2018 16:09:36 +0000 (18 18:09 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 24 Jun 2018 13:50:52 +0000 (24 14:50 +0100)
treed91a3cfbfa3354ca00e5bc63cc3139faa655f893
parent92397a6c38d139d50fabbe9e2dc09b61d53b2377
iio: imu: inv_mpu6050: Fix probe() failure on older ACPI based machines

Commit 5ec6486daa98 ("iio:imu: inv_mpu6050: support more interrupt types")
causes inv_mpu_core_probe() to fail if the IRQ does not have a
trigger-type setup.

This happens on machines where the mpu6050 is enumerated through ACPI and
an older Interrupt type ACPI resource is used for the interrupt, rather
then a GpioInt type type, causing the mpu6050 driver to no longer work
there. This happens on e.g. the Asus T100TA.

This commits makes the mpu6050 fallback to the old IRQF_TRIGGER_RISING
default if the irq-type is not setup, fixing this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Fixes: 5ec6486daa98 ("iio:imu: inv_mpu6050: support more interrupt types")
Reviewed-by: Martin Kelly <mkelly@xevo.com>
Reviewed-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c