ITE: drivers/i2c: Bug in build assert when FIFO enable

We need to do a build assert for the fifo enable status of 'I2C2'.
There is a problem with using instance to obtain property when
any one I2C port is not enabled.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
This commit is contained in:
Tim Lin 2023-11-08 17:43:31 +08:00 committed by Carles Cufí
parent 986422f4f2
commit adc30ff294

View file

@ -1255,7 +1255,7 @@ static const struct i2c_driver_api i2c_it8xxx2_driver_api = {
* that channel C may encounter wrong register being written due to FIFO2
* byte counter wrong write after channel B's write operation.
*/
BUILD_ASSERT((DT_INST_PROP(SMB_CHANNEL_C, fifo_enable) == false),
BUILD_ASSERT((DT_PROP(DT_NODELABEL(i2c2), fifo_enable) == false),
"Channel C cannot use FIFO mode.");
#endif