Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#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 waddlesplash, 6 years ago

Cc: tqh added

comment:2 by korli, 6 years ago

Resolution: invalid
Status: newclosed

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)

comment:3 by tqh, 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 pulkomandy, 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).

Note: See TracTickets for help on using tickets.