Skip to content

Device (de)initialization use case #40385

Closed
@tbursztyka

Description

@tbursztyka

There seems to be a cross-over of uses-cases/requirements between 2 issues around device initialization, so gathering both here for tracking and discussion.

Let's summarize the requirements:

Add the ability to manually initialize a device:

This means adding 2 things:

  • marking a device as manually initialized
  • exposing a device_init() function

Add the ability to de-initialize a device:

  • exposing a device_deinit() function (or some other relevant name)

Cross-over requirements:

  • Forcing initialization: device_deinit() needs to be called prior to device_init()
  • In case PM is enabled: device_deninit() should call PM to put the device OFF (so all dependencies will also be properly affected)
  • In case PM is not enabled: we will need a better error-management so if a device is put down, things will not just explode (dependencies still trying to access the device etc...). Device APIs do not check for device status, so currently calling a device that has been de-initialized, would lead to unknown state.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions