man pages for eepro* tools & fixing missing i2cset switch
PATCH 1/1 man pages for eepro* tools & fixing missing i2cset switch
Hello.
Something tells me I've already submitted this patch, but as I'm unsure, it's better to send it twice rather than completely omit it.
Please, check/modify/merge.
Thank you.
Regards,
Jaromir.
--
Jaromir Capik
Red Hat Czech, s.r.o.
Software Engineer / Secondary Arch
Email: [email protected]
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkynova 99/71, 612 45, Brno, Czech Republic
IC: 27690016
eepromer/eeprog.8 +105 -0
@@ -0,0 +1,105 @@ +.\" +.\" eeprog.8 - manpage for the i2c-tools/eeprog utility +.\" Copyright (C) 2013 Jaromir Capik +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License along +.\" with this program; if not, write to the Free Software Foundation, Inc., +.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +.\" +.TH eeprog "8" "Jul 2013" "i2c-tools" "System Administration" +.SH NAME +eeprog \- reads and writes 24Cxx EEPROMs connected to I2C serial bus. +.SH SYNOPSIS +.B eeprog +[-fqxdh] [-16|-8] [-r addr[:count]|-w addr] <device> <i2c-addr> +.SH DESCRIPTION +.B eeprog +uses the SMBus protocol used by most of the recent chipsets. +.SH NOTE +Don't forget to load your i2c chipset and the i2c-dev drivers. +.P +The following environment variables could be set instead of the command line arguments: +.P + EEPROG_DEV device +.br + EEPROG_I2C_ADDR i2c-addr +.SH PARAMETERS +.I Address modes +.TP +.B \-8 +Use 8bit address mode for 24c0x...24C16 [default] +.TP +.B \-16 +Use 16bit address mode for 24c32...24C256 +.TP +.I Actions +.TP +.B \-r addr[:count] +Read +.B count +(1 if omitted) bytes from +.B addr +and print them to the standard output +.TP +.B \-w addr +Write input (stdin) at address +.B addr +of the EEPROM +.TP +.B \-h +Print this help +.TP +.I Options +.TP +.B \-x +Set hex output mode +.TP +.B \-d +Dummy mode, display what *would* have been done +.TP +.B \-f +Disable warnings and don't ask confirmation +.TP +.B \-q +Quiet mode +.TP +.I Bus +.TP +.B device +Device file representing the I2C bus (eg. /dev/i2c-0) +.TP +.B i2c-addr +I2C bus address of the EEPROM (eg. 0x3A) +.SH EXAMPLES +Read 64 bytes from the EEPROM at address 0x54 on bus 0 starting at address 123 (decimal) +.P +.B eeprog +/dev/i2c-0 0x54 -r 123:64 +.P +Print the hex codes of the first 32 bytes read from bus 1 at address 0x22 +.P +.B eeprog +/dev/i2c-1 0x51 -x -r 0x22:0x20 +.P +Write the current timestamp at address 0x200 of the EEPROM on bus 0 at address 0x33 +.P + date | +.B eeprog +/dev/i2c-0 0x33 -w 0x200 +.SH SEE ALSO +.BR eeprom (8) +.BR eepromer (8) +.SH AUTHOR +.UR [email protected] +Stefano Barbato +.UE
eepromer/eepromer.8 +63 -0
63 lines not on this page · raw message
eepromer/eeprom.8 +64 -0
64 lines not on this page · raw message
tools/i2cset.c +6 -1
@@ -35,7 +35,12 @@static void help (void ) {fprintf (stderr, -"Usage: i2cset [-f] [-y] [-m MASK] I2CBUS CHIP-ADDRESS DATA-ADDRESS [VALUE] ... [MODE]\n" +"Usage: i2cset [OPTIONS] I2CBUS CHIP-ADDRESS DATA-ADDRESS [VALUE] ... [MODE]\n" +" OPTIONS are\n" +" -f (force access when busy)\n" +" -y (disable interactive mode)\n" +" -m MASK (value write mask - bits set to 0 are preserved if possible)\n" +" -r (write verification by reading back)\n" " I2CBUS is an integer or an I2C bus name\n" " ADDRESS is an integer (0x03 - 0x77)\n" " MODE is one of:\n"
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Jaromir,
Quoted 3 lines · Jaromir Capik
Something tells me I've already submitted this patch, but as I'm unsure, it's better to send it twice rather than completely omit it.
Yes you did, but it was overlooked, so you did the right thing resending it.
Quoted 1 line
Please, check/modify/merge.
This should really have been two patches. Besides, I'm not too happy with the i2cset man page fix. It's not bad per se but I would prefer to keep the help text consistent amongst i2c tools. So I've only added the missing flag for now [1]. If you want to make the help text more verbose then please send a separate patch doing it for all i2c tools (i2cdump, i2cdetect, i2cget and i2cset.)
[1] http://www.lm-sensors.org/changeset/6201
The man pages for eeprom, eepromer and eeprog look overall good, but I would like to mention two things.
Firstly, in the long run, I really would like to get rid of two of these tools and keep only one. They serve the same purpose, only the EEPROM chips supported and the way to access them is different.
Secondly, I am really not sure in which category the man pages belong. "System Administration" seems wrong to me, as the most common use case for these tools is to flash an EEPROM temporarily connected to the system (typically over the parallel bus or USB) for it to then be used on a different system. It's somewhat similar to a cross-compiler, so it's more about development than system administration. Sure, these tools can only be used by root, but it is really only because handling permissions on /dev/i2c* nodes is not so easy.
As a consequence, I don't know if these tools should go to /usr/sbin (because in practice only root can use them) or in /usr/bin (because they are not system administration tools proper.) Likewise, I don't know if they should go to man page section 1 (General commands), or 8 (System administration commands.) Opinion anyone?
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 1 line
Hi Jaromir,
Hi Jean.
Quoted 8 lines
Quoted 1 line
Please, check/modify/merge.
This should really have been two patches. Besides, I'm not too happy with the i2cset man page fix. It's not bad per se but I would prefer to keep the help text consistent amongst i2c tools. So I've only added the missing flag for now [1]. If you want to make the help text more verbose then please send a separate patch doing it for all i2c tools (i2cdump, i2cdetect, i2cget and i2cset.)
I didn't want to cause line wrappings on terminals with 80 characters per line. But if you're ok with that, then I'm too.
Quoted 6 lines
The man pages for eeprom, eepromer and eeprog look overall good, but I would like to mention two things.
Firstly, in the long run, I really would like to get rid of two of these tools and keep only one. They serve the same purpose, only the EEPROM chips supported and the way to access them is different.
I'm perfectly ok with that. I had to create the man pages to make our products sane and even if the live expectations of the man pages are short, I consider it a good idea to merge them upstream for someone who decides to build the current version in the future (for whatever reason).
Quoted 9 lines
Secondly, I am really not sure in which category the man pages belong. "System Administration" seems wrong to me, as the most common use case for these tools is to flash an EEPROM temporarily connected to the system (typically over the parallel bus or USB) for it to then be used on a different system. It's somewhat similar to a cross-compiler, so it's more about development than system administration. Sure, these tools can only be used by root, but it is really only because handling permissions on
/dev/i2c*nodes is not so easy.
Quoted 5 lines
As a consequence, I don't know if these tools should go to
/usr/sbin(because in practice only root can use them) or in/usr/bin(because they are not system administration tools proper.) Likewise, I don't know if they should go to man page section 1 (General commands), or 8 (System administration commands.) Opinion anyone?
Life's difficult :]
I believe users do not care about this stuff as long as there's only one manpage per tool. The same applies to the binary location. As long as it is reachable via the PATH variable, there's no need for worries about the location.
Quoted 2 lines
--
Jean Delvare
Regards,
Jaromir.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 15 lines · Jaromir Capik
Quoted 9 lines
Secondly, I am really not sure in which category the man pages belong. "System Administration" seems wrong to me, as the most common use case for these tools is to flash an EEPROM temporarily connected to the system (typically over the parallel bus or USB) for it to then be used on a different system. It's somewhat similar to a cross-compiler, so it's more about development than system administration. Sure, these tools can only be used by root, but it is really only because handling permissions on
/dev/i2c*nodes is not so easy.Quoted 5 lines
As a consequence, I don't know if these tools should go to
/usr/sbin(because in practice only root can use them) or in/usr/bin(because they are not system administration tools proper.) Likewise, I don't know if they should go to man page section 1 (General commands), or 8 (System administration commands.) Opinion anyone?
Quoted 5 lines
Life's difficult :]
I believe users do not care about this stuff as long as there's only one manpage per tool. The same applies to the binary location. As long as it is reachable via the PATH variable, there's no need for worries about the location.
Short of a better idea, I left the category name and number as they were in the patch you provided. Which I just applied with minor edits BTW:
http://www.lm-sensors.org/changeset/6204
Thanks for your contribution!
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors