#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum ECPUGovernor {
    Invalid = 0,
    Perf = 1,
    Powersave = 2,
    Manual = 3,
}

impl ECPUGovernor {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Perf as i32 => Some(Self::Perf),
            x if x == Self::Powersave as i32 => Some(Self::Powersave),
            x if x == Self::Manual as i32 => Some(Self::Manual),
            _ => None,
        }
    }
}
