diff options
author | George Hung <george.hung@quantatw.com> | 2021-03-17 16:08:15 +0300 |
---|---|---|
committer | George Hung <george.hung@quantatw.com> | 2021-03-23 04:04:17 +0300 |
commit | 2f2806f5ec8c24918e08db168219094c99f49c97 (patch) | |
tree | 5ee5320fc38859e33e1012a839f2dc4b8c53c916 /meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor | |
parent | 1353b8dd1f96dabf8b33f8b0ba70e882c35d424c (diff) | |
download | openbmc-2f2806f5ec8c24918e08db168219094c99f49c97.tar.xz |
meta-quanta: gbs: set Max/Min value to i2cool sensors
Set the Max/Min value to i2cool sensors to avoid the
abnormal current/thershold values in the SEL logs
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: Ie46e07a9a41f65b820258675f0e213e5434583cc
Diffstat (limited to 'meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor')
2 files changed, 16 insertions, 0 deletions
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/phosphor-virtual-sensor.service.replace b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/phosphor-virtual-sensor.service.replace index 8068d3bd2..eae38b23d 100644 --- a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/phosphor-virtual-sensor.service.replace +++ b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/phosphor-virtual-sensor.service.replace @@ -8,6 +8,7 @@ ExecStartPre=mapper wait /xyz/openbmc_project/sensors/temperature/inlet ExecStartPre=mapper wait /xyz/openbmc_project/sensors/temperature/outlet_0 ExecStartPre=mapper wait /xyz/openbmc_project/sensors/temperature/outlet_1 ExecStart=/usr/bin/virtual-sensor +ExecStartPost=/usr/bin/setMaxMinValue.sh Type=dbus BusName=xyz.openbmc_project.VirtualSensor SyslogIdentifier=phosphor-virtual-sensor diff --git a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/setMaxMinValue.sh b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/setMaxMinValue.sh new file mode 100644 index 000000000..604eafccc --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/setMaxMinValue.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +serviceName="xyz.openbmc_project.VirtualSensor" +interfaceName="xyz.openbmc_project.Sensor.Value" +objectPath="/xyz/openbmc_project/sensors/temperature/" + +# set MaxValue, MinValue to sensor dbus property +for i in {0..2}; do + sensorPath="${objectPath}i2cool_${i}" + mapper wait $sensorPath + busctl set-property $serviceName $sensorPath $interfaceName MaxValue d 127 + busctl set-property $serviceName $sensorPath $interfaceName MinValue d -- -128 +done + +exit 0 |