Re: [PATCH v4] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-10-12 Thread Doug Anderson
Max, On Sun, Oct 12, 2014 at 5:10 AM, Max Schwarz wrote: >> + /* Adjust to avoid overflow */ >> + i2c_rate_khz = DIV_ROUND_UP(i2c_rate, 1000); >> + scl_rate_khz = DIV_ROUND_UP(scl_rate, 1000); > > I'm not really comfortable with using DIV_ROUND_UP on the last line, since > this may vi

Re: [PATCH v4] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-10-12 Thread Max Schwarz
Hi Addy, sorry for the long delay, I finally had time to look at your work. On Thursday 09 October 2014 at 14:47:15, Addy Ke wrote: > As show in I2C specification: > - Standard-mode: the minimum HIGH period of the scl clock is 4.0us > the minimum LOW period of the scl clock is 4.

Re: [PATCH v4] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-10-11 Thread Heiko Stübner
Am Donnerstag, 9. Oktober 2014, 14:47:15 schrieb Addy Ke: > As show in I2C specification: > - Standard-mode: the minimum HIGH period of the scl clock is 4.0us > the minimum LOW period of the scl clock is 4.7us > - Fast-mode: the minimum HIGH period of the scl clock is 0.6us >

[PATCH v4] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-10-08 Thread Addy Ke
As show in I2C specification: - Standard-mode: the minimum HIGH period of the scl clock is 4.0us the minimum LOW period of the scl clock is 4.7us - Fast-mode: the minimum HIGH period of the scl clock is 0.6us the minimum LOW period of the scl clock is 1.3us I have mea