#14328 closed bug (invalid)
Clean up power modules
Reported by: | waddlesplash | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | - General | Version: | R1/Development |
Keywords: | Cc: | korli, PulkoMandy, tqh | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Right now, there is both a "drivers/power" and a "power" directory:
http://xref.plausible.coop/source/xref/haiku/src/add-ons/kernel/drivers/power/
http://xref.plausible.coop/source/xref/haiku/src/add-ons/kernel/power/
I see no reason to keep both; we should pick one convention and move the other drivers to it. Thoughts?
Change History (4)
comment:1 by , 6 years ago
Cc: | added |
---|
comment:2 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 by , 6 years ago
I always found it weird that drivers/power contains only acpi drivers. And kernel/power seems to be more about cpu function: idling / frequency.
It could be improved.
comment:4 by , 6 years ago
From a strict point of view, "drivers" are a specific subset of modules that are managed by the device manager and provide a device_module_info and/or driver_module_info.
The cpuidle and cpufreq modules does not fit with this as they are handled by other parts of the kernel (IIRC they are tied with the scheduler), so they are outside the drivers directory. We could maybe move them to the generic/ dir, but keeping power/ sounds fine, in case we have other implementations someday (for ARM, etc).
Note that there is a similar situation with bluetooth/ (the generic bluetooth stack) and drivers/bluetooth/ (drivers for specific bluetooth peripherals).
http://xref.plausible.coop/source/xref/haiku/src/add-ons/kernel/power/ export a cpuidle_module_info (see headers/os/drivers/cpuidle.h)
http://xref.plausible.coop/source/xref/haiku/src/add-ons/kernel/drivers/power/ export driver_module_info and device_module_info (see headers/os/drivers/device_manager.h)