iio: imu: inv_mpu6050: ACPI enumeration
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 15 Dec 2014 21:19:21 +0000 (13:19 -0800)
committerJonathan Cameron <jic23@kernel.org>
Fri, 26 Dec 2014 12:38:47 +0000 (12:38 +0000)
Added changes so that the module can be enumerated via ACPI.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c

index 6d2c115f39b4c68f4eb773d5566b2853ae72f27f..f73e60b7a79611b8825bfe90ea3ba5a5e1b253b1 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/spinlock.h>
 #include <linux/iio/iio.h>
 #include <linux/i2c-mux.h>
+#include <linux/acpi.h>
 #include "inv_mpu_iio.h"
 
 /*
@@ -875,6 +876,13 @@ static const struct i2c_device_id inv_mpu_id[] = {
 
 MODULE_DEVICE_TABLE(i2c, inv_mpu_id);
 
+static const struct acpi_device_id inv_acpi_match[] = {
+       {"INVN6500", 0},
+       { },
+};
+
+MODULE_DEVICE_TABLE(acpi, inv_acpi_match);
+
 static struct i2c_driver inv_mpu_driver = {
        .probe          =       inv_mpu_probe,
        .remove         =       inv_mpu_remove,
@@ -883,6 +891,7 @@ static struct i2c_driver inv_mpu_driver = {
                .owner  =       THIS_MODULE,
                .name   =       "inv-mpu6050",
                .pm     =       INV_MPU6050_PMOPS,
+               .acpi_match_table = ACPI_PTR(inv_acpi_match),
        },
 };