aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/i2c/i2c-stub18
1 files changed, 8 insertions, 10 deletions
diff --git a/Documentation/i2c/i2c-stub b/Documentation/i2c/i2c-stub
index 9cc081e69764..89e69ad3436c 100644
--- a/Documentation/i2c/i2c-stub
+++ b/Documentation/i2c/i2c-stub
@@ -6,13 +6,14 @@ This module is a very simple fake I2C/SMBus driver. It implements four
6types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, and 6types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, and
7(r/w) word data. 7(r/w) word data.
8 8
9You need to provide a chip address as a module parameter when loading 9You need to provide chip addresses as a module parameter when loading this
10this driver, which will then only react to SMBus commands to this address. 10driver, which will then only react to SMBus commands to these addresses.
11 11
12No hardware is needed nor associated with this module. It will accept write 12No hardware is needed nor associated with this module. It will accept write
13quick commands to one address; it will respond to the other commands (also 13quick commands to the specified addresses; it will respond to the other
14to one address) by reading from or writing to an array in memory. It will 14commands (also to the specified addresses) by reading from or writing to
15also spam the kernel logs for every command it handles. 15arrays in memory. It will also spam the kernel logs for every command it
16handles.
16 17
17A pointer register with auto-increment is implemented for all byte 18A pointer register with auto-increment is implemented for all byte
18operations. This allows for continuous byte reads like those supported by 19operations. This allows for continuous byte reads like those supported by
@@ -26,8 +27,8 @@ The typical use-case is like this:
26 27
27PARAMETERS: 28PARAMETERS:
28 29
29int chip_addr: 30int chip_addr[10]:
30 The SMBus address to emulate a chip at. 31 The SMBus addresses to emulate chips at.
31 32
32CAVEATS: 33CAVEATS:
33 34
@@ -41,9 +42,6 @@ If the hardware for your driver has banked registers (e.g. Winbond sensors
41chips) this module will not work well - although it could be extended to 42chips) this module will not work well - although it could be extended to
42support that pretty easily. 43support that pretty easily.
43 44
44Only one chip address is supported - although this module could be
45extended to support more.
46
47If you spam it hard enough, printk can be lossy. This module really wants 45If you spam it hard enough, printk can be lossy. This module really wants
48something like relayfs. 46something like relayfs.
49 47