[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH v3 3/4] i2cdetect: add a check for (mode == DETECT_MODE_AUTO)
From:       Bartosz Golaszewski <bartekgola () gmail ! com>
Date:       2015-05-29 10:11:41
Message-ID: 1432894302-10284-4-git-send-email-bartekgola () gmail ! com
[Download RAW message or body]

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

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
---
 miscutils/i2c_tools.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 6f97872..16784e9 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -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))
-- 
2.1.4

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic