From 5dc2db05f2f690d71d95979b14cca50ab8e49f40 Mon Sep 17 00:00:00 2001 From: AnilKumar Ch Date: Wed, 26 Sep 2012 13:58:26 -0700 Subject: 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 Cc: Eric Piel Reviewed-by: Arnd Bergmann Cc: Mark Brown Cc: Tony Lindgren Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- Documentation/devicetree/bindings/misc/lis302.txt | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'Documentation/devicetree/bindings/misc') diff --git a/Documentation/devicetree/bindings/misc/lis302.txt b/Documentation/devicetree/bindings/misc/lis302.txt index e18af9d1979..6def86f6b05 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: constrained by external circuitry - interrupts: the interrupt generated by the device +Required properties for the I2C bindings: + - compatible: should be set to "st,lis3lv02d" + - reg: i2c slave address + - Vdd-supply: The input supply for Vdd + - Vdd_IO-supply: The input supply for Vdd_IO + Optional properties for all bus drivers: @@ -74,3 +80,33 @@ Example for a SPI device node: st,wakeup-z-hi; }; +Example for a I2C device node: + + lis331dlh: lis331dlh@18 { + compatible = "st,lis331dlh", "st,lis3lv02d"; + reg = <0x18>; + Vdd-supply = <&lis3_reg>; + Vdd_IO-supply = <&lis3_reg>; + + st,click-single-x; + st,click-single-y; + st,click-single-z; + st,click-thresh-x = <10>; + st,click-thresh-y = <10>; + st,click-thresh-z = <10>; + st,irq1-click; + st,irq2-click; + st,wakeup-x-lo; + st,wakeup-x-hi; + st,wakeup-y-lo; + st,wakeup-y-hi; + st,wakeup-z-lo; + st,wakeup-z-hi; + st,min-limit-x = <120>; + st,min-limit-y = <120>; + st,min-limit-z = <140>; + st,max-limit-x = <550>; + st,max-limit-y = <550>; + st,max-limit-z = <750>; + }; + -- cgit v1.2.3