Skip to content
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

[BACKPORT] kinetis:i2c On failed reset re-init i2c and clocking #34

Merged
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
7 changes: 3 additions & 4 deletions arch/arm/src/kinetis/kinetis_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1324,17 +1324,16 @@ static int kinetis_i2c_reset(struct i2c_master_s *dev)

kinetis_pinconfig(MKI2C_INPUT(sda_gpio));
kinetis_pinconfig(MKI2C_INPUT(scl_gpio));
ret = OK;

/* Re-init the port */
/* Re-init the port (even on error to enable clock) */

out:
kinetis_i2c_init(priv);

/* Restore the frequency */

kinetis_i2c_setfrequency(priv, frequency);
ret = OK;

out:

/* Release the port for re-use by other clients */

Expand Down