i2c: designware: Adjust bus_freq_hz when refuse high speed mode set
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 31 Mar 2021 11:05:10 +0000 (14:05 +0300)
committerWolfram Sang <wsa@kernel.org>
Mon, 5 Apr 2021 20:50:15 +0000 (22:50 +0200)
commit5e729bc54bda705f64941008b018b4e41a4322bf
treee46ba94ec50f482d5dcdaeab2db6f72fa3409814
parent629a411f7e71afeee34edd4c1418c4e7f7d5575a
i2c: designware: Adjust bus_freq_hz when refuse high speed mode set

When hardware doesn't support High Speed Mode, we forget bus_freq_hz
timing adjustment. This makes the timings and real registers being
unsynchronized. Adjust bus_freq_hz when refuse high speed mode set.

Fixes: b6e67145f149 ("i2c: designware: Enable high speed mode")
Reported-by: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Barry Song <song.bao.hua@hisilicon.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-designware-master.c