From a6c76c4dd92f698f022b2bf89210e8d055389d3b Mon Sep 17 00:00:00 2001 From: Luis Ubieda Date: Tue, 15 Apr 2025 10:30:55 -0400 Subject: [PATCH] drivers: i2c_rtio: max32: fix i2c_configure to return 0 on success To comply with the API definition. This was caught by running i2c_ram test. Signed-off-by: Luis Ubieda --- drivers/i2c/i2c_max32.c | 2 +- drivers/i2c/i2c_max32_rtio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/i2c_max32.c b/drivers/i2c/i2c_max32.c index db370b9955b..8fdbe71de6c 100644 --- a/drivers/i2c/i2c_max32.c +++ b/drivers/i2c/i2c_max32.c @@ -100,7 +100,7 @@ static int api_configure(const struct device *dev, uint32_t dev_cfg) return -ENOTSUP; } - return ret; + return ((ret > 0) ? 0 : -EIO); } #ifdef CONFIG_I2C_TARGET diff --git a/drivers/i2c/i2c_max32_rtio.c b/drivers/i2c/i2c_max32_rtio.c index 40ceeffdd41..5cd7a41ac1b 100644 --- a/drivers/i2c/i2c_max32_rtio.c +++ b/drivers/i2c/i2c_max32_rtio.c @@ -97,7 +97,7 @@ static int max32_do_configure(const struct device *dev, uint32_t dev_cfg) return -ENOTSUP; } - return ret; + return ((ret > 0) ? 0 : -EIO); } static void max32_complete(const struct device *dev, int status);