mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
i2c: rk3x: Give the tuning value 0 during rk3x_i2c_v0_calc_timings
We found a bug that i2c transfer sometimes failed on 3066a board with stabel-4.8, the con register would be updated by uninitialized tuning value, it made the i2c transfer failed. So give the tuning value to be zero during rk3x_i2c_v0_calc_timings. Signed-off-by: David Wu <[email protected]> Tested-by: Andy Yan <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Cc: [email protected]
This commit is contained in:
parent
ae824f0024
commit
399c168ab5
1 changed files with 2 additions and 0 deletions
|
|
@ -694,6 +694,8 @@ static int rk3x_i2c_v0_calc_timings(unsigned long clk_rate,
|
|||
t_calc->div_low--;
|
||||
t_calc->div_high--;
|
||||
|
||||
/* Give the tuning value 0, that would not update con register */
|
||||
t_calc->tuning = 0;
|
||||
/* Maximum divider supported by hw is 0xffff */
|
||||
if (t_calc->div_low > 0xffff) {
|
||||
t_calc->div_low = 0xffff;
|
||||
|
|
|
|||
Loading…
Reference in a new issue