i2cdetect: add a check for (mode == DETECT_MODE_AUTO)

We should only warn the user about addresses to be skipped if
(mode == DETECT_MODE_AUTO).

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Bartosz Golaszewski 2015-06-05 10:27:30 +02:00 committed by Denys Vlasenko
parent e545bf6723
commit 2204472497

View File

@ -1336,7 +1336,9 @@ int i2cdetect_main(int argc UNUSED_PARAM, char **argv)
} else
if (mode == DETECT_MODE_READ && !(funcs & I2C_FUNC_SMBUS_READ_BYTE)) {
no_support("SMBus Receive Byte command");
} else {
}
if (mode == DETECT_MODE_AUTO) {
if (!(funcs & I2C_FUNC_SMBUS_QUICK))
will_skip("SMBus Quick Write");
if (!(funcs & I2C_FUNC_SMBUS_READ_BYTE))