view Documentation/i2c/i2c-stub @ 854:950b9eb27661

usbback: fix urb interval value for interrupt urbs.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Apr 06 13:51:20 2009 +0100 (2009-04-06)
parents 831230e53067
line source
1 MODULE: i2c-stub
5 This module is a very simple fake I2C/SMBus driver. It implements four
6 types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, and
7 (r/w) word data.
9 No hardware is needed nor associated with this module. It will accept write
10 quick commands to all addresses; it will respond to the other commands (also
11 to all addresses) by reading from or writing to an array in memory. It will
12 also spam the kernel logs for every command it handles.
14 A pointer register with auto-increment is implemented for all byte
15 operations. This allows for continuous byte reads like those supported by
16 EEPROMs, among others.
18 The typical use-case is like this:
19 1. load this module
20 2. use i2cset (from lm_sensors project) to pre-load some data
21 3. load the target sensors chip driver module
22 4. observe its behavior in the kernel log
26 There are independent arrays for byte/data and word/data commands. Depending
27 on if/how a target driver mixes them, you'll need to be careful.
29 If your target driver polls some byte or word waiting for it to change, the
30 stub could lock it up. Use i2cset to unlock it.
32 If the hardware for your driver has banked registers (e.g. Winbond sensors
33 chips) this module will not work well - although it could be extended to
34 support that pretty easily.
36 If you spam it hard enough, printk can be lossy. This module really wants
37 something like relayfs.