1I2CSET(8)                   System Manager's Manual                  I2CSET(8)
2
3
4

NAME

6       i2cset - set I2C registers
7
8

SYNOPSIS

10       i2cset [-f] [-y] [-m mask] [-r] i2cbus chip-address data-address [value
11       [mode]]
12       i2cset -V
13
14

DESCRIPTION

16       i2cset is a small helper program to set registers visible  through  the
17       I2C bus.
18
19

OPTIONS

21       -V     Display the version and exit.
22
23       -f     Force  access  to  the  device  even  if  it is already busy. By
24              default, i2cset will refuse to access a device which is  already
25              under the control of a kernel driver. Using this flag is danger‐
26              ous, it can seriously confuse the kernel driver in question.  It
27              can  also  cause i2cset to silently write to the wrong register.
28              So use at your own risk and only if you know what you're doing.
29
30       -y     Disable interactive mode. By default, i2cset  will  wait  for  a
31              confirmation from the user before messing with the I2C bus. When
32              this flag is used, it will perform the operation directly.  This
33              is mainly meant to be used in scripts.
34
35       -m mask
36              The  mask parameter, if specified, describes which bits of value
37              will be actually written to data-address. Bits set to 1  in  the
38              mask are taken from value, while bits set to 0 will be read from
39              data-address and thus preserved by the  operation.  Please  note
40              that  this  parameter assumes that the read and write operations
41              for the specified mode are symmetrical for the  device  you  are
42              accessing.  This  may or may not be the case, as neither I2C nor
43              SMBus guarantees this.
44
45       -r     Read back the value right after  writing  it,  and  compare  the
46              result  with  the  value  written.  This  used to be the default
47              behavior. The same limitations apply as those of option -m.
48
49       There are three required options to i2cset. i2cbus indicates the number
50       or name of the I2C bus to be scanned.  This number should correspond to
51       one of the busses listed by i2cdetect -l.  chip-address  specifies  the
52       address  of  the  chip  on that bus, and is an integer between 0x03 and
53       0x77.  data-address specifies the address on that chip to write to, and
54       is an integer between 0x00 and 0xFF.
55
56       The  value parameter, if specified, is the value to write to that loca‐
57       tion on the chip. If this parameter is omited, then a  short  write  is
58       issued.  For most chips, it simply sets an internal pointer to the tar‐
59       get location, but doesn't actually write to that location.  For  a  few
60       chips  though,  in  particular simple ones with a single register, this
61       short write is an actual write.
62
63       The mode parameter, if specified, is one of the letters b or w,  corre‐
64       sponding  to  a  write  size of a single byte or a 16-bit word, respec‐
65       tively. A p can also be appended to the mode parameter to  enable  PEC.
66       If  the mode parameter is omitted, i2cset defaults to byte mode without
67       PEC. The value provided must be within range  for  the  specified  data
68       type (0x00-0xFF for bytes, 0x0000-0xFFFF for words).
69
70

WARNING

72       i2cset  can  be  extremely dangerous if used improperly. It can confuse
73       your I2C bus, cause data loss, or have more serious side effects. Writ‐
74       ing  to  a  serial EEPROM on a memory DIMM (chip addresses between 0x50
75       and 0x57) may DESTROY your memory, leaving your system unbootable!   Be
76       extremely careful using this program.
77
78

SEE ALSO

80       i2cdump(8), isaset(8)
81
82

AUTHOR

84       Frodo Looijaard, Mark D. Studebaker and Jean Delvare
85
86       This   manual   page   was   originally   written   by   David  Z  Maze
87       <dmaze@debian.org> for the Debian GNU/Linux system.
88
89
90
91                                 November 2008                       I2CSET(8)
Impressum