Rework the CPUGovernors enum a bit.

Change to CPUScalingGovernors and use strum
crate to remove some cruft.
This commit is contained in:
Jeremy Whiting 2024-06-18 14:52:56 -06:00
parent c75c50762d
commit 93e153079d
8 changed files with 126 additions and 150 deletions

View file

@ -65,15 +65,15 @@ trait Manager {
#[zbus(property)]
fn set_gpu_performance_level(&self, value: u32) -> zbus::Result<()>;
/// CpuGovernor property
/// CpuScalingGovernor property
#[zbus(property)]
fn cpu_governor(&self) -> zbus::Result<u32>;
fn cpu_scaling_governor(&self) -> zbus::Result<String>;
#[zbus(property)]
fn set_cpu_governor(&self, value: u32) -> zbus::Result<()>;
fn set_cpu_scaling_governor(&self, value: String) -> zbus::Result<()>;
/// CpuGovernors property
/// AvailableCpuScalingGovernors property
#[zbus(property)]
fn cpu_governors(&self) -> zbus::Result<std::collections::HashMap<u32, String>>;
fn available_cpu_scaling_governors(&self) -> zbus::Result<Vec<String>>;
/// GpuPowerProfile property
#[zbus(property)]