diff --git a/CHANGES b/CHANGES index a9d35ba..f3e33dc 100644 --- a/CHANGES +++ b/CHANGES @@ -4,9 +4,13 @@ i2c-tools CHANGES SVN decode-vaio: Remove history i2cdetect: Support i2c bus passed by name + Shorten the usage message i2cdump: Support i2c bus passed by name + Shorten the usage message i2cget: Support i2c bus passed by name + Shorten the usage message i2cset: Support i2c bus passed by name + Shorten the usage message 3.0.1 (2008-04-04) Drop the trailing .pl from all perl script names diff --git a/tools/i2cdetect.c b/tools/i2cdetect.c index d884c27..342e7d7 100644 --- a/tools/i2cdetect.c +++ b/tools/i2cdetect.c @@ -37,18 +37,11 @@ static void help(void) { fprintf(stderr, - "Syntax: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]\n" - " i2cdetect -F I2CBUS\n" - " i2cdetect -l\n" - " i2cdetect -V\n" - " I2CBUS is an integer\n" - " With -a, probe all addresses (NOT RECOMMENDED)\n" - " With -q, uses only quick write commands for probing (NOT " - "RECOMMENDED)\n" - " With -r, uses only read byte commands for probing (NOT " - "RECOMMENDED)\n" - " If provided, FIRST and LAST limit the probing range.\n" - " With -l, lists installed busses only\n"); + "Usage: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]\n" + " i2cdetect -F I2CBUS\n" + " i2cdetect -l\n" + " I2CBUS is an integer or an I2C bus name\n" + " If provided, FIRST and LAST limit the probing range.\n"); } static int scan_i2c_bus(int file, int mode, int first, int last) diff --git a/tools/i2cdump.c b/tools/i2cdump.c index 91e271b..36d204c 100644 --- a/tools/i2cdump.c +++ b/tools/i2cdump.c @@ -32,9 +32,10 @@ static void help(void) { - fprintf(stderr, "Syntax: i2cdump [-f] [-r first-last] [-y] I2CBUS " - "ADDRESS [MODE] [BANK [BANKREG]]\n" - " i2cdump -V\n" + fprintf(stderr, + "Usage: i2cdump [-f] [-y] [-r first-last] I2CBUS ADDRESS [MODE] [BANK [BANKREG]]\n" + " I2CBUS is an integer or an I2C bus name\n" + " ADDRESS is an integer (0x00 - 0x7f)\n" " MODE is one of:\n" " b (byte, default)\n" " w (word)\n" @@ -42,12 +43,7 @@ static void help(void) " s (SMBus block)\n" " i (I2C block)\n" " c (consecutive byte)\n" - " Append 'p' to 'b', 'w', 's' or 'c' for PEC checking\n" - " I2CBUS is an integer\n" - " ADDRESS is an integer 0x00 - 0x7f\n" - " BANK and BANKREG are for byte and word accesses (default " - "bank 0, reg 0x4e)\n" - " BANK is the command for smbusblock accesses (default 0)\n"); + " Append p for SMBus PEC\n"); } int main(int argc, char *argv[]) diff --git a/tools/i2cget.c b/tools/i2cget.c index a019a5d..a8f0a60 100644 --- a/tools/i2cget.c +++ b/tools/i2cget.c @@ -37,16 +37,15 @@ static void help(void) __attribute__ ((noreturn)); static void help(void) { - fprintf(stderr, "Syntax: i2cget [-f] [-y] I2CBUS CHIP-ADDRESS " - "[DATA-ADDRESS [MODE]]\n" - " i2cget -V\n" - " MODE can be: 'b' (read byte data, default)\n" - " 'w' (read word data)\n" - " 'c' (write byte/read byte)\n" - " If DATA-ADDRESS is omitted, a single read byte command is " - "issued\n" - " Append 'p' to MODE for PEC checking\n" - " I2CBUS is an integer\n"); + fprintf(stderr, + "Usage: i2cget [-f] [-y] I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]\n" + " I2CBUS is an integer or an I2C bus name\n" + " ADDRESS is an integer (0x03 - 0x77)\n" + " MODE is one of:\n" + " b (read byte data, default)\n" + " w (read word data)\n" + " c (write byte/read byte)\n" + " Append p for SMBus PEC\n"); exit(1); } diff --git a/tools/i2cset.c b/tools/i2cset.c index 42b5ff8..72c0bed 100644 --- a/tools/i2cset.c +++ b/tools/i2cset.c @@ -34,12 +34,14 @@ static void help(void) __attribute__ ((noreturn)); static void help(void) { - fprintf(stderr, "Syntax: i2cset [-f] [-y] I2CBUS CHIP-ADDRESS DATA-ADDRESS " - "VALUE [MODE] [MASK]\n" - " i2cset -V\n" - " MODE is 'b[yte]' or 'w[ord]' (default b)\n" - " Append 'p' to MODE for PEC checking\n" - " I2CBUS is an integer\n"); + fprintf(stderr, + "Usage: i2cset [-f] [-y] I2CBUS CHIP-ADDRESS DATA-ADDRESS VALUE [MODE] [MASK]\n" + " I2CBUS is an integer or an I2C bus name\n" + " ADDRESS is an integer (0x00 - 0x7f)\n" + " MODE is one of:\n" + " b (byte, default)\n" + " w (word)\n" + " Append p for SMBus PEC\n"); exit(1); }