From 2501ec97663d84cfbc8fd8848c382f89c3bf8d1d Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Sat, 30 Jul 2011 11:55:38 -0700 Subject: Input: kxtj9 - explicitly include module.h We need to explicitly include module.h since some of its facilities are used. Signed-off-by: Stephen Rothwell Signed-off-by: Dmitry Torokhov --- drivers/input/misc/kxtj9.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/input/misc') diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c index c456f63b6bae..783597a9a64a 100644 --- a/drivers/input/misc/kxtj9.c +++ b/drivers/input/misc/kxtj9.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From 71ff069c3d6a2b23eaf516bc714a20ce0cdc3609 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sun, 31 Jul 2011 19:56:10 -0700 Subject: Input: mma8450 - add device tree probe support It adds device tree probe support for mma8450 driver. Signed-off-by: Shawn Guo Acked-by: Eric Miao Acked-by: Grant Likely Signed-off-by: Dmitry Torokhov --- Documentation/devicetree/bindings/input/fsl-mma8450.txt | 11 +++++++++++ drivers/input/misc/mma8450.c | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/fsl-mma8450.txt (limited to 'drivers/input/misc') diff --git a/Documentation/devicetree/bindings/input/fsl-mma8450.txt b/Documentation/devicetree/bindings/input/fsl-mma8450.txt new file mode 100644 index 000000000000..a00c94ccbdee --- /dev/null +++ b/Documentation/devicetree/bindings/input/fsl-mma8450.txt @@ -0,0 +1,11 @@ +* Freescale MMA8450 3-Axis Accelerometer + +Required properties: +- compatible : "fsl,mma8450". + +Example: + +accelerometer: mma8450@1c { + compatible = "fsl,mma8450"; + reg = <0x1c>; +}; 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 #include #include +#include #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), -- cgit v1.2.3