From: Jean Delvare <jdelvare@suse.de>
To: Linux I2C <linux-i2c@vger.kernel.org>
Cc: Wolfram Sang <wsa@kernel.org>
Subject: [PATCH 6/7] i2cdump: Deprecate SMBus block mode
Date: Tue, 8 Jun 2021 17:31:32 +0200 [thread overview]
Message-ID: <20210608173132.3bdeced2@endymion> (raw)
In-Reply-To: <20210608172338.0cf520a1@endymion>
i2cget is a better fit for this mode. Having it in i2cdump requires
special-casing in various places, which makes the code harder to read
and maintain.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
tools/i2cdump.8 | 13 ++++---------
tools/i2cdump.c | 4 +++-
2 files changed, 7 insertions(+), 10 deletions(-)
--- i2c-tools.orig/tools/i2cdump.8 2021-06-08 17:04:22.538979958 +0200
+++ i2c-tools/tools/i2cdump.8 2021-06-08 17:13:28.996481415 +0200
@@ -106,21 +106,16 @@ bus 1 (i2c-1), using the default read me
# i2cdump -r 0x00-0x3f 1 0x2d
.RE
.fi
-.PP
-Dump the registers of the SMBus device at address 0x69 on bus 0 (i2c-0),
-using one SMBus block read transaction with error checking enabled, after
-user confirmation:
-.nf
-.RS
-# i2cdump 0 0x69 sp
-.RE
-.fi
.SH BUGS
To report bugs or send fixes, please write to the Linux I2C mailing list
<linux-i2c@vger.kernel.org> with Cc to the current maintainer:
Jean Delvare <jdelvare@suse.de>.
+SMBus block mode is deprecated and will be removed in a future version
+of this tool.
+Please use \fIi2cget\fR instead.
+
.SH SEE ALSO
i2cdetect(8), i2cget(8), i2cset(8), i2ctransfer(8), isadump(8)
--- i2c-tools.orig/tools/i2cdump.c 2021-06-08 17:04:22.538979958 +0200
+++ i2c-tools/tools/i2cdump.c 2021-06-08 17:13:21.787382423 +0200
@@ -43,7 +43,7 @@ static void help(void)
" b (byte, default)\n"
" w (word)\n"
" W (word on even register addresses)\n"
- " s (SMBus block)\n"
+ " s (SMBus block, deprecated)\n"
" i (I2C block)\n"
" c (consecutive byte)\n"
" Append p for SMBus PEC\n");
@@ -181,6 +181,8 @@ int main(int argc, char *argv[])
even = 1;
} else if (!strncmp(argv[flags+3], "s", 1)) {
size = I2C_SMBUS_BLOCK_DATA;
+ fprintf(stderr,
+ "SMBus Block mode is deprecated, please use i2cget instead\n");
pec = argv[flags+3][1] == 'p';
} else if (!strncmp(argv[flags+3], "c", 1)) {
size = I2C_SMBUS_BYTE;
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2021-06-08 15:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 15:23 [PATCH 0/7] Rework block read support among i2cget and i2cdump Jean Delvare
2021-06-08 15:28 ` [PATCH 1/7] i2cget: Add support for I2C block data Jean Delvare
2021-06-27 10:11 ` Wolfram Sang
2021-07-12 9:36 ` Jean Delvare
2021-06-08 15:29 ` [PATCH 2/7] i2cget: Document the support of I2C block reads Jean Delvare
2021-06-08 15:29 ` [PATCH 3/7] i2cget: Add support for SMBus block read Jean Delvare
2021-06-08 15:30 ` [PATCH 4/7] i2cdump: Remove dead code Jean Delvare
2021-06-08 15:30 ` [PATCH 5/7] i2cdump: Add range support with mode i (I2C block) Jean Delvare
2021-06-08 15:31 ` Jean Delvare [this message]
2021-06-08 15:32 ` [PATCH 7/7] i2cdump: Remove support for SMBus block mode Jean Delvare
2021-06-26 15:30 ` [PATCH 0/7] Rework block read support among i2cget and i2cdump Wolfram Sang
2021-07-12 9:58 ` Jean Delvare
2021-07-19 15:19 ` Wolfram Sang
2021-06-27 10:27 ` Wolfram Sang
2021-07-13 8:21 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210608173132.3bdeced2@endymion \
--to=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.