summaryrefslogtreecommitdiff
path: root/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/setMaxMinValue.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/setMaxMinValue.sh')
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/setMaxMinValue.sh15
1 files changed, 15 insertions, 0 deletions
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