Skip to content

drivers: i2c: max32: fix i2c_configure to return 0 on success #88664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_max32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_max32_rtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down