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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ubieda
Copy link
Member

@ubieda ubieda commented Apr 15, 2025

Description

Enforce i2c_configure API return value so it complies with its definition (zero on success). This was caught by running i2c_ram test.

Testing

west build -b max32655fthr/max32655/m4 tests/drivers/i2c/i2c_ram/
  • Overlay (boards/max32655fthr_max32655_m4.overlay)
/ {
	aliases {
		i2c-ram = &i2c2;
	};
};
  • Console Output
*** Booting Zephyr OS build v4.1.0-2421-gc86f7caa6188 ***
Running TESTSUITE i2c_ram
===================================================================
START - test_ram_transfer
ram using i2c_transfer from thread 0x20010048 addr 7
 PASS - test_ram_transfer in 0.007 seconds
===================================================================
START - test_ram_write_read
ram using i2c_write and i2c_write_read from thread 0x20010048 addr e
 PASS - test_ram_write_read in 0.009 seconds
===================================================================
TESTSUITE i2c_ram succeeded

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [i2c_ram]: pass = 2, fail = 0, skip = 0, total = 2 duration = 0.016 seconds
 - PASS - [i2c_ram.test_ram_transfer] duration = 0.007 seconds
 - PASS - [i2c_ram.test_ram_write_read] duration = 0.009 seconds

------ TESTSUITE SUMMARY END ------

===================================================================
PROJECT EXECUTION SUCCESSFUL

To comply with the API definition. This was caught by running i2c_ram
test.

Signed-off-by: Luis Ubieda <[email protected]>
@ubieda ubieda marked this pull request as ready for review April 15, 2025 14:40
@github-actions github-actions bot added area: I2C platform: ADI Analog Devices, Inc. labels Apr 15, 2025
@ubieda ubieda changed the title drivers: i2c_rtio: max32: fix i2c_configure to return 0 on success drivers: i2c: max32: fix i2c_configure to return 0 on success Apr 15, 2025
@ubieda ubieda added the size: XS A PR changing only a single line of code label Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: I2C platform: ADI Analog Devices, Inc. size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants