diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 11:12:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 11:12:16 -0500 |
commit | 41440ffe21f29bdb985cab76b2d0b06d83e63b19 (patch) | |
tree | 1d7d1ff6f699ccbabb71c7bc4172f7d15bc4bc45 /Documentation | |
parent | dad3de7d0090280f44ff27131ed2878f1ab6ddad (diff) | |
parent | 6471b68982d3bb1a593c3e183c804ecf830125d3 (diff) |
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
i2c-stub: Documentation update
i2c-stub: Allow user to disable some commands
i2c-stub: Implement I2C block support
i2c: Refactor for_each callbacks
i2c-i801: Retry on lost arbitration
i2c: Remove big kernel lock from i2cdev_open
ics932s401: Clean up detect function
i2c: Simplify i2c_detect_address
i2c: Drop probe, ignore and force module parameters
i2c: Add missing __devinit markers to old i2c adapter drivers
i2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR
i2c: Prevent priority inversion on top of bus lock
i2c-voodoo3: Delete
i2c-powermac: Drop temporary name buffer
i2c-powermac: Include the i2c_adapter in struct pmac_i2c_bus
i2c-powermac: Log errors
i2c-powermac: Refactor i2c_powermac_smbus_xfer
i2c-powermac: Reject unsupported I2C transactions
i2c/chips: Move ds1682 to drivers/misc
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 9 | ||||
-rw-r--r-- | Documentation/i2c/busses/i2c-voodoo3 | 62 | ||||
-rw-r--r-- | Documentation/i2c/i2c-stub | 16 | ||||
-rw-r--r-- | Documentation/i2c/old-module-parameters | 44 |
4 files changed, 55 insertions, 76 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index a004b04ffd3a..591e94448e63 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -407,15 +407,6 @@ Who: Alex Chiang <achiang@hp.com> | |||
407 | 407 | ||
408 | --------------------------- | 408 | --------------------------- |
409 | 409 | ||
410 | What: i2c-voodoo3 driver | ||
411 | When: October 2009 | ||
412 | Why: Superseded by tdfxfb. I2C/DDC support used to live in a separate | ||
413 | driver but this caused driver conflicts. | ||
414 | Who: Jean Delvare <khali@linux-fr.org> | ||
415 | Krzysztof Helt <krzysztof.h1@wp.pl> | ||
416 | |||
417 | --------------------------- | ||
418 | |||
419 | What: CONFIG_RFKILL_INPUT | 410 | What: CONFIG_RFKILL_INPUT |
420 | When: 2.6.33 | 411 | When: 2.6.33 |
421 | Why: Should be implemented in userspace, policy daemon. | 412 | Why: Should be implemented in userspace, policy daemon. |
diff --git a/Documentation/i2c/busses/i2c-voodoo3 b/Documentation/i2c/busses/i2c-voodoo3 deleted file mode 100644 index 62d90a454d39..000000000000 --- a/Documentation/i2c/busses/i2c-voodoo3 +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | Kernel driver i2c-voodoo3 | ||
2 | |||
3 | Supported adapters: | ||
4 | * 3dfx Voodoo3 based cards | ||
5 | * Voodoo Banshee based cards | ||
6 | |||
7 | Authors: | ||
8 | Frodo Looijaard <frodol@dds.nl>, | ||
9 | Philip Edelbrock <phil@netroedge.com>, | ||
10 | Ralph Metzler <rjkm@thp.uni-koeln.de>, | ||
11 | Mark D. Studebaker <mdsxyz123@yahoo.com> | ||
12 | |||
13 | Main contact: Philip Edelbrock <phil@netroedge.com> | ||
14 | |||
15 | The code is based upon Ralph's test code (he did the hard stuff ;') | ||
16 | |||
17 | Description | ||
18 | ----------- | ||
19 | |||
20 | The 3dfx Voodoo3 chip contains two I2C interfaces (aka a I2C 'master' or | ||
21 | 'host'). | ||
22 | |||
23 | The first interface is used for DDC (Data Display Channel) which is a | ||
24 | serial channel through the VGA monitor connector to a DDC-compliant | ||
25 | monitor. This interface is defined by the Video Electronics Standards | ||
26 | Association (VESA). The standards are available for purchase at | ||
27 | http://www.vesa.org . | ||
28 | |||
29 | The second interface is a general-purpose I2C bus. The intent by 3dfx was | ||
30 | to allow manufacturers to add extra chips to the video card such as a | ||
31 | TV-out chip such as the BT869 or possibly even I2C based temperature | ||
32 | sensors like the ADM1021 or LM75. | ||
33 | |||
34 | Stability | ||
35 | --------- | ||
36 | |||
37 | Seems to be stable on the test machine, but needs more testing on other | ||
38 | machines. Simultaneous accesses of the DDC and I2C busses may cause errors. | ||
39 | |||
40 | Supported Devices | ||
41 | ----------------- | ||
42 | |||
43 | Specifically, this driver was written and tested on the '3dfx Voodoo3 AGP | ||
44 | 3000' which has a tv-out feature (s-video or composite). According to the | ||
45 | docs and discussions, this code should work for any Voodoo3 based cards as | ||
46 | well as Voodoo Banshee based cards. The DDC interface has been tested on a | ||
47 | Voodoo Banshee card. | ||
48 | |||
49 | Issues | ||
50 | ------ | ||
51 | |||
52 | Probably many, but it seems to work OK on my system. :') | ||
53 | |||
54 | |||
55 | External Device Connection | ||
56 | -------------------------- | ||
57 | |||
58 | The digital video input jumpers give availability to the I2C bus. | ||
59 | Specifically, pins 13 and 25 (bottom row middle, and bottom right-end) are | ||
60 | the I2C clock and I2C data lines, respectively. +5V and GND are probably | ||
61 | also easily available making the addition of extra I2C/SMBus devices easy | ||
62 | to implement. | ||
diff --git a/Documentation/i2c/i2c-stub b/Documentation/i2c/i2c-stub index 0d8be1c20c16..fa4b669c166b 100644 --- a/Documentation/i2c/i2c-stub +++ b/Documentation/i2c/i2c-stub | |||
@@ -2,9 +2,9 @@ MODULE: i2c-stub | |||
2 | 2 | ||
3 | DESCRIPTION: | 3 | DESCRIPTION: |
4 | 4 | ||
5 | This module is a very simple fake I2C/SMBus driver. It implements four | 5 | This module is a very simple fake I2C/SMBus driver. It implements five |
6 | types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, and | 6 | types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, (r/w) |
7 | (r/w) word data. | 7 | word data, and (r/w) I2C block data. |
8 | 8 | ||
9 | You need to provide chip addresses as a module parameter when loading this | 9 | You need to provide chip addresses as a module parameter when loading this |
10 | driver, which will then only react to SMBus commands to these addresses. | 10 | driver, which will then only react to SMBus commands to these addresses. |
@@ -21,8 +21,8 @@ EEPROMs, among others. | |||
21 | 21 | ||
22 | The typical use-case is like this: | 22 | The typical use-case is like this: |
23 | 1. load this module | 23 | 1. load this module |
24 | 2. use i2cset (from lm_sensors project) to pre-load some data | 24 | 2. use i2cset (from the i2c-tools project) to pre-load some data |
25 | 3. load the target sensors chip driver module | 25 | 3. load the target chip driver module |
26 | 4. observe its behavior in the kernel log | 26 | 4. observe its behavior in the kernel log |
27 | 27 | ||
28 | There's a script named i2c-stub-from-dump in the i2c-tools package which | 28 | There's a script named i2c-stub-from-dump in the i2c-tools package which |
@@ -33,6 +33,12 @@ PARAMETERS: | |||
33 | int chip_addr[10]: | 33 | int chip_addr[10]: |
34 | The SMBus addresses to emulate chips at. | 34 | The SMBus addresses to emulate chips at. |
35 | 35 | ||
36 | unsigned long functionality: | ||
37 | Functionality override, to disable some commands. See I2C_FUNC_* | ||
38 | constants in <linux/i2c.h> for the suitable values. For example, | ||
39 | value 0x1f0000 would only enable the quick, byte and byte data | ||
40 | commands. | ||
41 | |||
36 | CAVEATS: | 42 | CAVEATS: |
37 | 43 | ||
38 | If your target driver polls some byte or word waiting for it to change, the | 44 | If your target driver polls some byte or word waiting for it to change, the |
diff --git a/Documentation/i2c/old-module-parameters b/Documentation/i2c/old-module-parameters new file mode 100644 index 000000000000..8e2b629d533c --- /dev/null +++ b/Documentation/i2c/old-module-parameters | |||
@@ -0,0 +1,44 @@ | |||
1 | I2C device driver binding control from user-space | ||
2 | ================================================= | ||
3 | |||
4 | Up to kernel 2.6.32, many i2c drivers used helper macros provided by | ||
5 | <linux/i2c.h> which created standard module parameters to let the user | ||
6 | control how the driver would probe i2c buses and attach to devices. These | ||
7 | parameters were known as "probe" (to let the driver probe for an extra | ||
8 | address), "force" (to forcibly attach the driver to a given device) and | ||
9 | "ignore" (to prevent a driver from probing a given address). | ||
10 | |||
11 | With the conversion of the i2c subsystem to the standard device driver | ||
12 | binding model, it became clear that these per-module parameters were no | ||
13 | longer needed, and that a centralized implementation was possible. The new, | ||
14 | sysfs-based interface is described in the documentation file | ||
15 | "instantiating-devices", section "Method 4: Instantiate from user-space". | ||
16 | |||
17 | Below is a mapping from the old module parameters to the new interface. | ||
18 | |||
19 | Attaching a driver to an I2C device | ||
20 | ----------------------------------- | ||
21 | |||
22 | Old method (module parameters): | ||
23 | # modprobe <driver> probe=1,0x2d | ||
24 | # modprobe <driver> force=1,0x2d | ||
25 | # modprobe <driver> force_<device>=1,0x2d | ||
26 | |||
27 | New method (sysfs interface): | ||
28 | # echo <device> 0x2d > /sys/bus/i2c/devices/i2c-1/new_device | ||
29 | |||
30 | Preventing a driver from attaching to an I2C device | ||
31 | --------------------------------------------------- | ||
32 | |||
33 | Old method (module parameters): | ||
34 | # modprobe <driver> ignore=1,0x2f | ||
35 | |||
36 | New method (sysfs interface): | ||
37 | # echo dummy 0x2f > /sys/bus/i2c/devices/i2c-1/new_device | ||
38 | # modprobe <driver> | ||
39 | |||
40 | Of course, it is important to instantiate the "dummy" device before loading | ||
41 | the driver. The dummy device will be handled by i2c-core itself, preventing | ||
42 | other drivers from binding to it later on. If there is a real device at the | ||
43 | problematic address, and you want another driver to bind to it, then simply | ||
44 | pass the name of the device in question instead of "dummy". | ||