File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[package ]
22name = " amdgpu-sysfs"
3- version = " 0.18.0 "
3+ version = " 0.18.1 "
44authors = [" Ilya Zlobintsev <ilya.zl@protonmail.com>" ]
55edition = " 2021"
66license = " GPL-3.0"
Original file line number Diff line number Diff line change @@ -133,6 +133,18 @@ impl HwMon {
133133 pwm. parse ( ) . context ( "Unexpected PWM (driver bug?)" )
134134 }
135135
136+ /// Gets the minimum pulse width modulation fan level.
137+ pub fn get_fan_min_pwm ( & self ) -> Result < u8 > {
138+ let pwm = self . read_file ( "pwm1_min" ) ?;
139+ pwm. parse ( ) . context ( "Unexpected PWM (driver bug?)" )
140+ }
141+
142+ /// Gets the maximum pulse width modulation fan level.
143+ pub fn get_fan_max_pwm ( & self ) -> Result < u8 > {
144+ let pwm = self . read_file ( "pwm1_max" ) ?;
145+ pwm. parse ( ) . context ( "Unexpected PWM (driver bug?)" )
146+ }
147+
136148 /// Sets the pulse width modulation fan level.
137149 pub fn set_fan_pwm ( & self , pwm : u8 ) -> Result < ( ) > {
138150 self . write_file ( "pwm1" , pwm. to_string ( ) )
You can’t perform that action at this time.
0 commit comments