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

i2c: start() should aquire the bus #14675

Merged
merged 1 commit into from
Jun 7, 2021
Merged

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented May 18, 2021

Summary of changes

From the history it looks like aquire was not added explicitely to start. I do not see
why as it's the condition that must be sent when communication is initiated.

write/read/transfer invoke aquire()

This start() is rarely used, mainly in the old mbed 2 code when you wanted to construct i2c command all together. I found some code to illustrate; https://os.mbed.com/users/aquahika/code/MLX90614//file/dcd4fe76bd13/mlx90614.cpp/ . This change should not affect these sensors as if you send multiple starts, aquire is protected against it so no need to check in start().

Impact of changes

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


From the history it looks like aquire was not added explicitely to start. I do not see
why as it's the condition that must be sent when communication is initiated.

write/read/transfer invoke `aquire()`
@0xc0170
Copy link
Contributor Author

0xc0170 commented May 18, 2021

@multiplemonomials As you mentioned it in the i2c issue, please review

@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label May 18, 2021
@ciarmcom ciarmcom requested a review from a team May 18, 2021 12:00
@ciarmcom
Copy link
Member

@0xc0170, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor Author

0xc0170 commented May 18, 2021

This was highlighted in #14004 (not fixing it completely though, there is lpc1768 issue with recovery bus)

@ciarmcom ciarmcom added the stale Stale Pull Request label May 21, 2021
@ciarmcom
Copy link
Member

This pull request has automatically been marked as stale because it has had no recent activity. @ARMmbed/mbed-os-maintainers, please complete review of the changes to move the PR forward. Thank you for your contributions.

@0xc0170 0xc0170 requested a review from a team May 21, 2021 12:53
@ciarmcom
Copy link
Member

This pull request has automatically been marked as stale because it has had no recent activity. @ARMmbed/mbed-os-maintainers, @ARMmbed/mbed-os-core, please complete review of the changes to move the PR forward. Thank you for your contributions.

@ciarmcom ciarmcom added stale Stale Pull Request and removed stale Stale Pull Request labels May 21, 2021
@ciarmcom ciarmcom added stale Stale Pull Request and removed stale Stale Pull Request labels May 28, 2021
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 2, 2021

Reviewers please review, if this makes sense.

@ciarmcom ciarmcom removed the stale Stale Pull Request label Jun 2, 2021
@mergify mergify bot added needs: CI and removed needs: review labels Jun 4, 2021
@ciarmcom
Copy link
Member

ciarmcom commented Jun 7, 2021

This pull request has automatically been marked as stale because it has had no recent activity. @ARMmbed/mbed-os-maintainers, please start CI to get the PR merged.

@ciarmcom ciarmcom added the stale Stale Pull Request label Jun 7, 2021
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 7, 2021

CI started

@0xc0170 0xc0170 removed the stale Stale Pull Request label Jun 7, 2021
@mbed-ci
Copy link

mbed-ci commented Jun 7, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170 0xc0170 merged commit ae79b61 into ARMmbed:master Jun 7, 2021
@0xc0170 0xc0170 deleted the fix_i2c_start branch June 7, 2021 18:50
@mergify mergify bot removed the ready for merge label Jun 7, 2021
@mbedmain mbedmain added release-version: 6.12.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants