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

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