drivers: i2c: use CPU clock frequency in configuration on CC13XX/CC26XX

The I2C peripheral should be configured using the CPU clock frequency
and not the system clock frequency. This used to be fine because they
were the same before #19232, but now that the system clock is
RTC-based (which has a different frequency), we can no longer make
that assumption.

Fixes #20480

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit is contained in:
Vincent Wan 2019-11-06 10:41:10 -08:00 committed by Kumar Gala
commit 0297756342

View file

@ -248,7 +248,7 @@ static int i2c_cc13xx_cc26xx_configure(struct device *dev, u32_t dev_config)
/* Enables and configures I2C master */
I2CMasterInitExpClk(get_dev_config(dev)->base,
sys_clock_hw_cycles_per_sec(), fast);
DT_CPU_CLOCK_FREQUENCY, fast);
return 0;
}