diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-01-18 08:04:23 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-01-18 08:18:16 +0100 |
commit | 2da80b57c69a2a5ae0e16dead8cdbfab46f970bc (patch) | |
tree | 402529def53a1b32066493f5581c3e1810d11a1d /drivers/i2c/busses/i2c-davinci.c | |
parent | drm/i915: Pass the dma_addr_t array as const to rotate_pages() (diff) | |
parent | Merge tag 'drm-intel-next-fixes-2016-01-14' of git://anongit.freedesktop.org/... (diff) | |
download | linux-2da80b57c69a2a5ae0e16dead8cdbfab46f970bc.tar.xz linux-2da80b57c69a2a5ae0e16dead8cdbfab46f970bc.zip |
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued
Pull in Dave's drm-next pull request to have a clean base for 4.6.
Also, we need the various atomic state extensions Maarten recently
created.
Conflicts are just adjacent changes that all resolve to nothing in git
diff.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/i2c/busses/i2c-davinci.c')
-rw-r--r-- | drivers/i2c/busses/i2c-davinci.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index c5628a42170a..a8bdcb5292f5 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -202,8 +202,15 @@ static void i2c_davinci_calc_clk_dividers(struct davinci_i2c_dev *dev) * d is always 6 on Keystone I2C controller */ - /* get minimum of 7 MHz clock, but max of 12 MHz */ - psc = (input_clock / 7000000) - 1; + /* + * Both Davinci and current Keystone User Guides recommend a value + * between 7MHz and 12MHz. In reality 7MHz module clock doesn't + * always produce enough margin between SDA and SCL transitions. + * Measurements show that the higher the module clock is, the + * bigger is the margin, providing more reliable communication. + * So we better target for 12MHz. + */ + psc = (input_clock / 12000000) - 1; if ((input_clock / (psc + 1)) > 12000000) psc++; /* better to run under spec than over */ d = (psc >= 2) ? 5 : 7 - psc; |