Cleanup unsafe sysfs interfaces. Bugfixes for UI

This commit is contained in:
Luke D. Jones
2025-01-16 23:56:12 +13:00
parent 7a1b45071d
commit 2b22f82b72
22 changed files with 379 additions and 553 deletions

View File

@@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize};
use zbus::zvariant::{OwnedValue, Type, Value};
use crate::error::{PlatformError, Result};
use crate::{attr_bool, attr_string, attr_u8, to_device};
use crate::{attr_string, attr_u8, to_device};
/// The "platform" device provides access to things like:
/// - `dgpu_disable`
@@ -24,16 +24,6 @@ pub struct RogPlatform {
}
impl RogPlatform {
attr_bool!("dgpu_disable", path);
attr_bool!("egpu_enable", path);
attr_u8!("gpu_mux_mode", path);
attr_bool!("panel_od", path);
attr_bool!("mini_led_mode", path);
attr_u8!(
/// This is technically the same as `platform_profile` since both are
/// tied in-kernel
@@ -47,12 +37,6 @@ impl RogPlatform {
pp_path
);
attr_bool!(
/// Control the POST animation "FWOOoosh" sound
"boot_sound",
path
);
pub fn new() -> Result<Self> {
let mut enumerator = udev::Enumerator::new().map_err(|err| {
warn!("{}", err);