Blame SOURCES/i2c-tools-3.1-man-eeproX.patch

6b1808
diff -Naur i2c-tools-3.1.0.orig/eepromer/eeprog.8 i2c-tools-3.1.0/eepromer/eeprog.8
6b1808
--- i2c-tools-3.1.0.orig/eepromer/eeprog.8	1970-01-01 01:00:00.000000000 +0100
6b1808
+++ i2c-tools-3.1.0/eepromer/eeprog.8	2013-07-03 17:10:46.193787836 +0200
6b1808
@@ -0,0 +1,105 @@
6b1808
+.\"
6b1808
+.\"  eeprog.8 - manpage for the i2c-tools/eeprog utility
6b1808
+.\"  Copyright (C) 2013  Jaromir Capik
6b1808
+.\"
6b1808
+.\"  This program is free software; you can redistribute it and/or modify
6b1808
+.\"  it under the terms of the GNU General Public License as published by
6b1808
+.\"  the Free Software Foundation; either version 2 of the License, or
6b1808
+.\"  (at your option) any later version.
6b1808
+.\"
6b1808
+.\"  This program is distributed in the hope that it will be useful,
6b1808
+.\"  but WITHOUT ANY WARRANTY; without even the implied warranty of
6b1808
+.\"  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6b1808
+.\"  GNU General Public License for more details.
6b1808
+.\"
6b1808
+.\"  You should have received a copy of the GNU General Public License along
6b1808
+.\"  with this program; if not, write to the Free Software Foundation, Inc.,
6b1808
+.\"  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
6b1808
+.\"
6b1808
+.TH eeprog "8" "Jul 2013" "i2c-tools" "System Administration"
6b1808
+.SH NAME
6b1808
+eeprog \- reads and writes 24Cxx EEPROMs connected to I2C serial bus.
6b1808
+.SH SYNOPSIS
6b1808
+.B eeprog
6b1808
+[-fqxdh] [-16|-8] [-r addr[:count]|-w addr] <device> <i2c-addr>
6b1808
+.SH DESCRIPTION
6b1808
+.B eeprog
6b1808
+uses the SMBus protocol used by most of the recent chipsets.
6b1808
+.SH NOTE
6b1808
+Don't forget to load your i2c chipset and the i2c-dev drivers.
6b1808
+.P
6b1808
+The following environment variables could be set instead of the command line arguments:
6b1808
+.P
6b1808
+    EEPROG_DEV              device
6b1808
+.br
6b1808
+    EEPROG_I2C_ADDR         i2c-addr
6b1808
+.SH PARAMETERS
6b1808
+.I Address modes
6b1808
+.TP
6b1808
+.B \-8
6b1808
+Use 8bit address mode for 24c0x...24C16 [default]
6b1808
+.TP
6b1808
+.B \-16
6b1808
+Use 16bit address mode for 24c32...24C256
6b1808
+.TP
6b1808
+.I Actions
6b1808
+.TP
6b1808
+.B \-r addr[:count]
6b1808
+Read
6b1808
+.B count
6b1808
+(1 if omitted) bytes from
6b1808
+.B addr
6b1808
+and print them to the standard output
6b1808
+.TP
6b1808
+.B \-w addr
6b1808
+Write input (stdin) at address
6b1808
+.B addr
6b1808
+of the EEPROM
6b1808
+.TP
6b1808
+.B \-h
6b1808
+Print this help
6b1808
+.TP
6b1808
+.I Options
6b1808
+.TP
6b1808
+.B \-x
6b1808
+Set hex output mode
6b1808
+.TP
6b1808
+.B \-d
6b1808
+Dummy mode, display what *would* have been done
6b1808
+.TP
6b1808
+.B \-f
6b1808
+Disable warnings and don't ask confirmation
6b1808
+.TP
6b1808
+.B \-q
6b1808
+Quiet mode
6b1808
+.TP
6b1808
+.I Bus
6b1808
+.TP
6b1808
+.B device
6b1808
+Device file representing the I2C bus (eg. /dev/i2c-0)
6b1808
+.TP
6b1808
+.B i2c-addr
6b1808
+I2C bus address of the EEPROM (eg. 0x3A)
6b1808
+.SH EXAMPLES
6b1808
+Read 64 bytes from the EEPROM at address 0x54 on bus 0 starting at address 123 (decimal)
6b1808
+.P
6b1808
+.B 	eeprog
6b1808
+/dev/i2c-0 0x54 -r 123:64
6b1808
+.P
6b1808
+Print the hex codes of the first 32 bytes read from bus 1 at address 0x22
6b1808
+.P
6b1808
+.B 	eeprog
6b1808
+/dev/i2c-1 0x51 -x -r 0x22:0x20
6b1808
+.P
6b1808
+Write the current timestamp at address 0x200 of the EEPROM on bus 0 at address 0x33
6b1808
+.P
6b1808
+ 	date |
6b1808
+.B eeprog
6b1808
+/dev/i2c-0 0x33 -w 0x200
6b1808
+.SH SEE ALSO
6b1808
+.BR eeprom (8)
6b1808
+.BR eepromer (8)
6b1808
+.SH AUTHOR
6b1808
+.UR stefano@codesink.org
6b1808
+Stefano Barbato
6b1808
+.UE
6b1808
diff -Naur i2c-tools-3.1.0.orig/eepromer/eepromer.8 i2c-tools-3.1.0/eepromer/eepromer.8
6b1808
--- i2c-tools-3.1.0.orig/eepromer/eepromer.8	1970-01-01 01:00:00.000000000 +0100
6b1808
+++ i2c-tools-3.1.0/eepromer/eepromer.8	2013-07-03 17:25:35.067487324 +0200
6b1808
@@ -0,0 +1,63 @@
6b1808
+.\"
6b1808
+.\"  eeprom.8 - manpage for the i2c-tools/eeprom utility
6b1808
+.\"  Copyright (C) 2013  Jaromir Capik
6b1808
+.\"
6b1808
+.\"  This program is free software; you can redistribute it and/or modify
6b1808
+.\"  it under the terms of the GNU General Public License as published by
6b1808
+.\"  the Free Software Foundation; either version 2 of the License, or
6b1808
+.\"  (at your option) any later version.
6b1808
+.\"
6b1808
+.\"  This program is distributed in the hope that it will be useful,
6b1808
+.\"  but WITHOUT ANY WARRANTY; without even the implied warranty of
6b1808
+.\"  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6b1808
+.\"  GNU General Public License for more details.
6b1808
+.\"
6b1808
+.\"  You should have received a copy of the GNU General Public License along
6b1808
+.\"  with this program; if not, write to the Free Software Foundation, Inc.,
6b1808
+.\"  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
6b1808
+.\"
6b1808
+.TH eepromer "8" "Jul 2013" "i2c-tools" "System Administration"
6b1808
+.SH NAME
6b1808
+eepromer \- reads and writes 24Cxx EEPROMs connected to I2C serial bus.
6b1808
+.SH SYNOPSIS
6b1808
+.B eepromer
6b1808
+[-r|-w|-e|-p] -f <device> <i2c-addr>
6b1808
+.SH DESCRIPTION
6b1808
+The EEPROM must be a large EEPROM which uses a 2-byte address
6b1808
+field (24C32 or larger). It will NOT WORK on small EEPROMs
6b1808
+(24C01 - 24C16) such as those used on SDRAM DIMMs.
6b1808
+.SH NOTE
6b1808
+Don't forget to load your i2c chipset and the i2c-dev drivers.
6b1808
+.P
6b1808
+Tested only on 24C256.
6b1808
+.P
6b1808
+.SH PARAMETERS
6b1808
+.TP
6b1808
+.I Actions
6b1808
+.TP
6b1808
+.B \-r
6b1808
+Read
6b1808
+.TP
6b1808
+.B \-w
6b1808
+Write
6b1808
+.TP
6b1808
+.B \-e
6b1808
+Erase
6b1808
+.TP
6b1808
+.B \-p
6b1808
+Print header
6b1808
+.TP
6b1808
+.I Bus
6b1808
+.TP
6b1808
+.B \-f device
6b1808
+Device file representing the I2C bus (eg. /dev/i2c-0)
6b1808
+.TP
6b1808
+.B i2c-addr
6b1808
+I2C bus address of the EEPROM (eg. 0x3A)
6b1808
+.SH SEE ALSO
6b1808
+.BR eeprog (8)
6b1808
+.BR eeprom (8)
6b1808
+.SH AUTHOR
6b1808
+.UR marvin@sitour.cz
6b1808
+Daniel Smolik
6b1808
+.UE
6b1808
diff -Naur i2c-tools-3.1.0.orig/eepromer/eeprom.8 i2c-tools-3.1.0/eepromer/eeprom.8
6b1808
--- i2c-tools-3.1.0.orig/eepromer/eeprom.8	1970-01-01 01:00:00.000000000 +0100
6b1808
+++ i2c-tools-3.1.0/eepromer/eeprom.8	2013-07-03 17:14:22.852383941 +0200
6b1808
@@ -0,0 +1,64 @@
6b1808
+.\"
6b1808
+.\"  eeprom.8 - manpage for the i2c-tools/eeprom utility
6b1808
+.\"  Copyright (C) 2013  Jaromir Capik
6b1808
+.\"
6b1808
+.\"  This program is free software; you can redistribute it and/or modify
6b1808
+.\"  it under the terms of the GNU General Public License as published by
6b1808
+.\"  the Free Software Foundation; either version 2 of the License, or
6b1808
+.\"  (at your option) any later version.
6b1808
+.\"
6b1808
+.\"  This program is distributed in the hope that it will be useful,
6b1808
+.\"  but WITHOUT ANY WARRANTY; without even the implied warranty of
6b1808
+.\"  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6b1808
+.\"  GNU General Public License for more details.
6b1808
+.\"
6b1808
+.\"  You should have received a copy of the GNU General Public License along
6b1808
+.\"  with this program; if not, write to the Free Software Foundation, Inc.,
6b1808
+.\"  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
6b1808
+.\"
6b1808
+.TH eeprom "8" "Jul 2013" "i2c-tools" "System Administration"
6b1808
+.SH NAME
6b1808
+eeprom \- reads and writes 24Cxx EEPROMs connected to I2C serial bus.
6b1808
+.SH SYNOPSIS
6b1808
+.B eeprom
6b1808
+[-d dev] [-a adr] [-p pgs] [-w] [-y] [-f file]
6b1808
+.SH DESCRIPTION
6b1808
+.B eeprom
6b1808
+can be used for reading from / writing to i2c-eeproms like the popular
6b1808
+24C16, 24C08, 24C04, etc.
6b1808
+In contrast to eeprommer which supports 24C256-type eeproms (24C16s)
6b1808
+this tool works with 1-byte addresses!
6b1808
+.SH NOTE
6b1808
+Don't forget to load your i2c chipset and the i2c-dev drivers.
6b1808
+.P
6b1808
+Pages/addresses:
6b1808
+    eeproms with more than 256 bytes appear as if they
6b1808
+    were several eeproms with consecutive addresses on the bus
6b1808
+    so we might as well address several separate eeproms with
6b1808
+    increasing addresses
6b1808
+.SH PARAMETERS
6b1808
+.TP
6b1808
+.B dev
6b1808
+device, e.g. /dev/i2c-0    (def)
6b1808
+.TP
6b1808
+.B adr
6b1808
+base address of eeprom, eg 0xA0 (def)
6b1808
+.TP
6b1808
+.B pgs
6b1808
+number of pages to read, eg 8 (def)
6b1808
+.TP
6b1808
+.B \-w
6b1808
+write to eeprom (default is reading!)
6b1808
+.TP
6b1808
+.B \-y
6b1808
+suppress warning when writing (default is to warn!)
6b1808
+.TP
6b1808
+.B \-f file
6b1808
+copy eeprom contents to/from file (default for read is test only; for write is all zeros)
6b1808
+.SH SEE ALSO
6b1808
+.BR eeprog (8)
6b1808
+.BR eepromer (8)
6b1808
+.SH AUTHOR
6b1808
+.UR chris@hedonism.cx
6b1808
+Christian Vogel
6b1808
+.UE
6b1808
diff -Naur i2c-tools-3.1.0.orig/tools/i2cset.c i2c-tools-3.1.0/tools/i2cset.c
6b1808
--- i2c-tools-3.1.0.orig/tools/i2cset.c	2011-02-15 17:12:27.000000000 +0100
6b1808
+++ i2c-tools-3.1.0/tools/i2cset.c	2013-06-19 12:45:55.852490195 +0200
6b1808
@@ -35,7 +35,12 @@
6b1808
 static void help(void)
6b1808
 {
6b1808
 	fprintf(stderr,
6b1808
-		"Usage: i2cset [-f] [-y] [-m MASK] I2CBUS CHIP-ADDRESS DATA-ADDRESS [VALUE] ... [MODE]\n"
6b1808
+		"Usage: i2cset [OPTIONS] I2CBUS CHIP-ADDRESS DATA-ADDRESS [VALUE] ... [MODE]\n"
6b1808
+		"  OPTIONS are\n"
6b1808
+		"    -f (force access when busy)\n"
6b1808
+		"    -y (disable interactive mode)\n"
6b1808
+		"    -m MASK (value write mask - bits set to 0 are preserved if possible)\n"
6b1808
+		"    -r (write verification by reading back)\n"
6b1808
 		"  I2CBUS is an integer or an I2C bus name\n"
6b1808
 		"  ADDRESS is an integer (0x03 - 0x77)\n"
6b1808
 		"  MODE is one of:\n"