root/lm-sensors/trunk/prog/dump/i2cset.8 @ 4470

Revision 4470, 2.8 KB (checked in by khali, 6 years ago)

Discard irrelevant "CONFORMING TO" sections.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1.TH I2CSET 8 "June 2007"
2.SH "NAME"
3i2cset \- set I2C registers
4
5.SH SYNOPSIS
6.B i2cset
7.RB [ -f ]
8.RB [ -y ]
9.I i2cbus
10.I chip-address
11.I data-address
12.I value
13.RI [ mode ]
14.RI [ mask ]
15.br
16.B i2cset
17.B -V
18
19.SH DESCRIPTION
20i2cset is a small helper program to set registers visible through the I2C
21bus.
22
23.SH OPTIONS
24.TP
25.B -V
26Display the version and exit.
27.TP
28.B -f
29Force access to the device even if it is already busy. By default, i2cset
30will refuse to access a device which is already under the control of a
31kernel driver. Using this flag is dangerous, it can seriously confuse the
32kernel driver in question. It can also cause i2cset to silently write to
33the wrong register. So use at your own risk and only if you know what
34you're doing.
35.TP
36.B -y
37Disable interactive mode. By default, i2cset will wait for a confirmation
38from the user before messing with the I2C bus. When this flag is used, it
39will perform the operation directly. This is mainly meant to be used in
40scripts.
41.PP
42There are four required options to i2cset. \fIi2cbus\fR indicates the number
43of the I2C bus to be scanned.  This number should correspond to one of
44the busses listed by \fIi2cdetect -l\fR. \fIchip-address\fR specifies the
45address of the chip on that bus, and is an integer between 0x00 and 0x7F.
46\fIdata-address\fR specifies the address on that chip to write to, and is an
47integer between 0x00 and 0xFF. \fIvalue\fR is the value to write to that
48location on the chip.
49.PP
50The \fImode\fR parameter, if specified, is one of the letters \fBb\fP or
51\fBw\fP, corresponding to a write size of a single byte or a 16-bit word,
52respectively. A \fBp\fP can also be appended to the \fImode\fR parameter to
53enable PEC. If the \fImode\fR parameter is omitted, i2cset defaults to byte
54mode without PEC. The \fIvalue\fR provided must be within range for the
55specified data type (0x00-0xFF for bytes, 0x0000-0xFFFF for words).
56.PP
57The \fImask\fR parameter, if specified, describes which bits of \fIvalue\fR
58will be actually written to \fIdata-address\fR. Bits set to 1 in the mask
59are taken from \fIvalue\fR, while bits set to 0 will be read from
60\fIdata-address\fR and thus preserved by the operation.
61
62.SH WARNING
63i2cset can be extremely dangerous if used improperly. It can confuse your
64I2C bus, cause data loss, or have more serious side effects. Writing to
65a serial EEPROM on a memory DIMM (chip addresses between 0x50 and 0x57) may
66DESTROY your memory, leaving your system unbootable!  Be extremely careful
67using this program.
68
69.SH SEE ALSO
70i2cdump(8), isaset(8)
71
72.SH AUTHOR
73Frodo Looijaard, Mark D. Studebaker, and the lm_sensors group
74http://www.lm-sensors.org/
75This manual page was originally written by David Z Maze <dmaze@debian.org> for
76the Debian GNU/Linux system. It was then reviewed by the lm_sensors team and
77is now part of the lm_sensors source distribution.
Note: See TracBrowser for help on using the browser.