1I2C-STUB-FROM-DUMP(8)       System Manager's Manual      I2C-STUB-FROM-DUMP(8)
2
3
4

NAME

6       i2c-stub-from-dump - feed i2c-stub with dump files
7
8

SYNOPSIS

10       i2c-stub-from-dump address[,address,...]  dump-file [dump-file ...]
11
12

DESCRIPTION

14       i2c-stub-from-dump  is  a  small  helper script for the i2c-stub kernel
15       driver.  It lets you setup one or more fake I2C chips on  the  i2c-stub
16       bus based on dumps of the chips you want to emulate.
17
18       i2c-stub-from-dump  requires  i2cdetect  and i2cset to be installed and
19       reachable through the user's PATH. The former is used to find  out  the
20       i2c-stub  bus number, while the latter is used to write to the fake I2C
21       chips.
22
23

EXAMPLE

25       You have an I2C chip on system A. You would like to do some development
26       on its driver on system B. Here are the few steps you have to follow.
27
28       On system A, use i2cdump to capture a dump from the chip. Assuming that
29       the chip in question lives at address 0x4c on I2C bus 0, you would run:
30
31               i2cdump -y 0 0x4c b > chip.dump
32
33       Adjust the bus number and chip address for  your  case.  i2cdetect  can
34       help you find out their values. If the device uses word (16-bit) regis‐
35       ter access instead of the traditional byte (8-bit) access, use  mode  w
36       instead of b.
37
38       Copy the dump file to system B.
39
40       On system B, run:
41
42               i2c-stub-from-dump 0x4c chip.dump
43
44       This  will  load  the  required  i2c-dev and i2c-stub kernel drivers if
45       needed, then write all the register values to the emulated I2C chip  at
46       address 0x4c.  Again, adjust the address as needed.
47
48

LIMITATIONS

50       There are some limitations to the kind of devices that can be handled:
51
52       •      Device must not have banks (as most Winbond devices do).
53
54

BUGS

56       To  report  bugs  or  send fixes, please write to the Linux I2C mailing
57       list <linux-i2c@vger.kernel.org> with Cc  to  the  current  maintainer:
58       Jean Delvare <jdelvare@suse.de>.
59
60

SEE ALSO

62       i2cdump(8), i2cdetect(8), i2cset(8)
63
64

AUTHOR

66       Jean Delvare
67
68
69
70                                  March 2010             I2C-STUB-FROM-DUMP(8)
Impressum