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
I2C get_config API #39006
I2C get_config API #39006
Conversation
Shouldn't be there handler provided, in |
I am not sure about the api call name: shouldn't it be rather |
I think it would be better to rename 'configure' to set_config", then |
@sjg20 Agree: provide |
Yes, done. |
First of all, I don't want to change the Regarding how to name the new function, I used |
Is there any way to speed up the review? |
@semihalf-niedzwiecki-dawid I think the change requires following https://docs.zephyrproject.org/latest/reference/api/api_lifecycle.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a test to tests/drivers/i2c for this new API.
|
Done. |
Some applications need to get the current I2C configuration. Add a proper callback to I2C API under Kconfig option not to change applications that don't need this feature. Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Add get_config function to NPCX I2C driver. The master mode is hardcoded and get the speed from a controller. Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Add get_config function to I2C emulator. Also update tests using I2C emulator to use i2c_get_config. Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Add testing of the new i2c_get_config function to the i2c_api test. Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
@galak please revisit |
Do we have to wait for @galak? |
@carlescufi Is there anything I can do to merge the PR? |
No description provided.