diff options
author | Daniel Mack <zonque@gmail.com> | 2012-09-26 16:58:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-26 17:15:55 -0400 |
commit | cbac1a8b89452f378a17cc2c673aca0e53af684d (patch) | |
tree | c52184fb2ef4129bbf4ca8a8b9c280ee4e0fd8a7 /Documentation/devicetree/bindings/misc | |
parent | e2b2ed8365e040b274dd23bdabd34ec3b0e43137 (diff) |
drivers/misc/lis3lv02d: add generic DT matching code
Adds logic to parse lis3 properties from a device tree node and store them
in a freshly allocated lis3lv02d_platform_data.
Note that the actual match tables are left out here. This part should
happen in the drivers that bind to the individual busses (SPI/I2C/PCI).
Also adds some DT bindinds documentation.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Rob Herring <robherring2@gmail.com>
Cc: "AnilKumar, Chimata" <anilkumar@ti.com>
Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net>
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 | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/misc/lis302.txt b/Documentation/devicetree/bindings/misc/lis302.txt new file mode 100644 index 000000000000..e18af9d19793 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/lis302.txt | |||
@@ -0,0 +1,76 @@ | |||
1 | LIS302 accelerometer devicetree bindings | ||
2 | |||
3 | This device is matched via its bus drivers, and has a number of properties | ||
4 | that apply in on the generic device (independent from the bus). | ||
5 | |||
6 | |||
7 | Required properties for the SPI bindings: | ||
8 | - compatible: should be set to "st,lis3lv02d_spi" | ||
9 | - reg: the chipselect index | ||
10 | - spi-max-frequency: maximal bus speed, should be set to 1000000 unless | ||
11 | constrained by external circuitry | ||
12 | - interrupts: the interrupt generated by the device | ||
13 | |||
14 | |||
15 | Optional properties for all bus drivers: | ||
16 | |||
17 | - st,click-single-{x,y,z}: if present, tells the device to issue an | ||
18 | interrupt on single click events on the | ||
19 | x/y/z axis. | ||
20 | - st,click-double-{x,y,z}: if present, tells the device to issue an | ||
21 | interrupt on double click events on the | ||
22 | x/y/z axis. | ||
23 | - st,click-thresh-{x,y,z}: set the x/y/z axis threshold | ||
24 | - st,click-click-time-limit: click time limit, from 0 to 127.5msec | ||
25 | with step of 0.5 msec | ||
26 | - st,click-latency: click latency, from 0 to 255 msec with | ||
27 | step of 1 msec. | ||
28 | - st,click-window: click window, from 0 to 255 msec with | ||
29 | step of 1 msec. | ||
30 | - st,irq{1,2}-disable: disable IRQ 1/2 | ||
31 | - st,irq{1,2}-ff-wu-1: raise IRQ 1/2 on FF_WU_1 condition | ||
32 | - st,irq{1,2}-ff-wu-2: raise IRQ 1/2 on FF_WU_2 condition | ||
33 | - st,irq{1,2}-data-ready: raise IRQ 1/2 on data ready contition | ||
34 | - st,irq{1,2}-click: raise IRQ 1/2 on click condition | ||
35 | - st,irq-open-drain: consider IRQ lines open-drain | ||
36 | - st,irq-active-low: make IRQ lines active low | ||
37 | - st,wu-duration-1: duration register for Free-Fall/Wake-Up | ||
38 | interrupt 1 | ||
39 | - st,wu-duration-2: duration register for Free-Fall/Wake-Up | ||
40 | interrupt 2 | ||
41 | - st,wakeup-{x,y,z}-{lo,hi}: set wakeup condition on x/y/z axis for | ||
42 | upper/lower limit | ||
43 | - st,highpass-cutoff-hz=: 1, 2, 4 or 8 for 1Hz, 2Hz, 4Hz or 8Hz of | ||
44 | highpass cut-off frequency | ||
45 | - st,hipass{1,2}-disable: disable highpass 1/2. | ||
46 | - st,default-rate=: set the default rate | ||
47 | - st,axis-{x,y,z}=: set the axis to map to the three coordinates | ||
48 | - st,{min,max}-limit-{x,y,z} set the min/max limits for x/y/z axis | ||
49 | (used by self-test) | ||
50 | |||
51 | |||
52 | Example for a SPI device node: | ||
53 | |||
54 | lis302@0 { | ||
55 | compatible = "st,lis302dl-spi"; | ||
56 | reg = <0>; | ||
57 | spi-max-frequency = <1000000>; | ||
58 | interrupt-parent = <&gpio>; | ||
59 | interrupts = <104 0>; | ||
60 | |||
61 | st,click-single-x; | ||
62 | st,click-single-y; | ||
63 | st,click-single-z; | ||
64 | st,click-thresh-x = <10>; | ||
65 | st,click-thresh-y = <10>; | ||
66 | st,click-thresh-z = <10>; | ||
67 | st,irq1-click; | ||
68 | st,irq2-click; | ||
69 | st,wakeup-x-lo; | ||
70 | st,wakeup-x-hi; | ||
71 | st,wakeup-y-lo; | ||
72 | st,wakeup-y-hi; | ||
73 | st,wakeup-z-lo; | ||
74 | st,wakeup-z-hi; | ||
75 | }; | ||
76 | |||