Skip to content

[RFC] API change - Switch all struct device to constant #27399

@tbursztyka

Description

@tbursztyka

Introduction

Problem description

struct device instances are currently in ram, but most of their attribute never change at runtime. The only one being touched is a legacy hack that has to be properly fixed. At this point all device instance could be made constant to save RAM.

Proposed change

Just add the const qualifier to all struct device instance.

Detailed RFC

Proposed change (Detailed)

  • Replace the driver_api trick in kernel/device.c by a better solution
  • add const qualifier to all device instance
  • make all isr taking a const parameter

Dependencies

Concerns and Unresolved Questions

None

Alternatives

Keep what we have which is under-optimized solution.

Metadata

Metadata

Assignees

Labels

Breaking API ChangeBreaking changes to stable, public APIsRFCRequest For Comments: want input from the communityarea: APIChanges to public APIsarea: Device Management

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions