diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-07-31 19:56:10 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-07-31 20:08:15 -0700 |
commit | 71ff069c3d6a2b23eaf516bc714a20ce0cdc3609 (patch) | |
tree | 39bc2afb8791c01c4202c5838f7895ee908463b6 /drivers/input | |
parent | 1f4bb066433322f6f189b084ceebdfb4add77292 (diff) | |
download | linux-stable-71ff069c3d6a2b23eaf516bc714a20ce0cdc3609.tar.gz linux-stable-71ff069c3d6a2b23eaf516bc714a20ce0cdc3609.tar.bz2 linux-stable-71ff069c3d6a2b23eaf516bc714a20ce0cdc3609.zip |
Input: mma8450 - add device tree probe support
It adds device tree probe support for mma8450 driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Eric Miao <eric.miao@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/mma8450.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c index 20f8f9284f02..6c76cf792991 100644 --- a/drivers/input/misc/mma8450.c +++ b/drivers/input/misc/mma8450.c @@ -24,6 +24,7 @@ #include <linux/delay.h> #include <linux/i2c.h> #include <linux/input-polldev.h> +#include <linux/of_device.h> #define MMA8450_DRV_NAME "mma8450" @@ -229,10 +230,17 @@ static const struct i2c_device_id mma8450_id[] = { }; MODULE_DEVICE_TABLE(i2c, mma8450_id); +static const struct of_device_id mma8450_dt_ids[] = { + { .compatible = "fsl,mma8450", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(i2c, mma8450_dt_ids); + static struct i2c_driver mma8450_driver = { .driver = { .name = MMA8450_DRV_NAME, .owner = THIS_MODULE, + .of_match_table = mma8450_dt_ids, }, .probe = mma8450_probe, .remove = __devexit_p(mma8450_remove), |