Opened 2 weeks ago

Closed 2 weeks ago

Last modified 13 days 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:
Has a Patch: no 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 Changed 2 weeks ago by waddlesplash

Cc: tqh added

comment:2 Changed 2 weeks ago by korli

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 Changed 2 weeks ago by tqh

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 Changed 13 days ago by pulkomandy

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.