Commit 92c34954 authored by Gerard Marull-Paretas's avatar Gerard Marull-Paretas Committed by Dan Kalowsky
Browse files

drivers: i2c: nrfx_twi[m]: default to I2C_BITRATE_STANDARD



Instead of forcing a definition in Devicetree. Right now, SoC DT files
contain this default, but it should not be part of SoC DT files.

Signed-off-by: default avatarGerard Marull-Paretas <gerard@teslabs.com>
parent fc4f385e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -22,7 +22,8 @@ extern "C" {
					  : I2C_NRFX_TWI_INVALID_FREQUENCY)
#define I2C(idx) DT_NODELABEL(i2c##idx)
#define I2C_FREQUENCY(idx)						       \
	I2C_NRFX_TWI_FREQUENCY(DT_PROP(I2C(idx), clock_frequency))
	I2C_NRFX_TWI_FREQUENCY(DT_PROP_OR(I2C(idx), clock_frequency,	       \
					  I2C_BITRATE_STANDARD))

struct i2c_nrfx_twi_common_data {
	uint32_t dev_config;
+2 −1
Original line number Diff line number Diff line
@@ -28,7 +28,8 @@ extern "C" {

#define I2C(idx)                DT_NODELABEL(i2c##idx)
#define I2C_HAS_PROP(idx, prop) DT_NODE_HAS_PROP(I2C(idx), prop)
#define I2C_FREQUENCY(idx)      I2C_NRFX_TWIM_FREQUENCY(DT_PROP(I2C(idx), clock_frequency))
#define I2C_FREQUENCY(idx)      I2C_NRFX_TWIM_FREQUENCY(DT_PROP_OR(I2C(idx), clock_frequency,      \
								   I2C_BITRATE_STANDARD))

struct i2c_nrfx_twim_common_config {
	nrfx_twim_t twim;