aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 16:35:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 16:35:03 -0400
commitae32adc1e06d096399f195eeda12d443d53539c4 (patch)
tree9fc69aaabc6a7b95d435ae7197f57aaa672933db /Documentation
parentf465d145d76803fe6332092775d891c8c509aa44 (diff)
parent9868a060ccf769c08ec378a9829137e272e9a92c (diff)
Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux
Pull i2c-embedded changes from Wolfram Sang: "Major changes: - lots of devicetree additions for existing drivers. I tried hard to make sure the bindings are proper. In more complicated cases, I requested acks from people having more experience with them than me. That took a bit of extra time and also some time went into discussions with developers about what bindings are and what not. I have the feeling that the workflow with bindings should be improved to scale better. I will spend some more thought on this... - i2c-muxes are succesfully used meanwhile, so we dropped EXPERIMENTAL for them and renamed the drivers to a standard pattern to match the rest of the subsystem. They can also be used with devicetree now. - ixp2000 was removed since the whole platform goes away. - cleanups (strlcpy instead of strcpy, NULL instead of 0) - The rest is typical driver fixes I assume. All patches have been in linux-next at least since v3.4-rc6." Fixed up trivial conflict in arch/arm/mach-lpc32xx/common.c due to the same patch already having come in through the arm/soc trees, with additional patches on top of it. * 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux: (35 commits) i2c: davinci: Free requested IRQ in remove i2c: ocores: register OF i2c devices i2c: tegra: notify transfer-complete after clearing status. I2C: xiic: Add OF binding support i2c: Rename last mux driver to standard pattern i2c: tegra: fix 10bit address configuration i2c: muxes: rename first set of drivers to a standard pattern of/i2c: implement of_find_i2c_adapter_by_node i2c: implement i2c_verify_adapter i2c-s3c2410: Add HDMIPHY quirk for S3C2440 i2c-s3c2410: Rework device type handling i2c: muxes are not EXPERIMENTAL anymore i2c/of: Automatically populate i2c mux busses from device tree data. i2c: Add a struct device * parameter to i2c_add_mux_adapter() of/i2c: call i2c_verify_client from of_find_i2c_device_by_node i2c: designware: Add clk_{un}prepare() support i2c: designware: add PM support i2c: ixp2000: remove driver i2c: pnx: add device tree support i2c: imx: don't use strcpy but strlcpy ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/i2c/mux.txt60
-rw-r--r--Documentation/devicetree/bindings/i2c/samsung-i2c.txt8
-rw-r--r--Documentation/devicetree/bindings/i2c/xiic.txt22
-rw-r--r--Documentation/i2c/muxes/i2c-mux-gpio (renamed from Documentation/i2c/muxes/gpio-i2cmux)12
4 files changed, 94 insertions, 8 deletions
diff --git a/Documentation/devicetree/bindings/i2c/mux.txt b/Documentation/devicetree/bindings/i2c/mux.txt
new file mode 100644
index 000000000000..af84cce5cd7b
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/mux.txt
@@ -0,0 +1,60 @@
1Common i2c bus multiplexer/switch properties.
2
3An i2c bus multiplexer/switch will have several child busses that are
4numbered uniquely in a device dependent manner. The nodes for an i2c bus
5multiplexer/switch will have one child node for each child
6bus.
7
8Required properties:
9- #address-cells = <1>;
10- #size-cells = <0>;
11
12Required properties for child nodes:
13- #address-cells = <1>;
14- #size-cells = <0>;
15- reg : The sub-bus number.
16
17Optional properties for child nodes:
18- Other properties specific to the multiplexer/switch hardware.
19- Child nodes conforming to i2c bus binding
20
21
22Example :
23
24 /*
25 An NXP pca9548 8 channel I2C multiplexer at address 0x70
26 with two NXP pca8574 GPIO expanders attached, one each to
27 ports 3 and 4.
28 */
29
30 mux@70 {
31 compatible = "nxp,pca9548";
32 reg = <0x70>;
33 #address-cells = <1>;
34 #size-cells = <0>;
35
36 i2c@3 {
37 #address-cells = <1>;
38 #size-cells = <0>;
39 reg = <3>;
40
41 gpio1: gpio@38 {
42 compatible = "nxp,pca8574";
43 reg = <0x38>;
44 #gpio-cells = <2>;
45 gpio-controller;
46 };
47 };
48 i2c@4 {
49 #address-cells = <1>;
50 #size-cells = <0>;
51 reg = <4>;
52
53 gpio2: gpio@38 {
54 compatible = "nxp,pca8574";
55 reg = <0x38>;
56 #gpio-cells = <2>;
57 gpio-controller;
58 };
59 };
60 };
diff --git a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt b/Documentation/devicetree/bindings/i2c/samsung-i2c.txt
index 38832c712919..b6cb5a12c672 100644
--- a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/samsung-i2c.txt
@@ -6,14 +6,18 @@ Required properties:
6 - compatible: value should be either of the following. 6 - compatible: value should be either of the following.
7 (a) "samsung, s3c2410-i2c", for i2c compatible with s3c2410 i2c. 7 (a) "samsung, s3c2410-i2c", for i2c compatible with s3c2410 i2c.
8 (b) "samsung, s3c2440-i2c", for i2c compatible with s3c2440 i2c. 8 (b) "samsung, s3c2440-i2c", for i2c compatible with s3c2440 i2c.
9 (c) "samsung, s3c2440-hdmiphy-i2c", for s3c2440-like i2c used
10 inside HDMIPHY block found on several samsung SoCs
9 - reg: physical base address of the controller and length of memory mapped 11 - reg: physical base address of the controller and length of memory mapped
10 region. 12 region.
11 - interrupts: interrupt number to the cpu. 13 - interrupts: interrupt number to the cpu.
12 - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges. 14 - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges.
13 - gpios: The order of the gpios should be the following: <SDA, SCL>.
14 The gpio specifier depends on the gpio controller.
15 15
16Optional properties: 16Optional properties:
17 - gpios: The order of the gpios should be the following: <SDA, SCL>.
18 The gpio specifier depends on the gpio controller. Required in all
19 cases except for "samsung,s3c2440-hdmiphy-i2c" whose input/output
20 lines are permanently wired to the respective client
17 - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not 21 - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not
18 specified, default value is 0. 22 specified, default value is 0.
19 - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not 23 - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not
diff --git a/Documentation/devicetree/bindings/i2c/xiic.txt b/Documentation/devicetree/bindings/i2c/xiic.txt
new file mode 100644
index 000000000000..ceabbe91ae44
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/xiic.txt
@@ -0,0 +1,22 @@
1Xilinx IIC controller:
2
3Required properties:
4- compatible : Must be "xlnx,xps-iic-2.00.a"
5- reg : IIC register location and length
6- interrupts : IIC controller unterrupt
7- #address-cells = <1>
8- #size-cells = <0>
9
10Optional properties:
11- Child nodes conforming to i2c bus binding
12
13Example:
14
15 axi_iic_0: i2c@40800000 {
16 compatible = "xlnx,xps-iic-2.00.a";
17 interrupts = < 1 2 >;
18 reg = < 0x40800000 0x10000 >;
19
20 #size-cells = <0>;
21 #address-cells = <1>;
22 };
diff --git a/Documentation/i2c/muxes/gpio-i2cmux b/Documentation/i2c/muxes/i2c-mux-gpio
index 811cd78d4cdc..bd9b2299b739 100644
--- a/Documentation/i2c/muxes/gpio-i2cmux
+++ b/Documentation/i2c/muxes/i2c-mux-gpio
@@ -1,11 +1,11 @@
1Kernel driver gpio-i2cmux 1Kernel driver i2c-gpio-mux
2 2
3Author: Peter Korsgaard <peter.korsgaard@barco.com> 3Author: Peter Korsgaard <peter.korsgaard@barco.com>
4 4
5Description 5Description
6----------- 6-----------
7 7
8gpio-i2cmux is an i2c mux driver providing access to I2C bus segments 8i2c-gpio-mux is an i2c mux driver providing access to I2C bus segments
9from a master I2C bus and a hardware MUX controlled through GPIO pins. 9from a master I2C bus and a hardware MUX controlled through GPIO pins.
10 10
11E.G.: 11E.G.:
@@ -26,16 +26,16 @@ according to the settings of the GPIO pins 1..N.
26Usage 26Usage
27----- 27-----
28 28
29gpio-i2cmux uses the platform bus, so you need to provide a struct 29i2c-gpio-mux uses the platform bus, so you need to provide a struct
30platform_device with the platform_data pointing to a struct 30platform_device with the platform_data pointing to a struct
31gpio_i2cmux_platform_data with the I2C adapter number of the master 31gpio_i2cmux_platform_data with the I2C adapter number of the master
32bus, the number of bus segments to create and the GPIO pins used 32bus, the number of bus segments to create and the GPIO pins used
33to control it. See include/linux/gpio-i2cmux.h for details. 33to control it. See include/linux/i2c-gpio-mux.h for details.
34 34
35E.G. something like this for a MUX providing 4 bus segments 35E.G. something like this for a MUX providing 4 bus segments
36controlled through 3 GPIO pins: 36controlled through 3 GPIO pins:
37 37
38#include <linux/gpio-i2cmux.h> 38#include <linux/i2c-gpio-mux.h>
39#include <linux/platform_device.h> 39#include <linux/platform_device.h>
40 40
41static const unsigned myboard_gpiomux_gpios[] = { 41static const unsigned myboard_gpiomux_gpios[] = {
@@ -57,7 +57,7 @@ static struct gpio_i2cmux_platform_data myboard_i2cmux_data = {
57}; 57};
58 58
59static struct platform_device myboard_i2cmux = { 59static struct platform_device myboard_i2cmux = {
60 .name = "gpio-i2cmux", 60 .name = "i2c-gpio-mux",
61 .id = 0, 61 .id = 0,
62 .dev = { 62 .dev = {
63 .platform_data = &myboard_i2cmux_data, 63 .platform_data = &myboard_i2cmux_data,