Skip to content
Commit 16c40b16 authored by Andriy Gelman's avatar Andriy Gelman Committed by Carles Cufí
Browse files

drivers: i2c: i2c_ifx_xmc4: Configure I2C and other small fixes



Currently the driver is not configured as controller during initialization.
Any use of I2C in controller mode without an explicit i2c_configure() will
not work.

In this commit the driver is automatically configured.
But, delay the configuraition until first use instead of during init
because otherwise tests/drivers/i2c/i2c_target_api hangs without any
errors on xmc47_relax_kit (when internal pulls are used). This issue
needs to be investigated.

There are a few other fixes/cleanups:
- Change the default master_frequency from XMC4_I2C_SPEED_STANDARD to
  I2C_SPEED_STANDARD.
- Use devicetree clock frequency for target configuration instead of
  I2C_SPEED_STANDARD.
- Rename master_frequency to bitrate as it's also used by the target
  configuration now.
- Remove several uneeded casts.
- Forward backup config in get_config().

Signed-off-by: default avatarAndriy Gelman <andriy.gelman@gmail.com>
parent 24b57419
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment