summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorMartin Fuzzey <mfuzzey@parkeon.com>2014-11-07 14:06:00 +0000
committerJonathan Cameron <jic23@kernel.org>2014-07-13 10:14:44 +0100
commita3fb96a8c02ae4fa19d9f68f6f3e6bd53c70cd86 (patch)
tree3f8a8aae58cbad9c053f23b5fd5ef5bc3dad2e31 /drivers/iio
parent77a533c73f032050be8b447828358a228a0a5736 (diff)
downloadop-kernel-dev-a3fb96a8c02ae4fa19d9f68f6f3e6bd53c70cd86.zip
op-kernel-dev-a3fb96a8c02ae4fa19d9f68f6f3e6bd53c70cd86.tar.gz
iio: mma8452: add DT support
Allow the mma8452 to be described in the device tree. Since no device specific binding attributes exist the trivial I2C binding is sufficient to describe the compatible string. Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/accel/mma8452.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index 17aeea1..9231f8a 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -423,9 +423,15 @@ static const struct i2c_device_id mma8452_id[] = {
};
MODULE_DEVICE_TABLE(i2c, mma8452_id);
+static const struct of_device_id mma8452_dt_ids[] = {
+ { .compatible = "fsl,mma8452" },
+ { }
+};
+
static struct i2c_driver mma8452_driver = {
.driver = {
.name = "mma8452",
+ .of_match_table = of_match_ptr(mma8452_dt_ids),
.pm = MMA8452_PM_OPS,
},
.probe = mma8452_probe,
OpenPOWER on IntegriCloud