aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJonas Bonn <jonas@southpole.se>2010-11-24 11:26:22 -0500
committerBen Dooks <ben-linux@fluff.org>2011-01-03 20:04:29 -0500
commitd9240e612ba79287e29f2eac52f94a2016fb0914 (patch)
treefb07170246eeb12c87a3e1261b008d7e13360385 /drivers/i2c
parent47def5b80f087d033013c0609679812cfafd6b49 (diff)
i2c-ocores: add some device tree documentation
This puts some documentation for the device tree configuration at the head of the driver file. Hopefully this can get moved to a common area for this type of documentation at a later date; unfortunately, there isn't really such a place in the kernel tree at this time. Furthermore, the regstep and clock-frequency parameters are really bus parameters and should probably be passed to the driver in a better way. Consider that a TODO. Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-ocores.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index dee0352737d7..ef3bcb1ce864 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -9,6 +9,41 @@
9 * kind, whether express or implied. 9 * kind, whether express or implied.
10 */ 10 */
11 11
12/*
13 * Device tree configuration:
14 *
15 * Required properties:
16 * - compatible : "opencores,i2c-ocores"
17 * - reg : bus address start and address range size of device
18 * - interrupts : interrupt number
19 * - regstep : size of device registers in bytes
20 * - clock-frequency : frequency of bus clock in Hz
21 *
22 * Example:
23 *
24 * i2c0: ocores@a0000000 {
25 * compatible = "opencores,i2c-ocores";
26 * reg = <0xa0000000 0x8>;
27 * interrupts = <10>;
28 *
29 * regstep = <1>;
30 * clock-frequency = <20000000>;
31 *
32 * -- Devices connected on this I2C bus get
33 * -- defined here; address- and size-cells
34 * -- apply to these child devices
35 *
36 * #address-cells = <1>;
37 * #size-cells = <0>;
38 *
39 * dummy@60 {
40 * compatible = "dummy";
41 * reg = <60>;
42 * };
43 * };
44 *
45 */
46
12#include <linux/kernel.h> 47#include <linux/kernel.h>
13#include <linux/module.h> 48#include <linux/module.h>
14#include <linux/init.h> 49#include <linux/init.h>