summaryrefslogtreecommitdiff
path: root/drivers/iio/magnetometer
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@intel.com>2015-04-24 18:58:32 +0300
committerJonathan Cameron <jic23@kernel.org>2015-05-10 22:31:45 +0300
commitd11715f087e0c0608de8ec030ca260892e8b8739 (patch)
tree98ef607bf9e1e63d49bf6337393a3292de50190b /drivers/iio/magnetometer
parent553a776b790816161cd334647eae2093fd126e36 (diff)
downloadlinux-d11715f087e0c0608de8ec030ca260892e8b8739.tar.xz
iio: magnetometer: Add ACPI support for MMC35240
We assume that ACPI device tables use MMC35240 to identify MEMSIC's 3 axis magnetic sensor. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r--drivers/iio/magnetometer/mmc35240.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/iio/magnetometer/mmc35240.c b/drivers/iio/magnetometer/mmc35240.c
index 0c7d64c41575..aa6e25d3bfc3 100644
--- a/drivers/iio/magnetometer/mmc35240.c
+++ b/drivers/iio/magnetometer/mmc35240.c
@@ -17,6 +17,7 @@
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/regmap.h>
+#include <linux/acpi.h>
#include <linux/pm.h>
#include <linux/iio/iio.h>
@@ -482,6 +483,12 @@ static const struct dev_pm_ops mmc35240_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(mmc35240_suspend, mmc35240_resume)
};
+static const struct acpi_device_id mmc35240_acpi_match[] = {
+ {"MMC35240", 0},
+ { },
+};
+MODULE_DEVICE_TABLE(acpi, mmc35240_acpi_match);
+
static const struct i2c_device_id mmc35240_id[] = {
{"MMC35240", 0},
{}
@@ -492,6 +499,7 @@ static struct i2c_driver mmc35240_driver = {
.driver = {
.name = MMC35240_DRV_NAME,
.pm = &mmc35240_pm_ops,
+ .acpi_match_table = ACPI_PTR(mmc35240_acpi_match),
},
.probe = mmc35240_probe,
.id_table = mmc35240_id,