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: FrameworkComputer/framework-win-sensor-driver
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: FrameworkComputer/framework-win-sensor-driver
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: check-busy-bit
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Mar 1, 2026

  1. Accelerometer: Wait for EC busy bit and validate sample ID

    The EC has a busy bit and sample ID which tells us when it's currerntly
    updating samples and if the data is from the current or the previous
    sample.
    
    Without checking this we risk reading incomplete/invalid data.
    So now we're implementing the logic to report data only after the EC has
    finished updating and we're still reading the same sample.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Mar 1, 2026
    Configuration menu
    Copy the full SHA
    fc95b8f View commit details
    Browse the repository at this point in the history
  2. Accelerometer: Check CrosEcReadMemU8 return values

    CrosEcReadMemU8 returns 0 on IOCTL failure but we never check this. If
    the memmap read fails, the buffers stay uninitialized/unchanged, which
    makes the busy bit logic fail and the sensor report the wrong data.
    
    Add an EC_READ_U8 helper macro to checks for failure and jump to Exit
    with STATUS_IO_DEVICE_ERROR, so that broken EC communication is properly
    reported instead of producing invalid readings.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Mar 1, 2026
    Configuration menu
    Copy the full SHA
    12ea959 View commit details
    Browse the repository at this point in the history
Loading