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/ |