Index: tools/i2cget.8
===================================================================
--- tools/i2cget.8	(revision 6260)
+++ tools/i2cget.8	(working copy)
@@ -45,8 +45,8 @@
 will be read (if that makes sense for the considered chip).
 .PP
 The \fImode\fR parameter, if specified, is one of the letters \fBb\fP,
-\fBw\fP or \fBc\fP, corresponding to a read byte data, a read word data or a
-write byte/read byte transaction, respectively. A \fBp\fP can also be appended
+\fBw\fP, \fBc\fP or \fBs\fP, corresponding to a read byte data, a read word data, a
+write byte/read byte or read SMBus block transaction, respectively. A \fBp\fP can also be appended
 to the \fImode\fR parameter to enable PEC. If the \fImode\fR parameter is omitted,
 i2cget defaults to a read byte data transaction, unless \fIdata-address\fR is
 also omitted, in which case the default (and only valid) transaction is a
Index: tools/i2cget.c
===================================================================
--- tools/i2cget.c	(revision 6260)
+++ tools/i2cget.c	(working copy)
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <ctype.h>
 #include <linux/i2c.h>
 #include <linux/i2c-dev.h>
 #include <i2c/smbus.h>
@@ -36,6 +37,8 @@
 #include "util.h"
 #include "../version.h"
 
+#define BYTES_IN_BLOCK_STRING 16
+
 static void help(void) __attribute__ ((noreturn));
 
 static void help(void)
@@ -47,6 +50,7 @@
 		"  MODE is one of:\n"
 		"    b (read byte data, default)\n"
 		"    w (read word data)\n"
+		"    s (read SMBus block data)\n"
 		"    c (write byte/read byte)\n"
 		"    Append p for SMBus PEC\n");
 	exit(1);
@@ -89,6 +93,13 @@
 			return -1;
 		}
 		break;
+
+	case I2C_SMBUS_BLOCK_DATA:
+		if (!(funcs & I2C_FUNC_SMBUS_READ_BLOCK_DATA)) {
+			fprintf(stderr, MISSING_FUNC_FMT, "SMBus block read");
+			return -1;
+		}
+		break;
 	}
 
 	if (pec
@@ -159,6 +170,8 @@
 	int pec = 0;
 	int flags = 0;
 	int force = 0, yes = 0, version = 0;
+	char block[I2C_SMBUS_BLOCK_MAX + 2];
+	int offset;
 
 	/* handle (optional) flags first */
 	while (1+flags < argc && argv[1+flags][0] == '-') {
@@ -208,6 +221,7 @@
 		case 'b': size = I2C_SMBUS_BYTE_DATA; break;
 		case 'w': size = I2C_SMBUS_WORD_DATA; break;
 		case 'c': size = I2C_SMBUS_BYTE; break;
+		case 's': size = I2C_SMBUS_BLOCK_DATA; break;
 		default:
 			fprintf(stderr, "Error: Invalid mode!\n");
 			help();
@@ -243,6 +257,9 @@
 	case I2C_SMBUS_WORD_DATA:
 		res = i2c_smbus_read_word_data(file, daddress);
 		break;
+	case I2C_SMBUS_BLOCK_DATA:
+		res = i2c_smbus_read_block_data(file, daddress, block);
+		break;
 	default: /* I2C_SMBUS_BYTE_DATA */
 		res = i2c_smbus_read_byte_data(file, daddress);
 	}
@@ -253,7 +270,32 @@
 		exit(2);
 	}
 
-	printf("0x%0*x\n", size == I2C_SMBUS_WORD_DATA ? 4 : 2, res);
+	switch (size) {
+		default: /* I2C_SMBUS_BYTE_DATA, I2C_SMBUS_WORD_DATA, I2C_SMBUS_BYTE */
+			printf("0x%0*x\n", size == I2C_SMBUS_WORD_DATA ? 4 : 2, res);
+			break;
 
+		case I2C_SMBUS_BLOCK_DATA:
+			for(offset = 0; offset < res; offset += BYTES_IN_BLOCK_STRING) {
+				int pos;
+				printf("%02X: ", offset);
+				/* Print the hex values */
+				for(pos = 0; pos < BYTES_IN_BLOCK_STRING && offset + pos < res; pos++) {
+					printf("%02X ", block[offset + pos]);
+				}
+
+				printf("| ");
+
+				/* Print the printable characters */
+				for(pos = 0; pos < BYTES_IN_BLOCK_STRING && offset + pos < res; pos++) {
+					char c = block[offset + pos];
+					printf("%c", isprint(c) ? c : '.');
+				}
+
+				printf("\n");
+			}
+			break;
+	}
+
 	exit(0);
 }
