Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262381
b: refs/heads/master
c: 71ff069
h: refs/heads/master
i:
  262379: a02da1f
v: v3
  • Loading branch information
Shawn Guo authored and Dmitry Torokhov committed Aug 1, 2011
1 parent 3a96bb0 commit 04c6a2a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f4bb066433322f6f189b084ceebdfb4add77292
refs/heads/master: 71ff069c3d6a2b23eaf516bc714a20ce0cdc3609
11 changes: 11 additions & 0 deletions trunk/Documentation/devicetree/bindings/input/fsl-mma8450.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* Freescale MMA8450 3-Axis Accelerometer

Required properties:
- compatible : "fsl,mma8450".

Example:

accelerometer: mma8450@1c {
compatible = "fsl,mma8450";
reg = <0x1c>;
};
8 changes: 8 additions & 0 deletions trunk/drivers/input/misc/mma8450.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 04c6a2a

Please sign in to comment.