Skip to content

drivers: Ensure read methods auto-trigger conversion in power-down mode. #44

@nedseb

Description

@nedseb

Problem

Some drivers do not automatically trigger a conversion when measurement methods are called while the sensor is in power-off or idle mode.

Convention

When a driver is powered off or idle, calling any measurement method should automatically trigger a conversion before reading. All drivers implement _ensure_data() which checks the power state and triggers a conversion if needed, with polling and timeout (OSError on failure).

Reference pattern: _ensure_data() (see WSEN-PADS, WSEN-HIDS, HTS221).

Audit results

Fixed

To audit

Not concerned

  • BQ27441: battery gauge, always active — no power-off mode
  • MCP23009E: GPIO expander — no conversion concept
  • SSD1327: display driver — no conversion concept

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions