Searched hist:"5636 d52b" (Results 1 – 2 of 2) sorted by relevance
/openbmc/dbus-sensors/src/ |
H A D | Thresholds.cpp | 5636d52b Wed Mar 17 14:52:18 CDT 2021 Matt Spinler <spinler@us.ibm.com> HwmonTempSensor: Thresholds for multi-temp devices This commit adds support to be able to create the Threshold interfaces for the additional temperature sensors on multi-sensor devices. Previously, there could only be a threshold on the first sensor on the device. In some sensors, such as the TMP401 family, the remote sensors which can be wired to other devices are the temp2+_input values and it's likely those remote values are the interesting ones, as opposed to just the local temp in temp1_input. To specify thresholds for multiple sensors on the device, the 'Index' property is added to the entity-manager JSON for the sensor. When the index is present, code matches that threshold entry with the sensor that has an input file with that index number in the tempX prefix. For example, Index = 2 would be used for the sensor that has temp2_input as the sensor value file. Example JSON is: { "Index": 1 // This threshold is for the temp1_input sensor "Direction": "greater than", "Name": "upper critical", "Severity": 1, "Value": 70, }, { "Index": 2 // This threshold is for the temp2_input sensor "Direction": "greater than", "Name": "upper critical", "Severity": 1, "Value": 80, } If 'Index' is not present in the threshold data from entity-manager, then just the first sensor will get the threshold, the same as before. Tested: Made sensors for a TMP423 which provides 4 temperature values. Verified thresholds showed up on each sensor when 'Index' was used. Verified when less then 4 thresholds were specified that they were placed appropriately. Also used just a single Threshold entry with no Index value and verified the threshold just showed up on the first sensor. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: If787364761647088174cb72006727ee4e1d9225f
|
H A D | HwmonTempMain.cpp | 5636d52b Wed Mar 17 14:52:18 CDT 2021 Matt Spinler <spinler@us.ibm.com> HwmonTempSensor: Thresholds for multi-temp devices This commit adds support to be able to create the Threshold interfaces for the additional temperature sensors on multi-sensor devices. Previously, there could only be a threshold on the first sensor on the device. In some sensors, such as the TMP401 family, the remote sensors which can be wired to other devices are the temp2+_input values and it's likely those remote values are the interesting ones, as opposed to just the local temp in temp1_input. To specify thresholds for multiple sensors on the device, the 'Index' property is added to the entity-manager JSON for the sensor. When the index is present, code matches that threshold entry with the sensor that has an input file with that index number in the tempX prefix. For example, Index = 2 would be used for the sensor that has temp2_input as the sensor value file. Example JSON is: { "Index": 1 // This threshold is for the temp1_input sensor "Direction": "greater than", "Name": "upper critical", "Severity": 1, "Value": 70, }, { "Index": 2 // This threshold is for the temp2_input sensor "Direction": "greater than", "Name": "upper critical", "Severity": 1, "Value": 80, } If 'Index' is not present in the threshold data from entity-manager, then just the first sensor will get the threshold, the same as before. Tested: Made sensors for a TMP423 which provides 4 temperature values. Verified thresholds showed up on each sensor when 'Index' was used. Verified when less then 4 thresholds were specified that they were placed appropriately. Also used just a single Threshold entry with no Index value and verified the threshold just showed up on the first sensor. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: If787364761647088174cb72006727ee4e1d9225f
|