Lines Matching full:hwmon

3 #Creates a configuration file for each hwmon sensor in the MRW
4 #for use by the phosphor-hwmon daemon. These configuration files
5 #contain labels and thresholds for the hwmon features for that sensor.
23 my @hwmon;
37 getI2CSensors($bmc, \@hwmon);
39 makeConfFiles($bmc, \@hwmon);
44 #Returns an array of hashes that represent hwmon enabled I2C sensors.
47 my ($bmc, $hwmon) = @_;
56 "unit-hwmon-feature",
59 #If the MRW doesn't specify a label for a particular hwmon
63 #If chip didn't have hwmon units, it isn't hwmon enabled.
72 push @$hwmon, { %entry };
77 #Removes entries from the list of hwmon units passed in that have
86 my $hwmon = $g_targetObj->getAttributeField($$units[$i],
92 if (($hwmon eq "") || ($name eq "")) {
102 #Reads the hwmon related attributes from the HWMON_FEATURE
111 #The hwmon name, like 'in1', 'temp1', 'fan1', etc
112 my $hwmon = $g_targetObj->getAttributeField($unit,
120 $hwmonFeatures{$hwmon}{label} = $name;
127 $hwmonFeatures{$hwmon}{warnhigh} = $warnHigh;
134 $hwmonFeatures{$hwmon}{warnlow} = $warnLow;
141 $hwmonFeatures{$hwmon}{crithigh} = $critHigh;
148 $hwmonFeatures{$hwmon}{critlow} = $critLow;
152 $entry->{hwmon} = { %hwmonFeatures };
188 my ($bmc, $hwmon) = @_;
190 for my $entry (@$hwmon) {
196 #Writes out a configuration file for a hwmon sensor, containing:
215 for my $feature (sort keys %{$entry->{hwmon}}) {
216 print $f "LABEL_$feature = \"$entry->{hwmon}{$feature}{label}\"\n";
219 if (exists $entry->{hwmon}{$feature}{warnhigh}) {
220 print $f "WARNHI_$feature = \"$entry->{hwmon}{$feature}{warnhigh}\"\n";
222 if (exists $entry->{hwmon}{$feature}{warnlow}) {
223 print $f "WARNLO_$feature = \"$entry->{hwmon}{$feature}{warnlow}\"\n";
225 if (exists $entry->{hwmon}{$feature}{crithigh}) {
226 print $f "CRITHI_$feature = \"$entry->{hwmon}{$feature}{crithigh}\"\n";
228 if (exists $entry->{hwmon}{$feature}{critlow}) {
229 print $f "CRITLO_$feature = \"$entry->{hwmon}{$feature}{critlow}\"\n";
280 die "HWMON bus type $entry->{type} not implemented yet\n";