Guenter Roeck
055f5effa9
i2cset: Check range for data value mask
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5927 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Guenter Roeck
6fdf1f1e45
i2cset: Get command/mode before reading data
Get and validate the command/mode parameter for all commands
before reading and evaluating actual data.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5926 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Guenter Roeck
8da93bb0f2
i2cset: More stringent parameter validation
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5924 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Guenter Roeck
7b4639c497
i2cset: Abort if value mask is set for block commands
Specifying the value mask is not supported for block commands,
abort if it is specified anyway.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5923 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Guenter Roeck
bacad27586
i2cset: Check number of arguments for block data writes
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5922 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Guenter Roeck
7dd2610269
i2cset: Removed obsolete method to specify value mask
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5921 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Guenter Roeck
37ad9258ab
i2cset: Replace blanks at beginning of line with tabs
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5920 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Guenter Roeck
fcc8ce36b8
Added support to write SMBus and I2C block commands to i2cset
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5911 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Jean Delvare
3a5d21649e
Use a 20-bit limit for the i2c bus number.
Use snprintf for the i2c dev node name.
Update copyright years.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5885 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Jean Delvare
54a2dcbba5
tools: Drop arbitrary limit on I2C bus number
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5884 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Jean Delvare
7e6f85bfc5
Drop legacy reference to ISA bus. The i2c-isa fake bus driver is gone
long ago, today the message is only confusing.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5862 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Jean Delvare
e8c558c9a5
Properly handle the rare case where /dev/i2c exists but isn't a
directory. Patch from Florian Fainelli.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5854 7894878c-1315-0410-8ee3-d5d059ff63e0
15 years ago
Jean Delvare
2ea4dccae0
Add support for short writes with PEC.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5771 7894878c-1315-0410-8ee3-d5d059ff63e0
16 years ago
Jean Delvare
f0892fadae
List include first, so that other modules can use it.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5610 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
52cb1789b4
Complete GPL header.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5596 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
24f819ed0c
Licensing clarification.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5594 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
0d84adf510
Add missing includes.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5452 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
0e972ad9fd
Add support for reading back to short writes.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5394 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
35a929de32
Make reading back the written value optional.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5393 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
f9bad5666d
Clarify the requirements of data value masking.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5392 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
0c270e09de
Allow masking on short writes.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5391 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
c797cbaaeb
Set the data value mask with -m. The old method is still supported for
compatibility, but is considered deprecated and is no longer documented.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5390 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
54cee12770
Use consistent transaction names (based on the SMBus specification)
when complaining about a missing adapter functionality.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5242 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
fc38f35ce4
Share the error string between all functionality checks.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5241 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
f67174055a
No need to print the i2c bus number in functionality error message.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5240 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
9160a95ad0
Split the functionality checking code into a separate function for
clarity.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5239 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
cc723a46f7
Close device file before we exit.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5238 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
c3d335575f
Add support for short writes (SMBus send byte).
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5237 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
7ad89259ab
List the optional command line parameters in a consistent way.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5236 7894878c-1315-0410-8ee3-d5d059ff63e0
17 years ago
Jean Delvare
8cc44b8c9c
Whitespace cleanups.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5210 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
8603e2aab2
Move the confirmation to a separate function, as is done in i2cget
already.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5209 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
87154f13cc
Move the functionality checks to a separate function, as is done in
i2cget already.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5208 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
68fb2e6229
Minor optimizations and cleanups.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5207 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
2751626db8
Unknown options are fatal, so label them error rather than warning.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5206 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
aa78242d6c
More user-friendly error messages for wrong I2C bus parameter.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5205 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
bdfc87d724
Move the chip address parsing to a common function for consistency.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5204 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
2e942d16a5
Consistently restrict the allowed I2C device address to 0x03 - 0x77.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5203 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
b331c042c8
Move print_i2c_busses from i2cbusses.c to i2cdetect.c, as it is
only used there.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5202 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
2c57ef91a2
Unify and shorten the usage messages. The details can be found in
the man pages so no need to be verbose.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5201 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
b68190b426
Don't print the list of i2c buses as part of the help.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5200 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
adc03e3cf3
Make the includes order correct and consistent accross all tools.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5199 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
f6a402514f
Minor consistency fix.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5198 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
e34ebe15e7
Limit the stack usage in gather_i2c_busses:
* Reuse variables where possible.
* Don't assign things we don't need in sscanf.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5196 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
31e9db10d0
Make it possible to pass the i2c bus by name instead of by number. As
there is no guarantee that i2c bus numbering will stay the same over
time (for example if hardware is added of removed, or simply due to
loading the drivers in a different order), passing the i2c bus by name
is more robust.
The i2c bus names are supposed to be unique. If you request a bus by
name and this name happens to not be unique, then the tools will play
it safe and quit. This is better than writing to the wrong device.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5195 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
f7b64dce7e
Split print_i2c_busses into a gathering part and a printing part.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5194 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
eda5918d0f
Refactor the handling of the I2CBUS parameter. This ensures more
consistency accross the i2c tools.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5193 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
aed7163f2b
Update the FSF address.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5164 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
8e4ddd1f56
Let the user specify a register range.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5151 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
0d1b482ef0
Remove reference to hardware monitoring chips. i2cdump works on all I2C/SMBus
chips, not just hardware monitoring chips.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5140 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago
Jean Delvare
7abc52d779
Return the correct error code on I2C block read failure.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5073 7894878c-1315-0410-8ee3-d5d059ff63e0
18 years ago