Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sailfishos/usb-moded
base: 758e080b0e6f2b2ca53f93406c2636a3d366e56e
Choose a base ref
...
head repository: sailfishos/usb-moded
compare: a1e266fa877df9ea55010e5cfadf60eba314bcdb
Choose a head ref
  • 2 commits
  • 30 files changed
  • 2 contributors

Commits on Mar 2, 2021

  1. [usb_moded] Implement and use common mode selection logic. Fixes JB#5…

    …3122
    
    When device is booted up with cable connected and device lock code is
    not used, usb-mode is left at fallback_charging. This happens because
    usb-mode is re-evaluated on device unlock event, which does not occur
    when device lock is not used. Due to duplication of mode selection
    logic in various notification handlers, similar hard to find corner
    cases are likely to occur also when order of events is not as
    expected.
    
    Collect all mode selection logic into a single function and refactor
    control flow so that all triggers that might require a mode change are
    directed there.
    
    Additional changes to existing logic:
    - All mode changes are blocked until usb-moded enters mainloop
    - When shutdown is initiated, dynamic mode changes are blocked
    - Dynamic modes are canceled when user change is started, and
    - Re-evaluated / activated after user change is finished
    - Exception: already active rescue mode persists over user changes
    
    Reduce the amount of conditional MEEGOLOCK code by adding abstract
    helper functions in usb_moded.c and using those instead of functions
    that might not be available based on configuration options.
    
    Clean up unnecessary header file includes resulting from these and
    earlier changes.
    
    Signed-off-by: Simo Piiroinen <simo.piiroinen@jolla.com>
    spiiroin committed Mar 2, 2021
    Copy the full SHA
    3f3d04f View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2021

  1. Merge branch 'jb53122_common_evaluator' into 'master'

    Implement and use common usb mode selection logic
    
    See merge request mer-core/usb-moded!77
    spiiroin committed Mar 16, 2021
    Copy the full SHA
    a1e266f View commit details
    Browse the repository at this point in the history