Thread (7 messages) 7 messages, 3 authors, 2012-08-18

Re: [PATCH REBASE 1/2] i2c: tegra: I2_M_NOSTART functionality not supported in Tegra20

From: Wolfram Sang <hidden>
Date: 2012-08-18 18:29:54
Also in: linux-i2c, lkml

quoted
quoted
-	clk_prepare_enable(i2c_dev->div_clk);
+	/* Support I2C_M_NOSTART only if HW support continue xfer. */
+	for (i = 0; i<  num - 1; i++) {
+		if ((msgs[i + 1].flags&  I2C_M_NOSTART)&&
+			!i2c_dev->has_continue_xfer_support) {
+			dev_err(i2c_dev->dev,
+				"mesg %d have illegal flag\n", i + 1);
+			return -EINVAL;
+		}
+	}
Drivers are requested to explicitly check for features of the I2C bus
(like M_NOSTART) before using them, so I'd skip this extra check.
Ok, I kept this as part of flag checking so illegal flag should not
be passed. I will remove this on next version patch.
quoted
quoted
+
+	clk_prepare_enable(i2c_dev->clk);
From a glimpse, this change looks unrelated at least. Even wrong, no?
It was already there, just before above check. Due to insertion of
check, this code shifted, otherwise it is not a new code.
It used to be ->div_clk and now it is ->clk?

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help