i2c-comcerto: Limit max transaction time workaround to short transactions

The commit "i2c-comcerto: Limit duration of I2C transaction" (9d8683) limits
the maximum duration of an I2C transaction to address an issue with the lm96163
temperature sensor. This limitation causes issues with other chips like the
Infineon TPM, which perform transactions with larger amounts of data. With this
change the max duration of a transaction is only limited for transactions
shorter than 10 bytes.

Change-Id: I33d003fd42b46f1f378afbfc067a4432faef9e75
diff --git a/drivers/i2c/busses/i2c-comcerto.c b/drivers/i2c/busses/i2c-comcerto.c
index 234e9fe..4a50cac 100644
--- a/drivers/i2c/busses/i2c-comcerto.c
+++ b/drivers/i2c/busses/i2c-comcerto.c
@@ -180,14 +180,17 @@
 {
 	s64 d;
 	WR_CNTR(i2c, CNTR_STP);
-	d = ktime_us_delta(ktime_get(), i2c->msg_start_time);
-	if (d > 22000) {
-		i2c->msg_status = -ETIME;
-		dev_printk(KERN_DEBUG, i2c->dev,
-			"I2C transaction took too long: %lld us. Returning error.\n",
-			(long long) d);
-	} else {
-		i2c->msg_status = status;
+
+	i2c->msg_status = status;
+
+	if (i2c->msg_len < 10) {
+		d = ktime_us_delta(ktime_get(), i2c->msg_start_time);
+		if (d > 22000) {
+			i2c->msg_status = -ETIME;
+			dev_printk(KERN_DEBUG, i2c->dev,
+				"I2C transaction took too long: %lld us. Returning error.\n",
+				(long long) d);
+		}
 	}
 }
 
@@ -753,4 +756,3 @@
 
 module_init(comcerto_i2c_init);
 module_exit(comcerto_i2c_exit);
-