Re: [PATCH 2/2] i2c/designware: Provide optional i2c bus recovery function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 29 February 2012 05:28 PM, Viresh Kumar wrote:

+	if (tmp<   0) {
+		dev_warn(&adap->dev, "gpio request one fail: %d\n",
+				adap->scl_gpio);
+		return tmp;
+	}
+
+	delay /= adap->clock_rate * 2;
Here delay is turning as micor sec and function used as the nano sec.
clock_rate is in KHz, mentioned in comment of clock_rate.
Makes sense now or am i missing something?


Oops, my bad.. better to name the variable as clock_rate_khz kind of to avoid the error when we use in our driver.



I think it should check for the sda line for coming out of the loop.
There may be possibility that we may not need 9 clock pulses.

I asked this in another mail, how to be sure that it will work.


We observed that sometimes it does not require 9 clocks. So you can poll for given amount of clock time. Once the device who was holding the SDA line to low, release the bus, it can comeout from the loop. Not sure this is as per specs or not but this was our observations.




-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux