diff options
author | AnilKumar Ch <anilkumar@ti.com> | 2012-09-26 16:58:26 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-26 17:18:48 -0400 |
commit | 5dc2db05f2f690d71d95979b14cca50ab8e49f40 (patch) | |
tree | ffb1a14b446fc9f380a5ea11d3e2c5dd8d535c31 /Documentation/devicetree/bindings/misc | |
parent | 79df8d27d9f4382647c31ef17f7402833d682b73 (diff) |
drivers/misc/lis3lv02d/lis3lv02d_i2c.c: add lis3lv02d device tree init
Add lis3lv02d device tree initialization code/API to take pdata from
device node. Also adds device tree init matching table support to
lis3lv02d_i2c driver. If the driver data is passed from device tree, then
this driver picks up platform data from device node through common/generic
lis3lv02d.c driver.
[akpm@linux-foundation.org: fix CONFIG_OF=n build]
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/devicetree/bindings/misc')
-rw-r--r-- | Documentation/devicetree/bindings/misc/lis302.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/misc/lis302.txt b/Documentation/devicetree/bindings/misc/lis302.txt index e18af9d19793..6def86f6b053 100644 --- a/Documentation/devicetree/bindings/misc/lis302.txt +++ b/Documentation/devicetree/bindings/misc/lis302.txt | |||
@@ -11,6 +11,12 @@ Required properties for the SPI bindings: | |||
11 | constrained by external circuitry | 11 | constrained by external circuitry |
12 | - interrupts: the interrupt generated by the device | 12 | - interrupts: the interrupt generated by the device |
13 | 13 | ||
14 | Required properties for the I2C bindings: | ||
15 | - compatible: should be set to "st,lis3lv02d" | ||
16 | - reg: i2c slave address | ||
17 | - Vdd-supply: The input supply for Vdd | ||
18 | - Vdd_IO-supply: The input supply for Vdd_IO | ||
19 | |||
14 | 20 | ||
15 | Optional properties for all bus drivers: | 21 | Optional properties for all bus drivers: |
16 | 22 | ||
@@ -74,3 +80,33 @@ Example for a SPI device node: | |||
74 | st,wakeup-z-hi; | 80 | st,wakeup-z-hi; |
75 | }; | 81 | }; |
76 | 82 | ||
83 | Example for a I2C device node: | ||
84 | |||
85 | lis331dlh: lis331dlh@18 { | ||
86 | compatible = "st,lis331dlh", "st,lis3lv02d"; | ||
87 | reg = <0x18>; | ||
88 | Vdd-supply = <&lis3_reg>; | ||
89 | Vdd_IO-supply = <&lis3_reg>; | ||
90 | |||
91 | st,click-single-x; | ||
92 | st,click-single-y; | ||
93 | st,click-single-z; | ||
94 | st,click-thresh-x = <10>; | ||
95 | st,click-thresh-y = <10>; | ||
96 | st,click-thresh-z = <10>; | ||
97 | st,irq1-click; | ||
98 | st,irq2-click; | ||
99 | st,wakeup-x-lo; | ||
100 | st,wakeup-x-hi; | ||
101 | st,wakeup-y-lo; | ||
102 | st,wakeup-y-hi; | ||
103 | st,wakeup-z-lo; | ||
104 | st,wakeup-z-hi; | ||
105 | st,min-limit-x = <120>; | ||
106 | st,min-limit-y = <120>; | ||
107 | st,min-limit-z = <140>; | ||
108 | st,max-limit-x = <550>; | ||
109 | st,max-limit-y = <550>; | ||
110 | st,max-limit-z = <750>; | ||
111 | }; | ||
112 | |||