Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @@ -151,6 +151,8 @@ static inline void bcm2708_bsc_setup(struct bcm2708_i2c *bi)
- u32 cdiv;
- u32 c = BSC_C_I2CEN | BSC_C_INTD | BSC_C_ST | BSC_C_CLEAR_1;
- + u32 clkt;
- +
- bus_hz = clk_get_rate(bi->clk);
- cdiv = bus_hz / baudrate;
- @@ -163,6 +165,11 @@ static inline void bcm2708_bsc_setup(struct bcm2708_i2c *bi
- bcm2708_wr(bi, BSC_A, bi->msg->addr);
- bcm2708_wr(bi, BSC_DLEN, bi->msg->len);
- bcm2708_wr(bi, BSC_C, c);
- +
- + /* longer clock stretching timeout (needed by sht21), */
- + /* default timeout is 64 i2c clock cycles (0x40) */
- + clkt = baudrate / 10; /* set to 100 ms */
- + bcm2708_wr(bi, BSC_CLKT, clkt);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement