Commit 995444d5 authored by Tim Lin's avatar Tim Lin Committed by Fabio Baltieri
Browse files

ITE: drivers/i2c: Modify the condition of assert



Channel B or C do not necessarily have to use FIFO mode.

Signed-off-by: default avatarTim Lin <tim2.lin@ite.corp-partner.google.com>
parent f851d2a6
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1232,11 +1232,9 @@ static const struct i2c_driver_api i2c_it8xxx2_driver_api = {
};

#ifdef CONFIG_I2C_IT8XXX2_FIFO_MODE
BUILD_ASSERT(((DT_INST_PROP(SMB_CHANNEL_B, fifo_enable) == true) &&
	     (DT_INST_PROP(SMB_CHANNEL_C, fifo_enable) == false)) ||
	     ((DT_INST_PROP(SMB_CHANNEL_B, fifo_enable) == false) &&
BUILD_ASSERT(!((DT_INST_PROP(SMB_CHANNEL_B, fifo_enable) == true) &&
	     (DT_INST_PROP(SMB_CHANNEL_C, fifo_enable) == true)),
	     "FIFO2 only supports one channel of B or C.");
	     "Channel B and C cannot support FIFO mode at the same time.");
#endif

#define I2C_ITE_IT8XXX2_INIT(inst)                                              \