Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • F firmware
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 74
    • Issues 74
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 29
    • Merge requests 29
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • card10card10
  • firmware
  • Merge requests
  • !363

Port buttons module to new hwlock API & fix related USB mode deadlock

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rahix requested to merge rahix/fix-buttons into master Dec 26, 2019
  • Overview 2
  • Commits 2
  • Pipelines 1
  • Changes 1

Port the buttons module to the new hwlock API introduced in commit b46a9e7a ("Merge 'Port hardware locks to new mutex API'").

Additionally, fix issue #189 (closed). I can't tell for sure why this bug was triggered from USB mode but fixing it also fixes the USB issue. The bug in question is an unguarded I2C transaction (from the commit message):

The call to MAX77650_getDebounceStatusnEN0() in epic_buttons_read() performs transactions on the I2C bus but is not guarded by locking the I2C hwlock. This leads to strange issues like USB mode deadlocking when writing large files.

Widen the hwlock I2C section to encompass the MAX77650_getDebounceStatusnEN0() call as well. This fixes #189 (closed).


(We severely need to move the lock to the bus level ...)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: rahix/fix-buttons