@@ -58,9 +58,10 @@ impl HwmonTemp {
5858 let name = name. trim ( ) . to_lowercase ( ) ;
5959 info ! ( " path: {name_path:?}. name: {name}" ) ;
6060
61- if name. contains ( "coretemp" ) || name. contains ( "k10temp" ) || name. contains ( "cpu" ) {
61+ if name. contains ( "coretemp" ) || name. contains ( "k10temp" ) || name. contains ( "cpu" ) || name . contains ( "zenpower" ) {
6262 let mut tdie: Option < ( PathBuf , String ) > = None ;
6363 let mut tctl: Option < ( PathBuf , String ) > = None ;
64+ let mut ccd: Option < ( PathBuf , String ) > = None ;
6465 let mut core_fallbacks = vec ! [ ] ;
6566
6667 for i in 0 ..100 {
@@ -79,6 +80,9 @@ impl HwmonTemp {
7980 } else if label. eq_ignore_ascii_case ( "Tctl" ) {
8081 info ! ( " found sensor {label_path:?} {label}" ) ;
8182 tctl = Some ( ( input_path. clone ( ) , label. to_string ( ) ) ) ;
83+ } else if label. eq_ignore_ascii_case ( "ccd" ) {
84+ info ! ( " found sensor {label_path:?} {label}" ) ;
85+ ccd = Some ( ( input_path. clone ( ) , label. to_string ( ) ) ) ;
8286 } else if label. starts_with ( "Core" ) || label. contains ( "Package" ) {
8387 info ! ( " found sensor {label_path:?} {label}" ) ;
8488 core_fallbacks. push ( ( input_path. clone ( ) , label. to_string ( ) ) ) ;
@@ -87,7 +91,7 @@ impl HwmonTemp {
8791 }
8892
8993 // Prioritize Tdie > Tctl
90- if let Some ( ( path, _label) ) = tdie. or ( tctl) {
94+ if let Some ( ( path, _label) ) = tdie. or ( ccd ) . or ( tctl) {
9195 let crit_path = hwmon. join ( "temp1_crit" ) ;
9296 let crit_temp = fs:: read_to_string ( & crit_path)
9397 . ok ( )
0 commit comments