[PATCH skeleton v2 5/9] Force fan duty to 100%
OpenBMC Patches
openbmc-patches at stwcx.xyz
Thu Nov 19 14:00:35 AEDT 2015
From: Ken <ken.sk.lai at mail.foxconn.com>
---
bin/Barreleye.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/bin/Barreleye.py b/bin/Barreleye.py
index 783aa88..0e92e83 100755
--- a/bin/Barreleye.py
+++ b/bin/Barreleye.py
@@ -6,6 +6,11 @@ FLASH_DOWNLOAD_PATH = "/tmp"
GPIO_BASE = 320
SYSTEM_NAME = "Barreleye"
+import sys
+import gobject
+import dbus
+import dbus.service
+import dbus.mainloop.glib
## System states
## state can change to next state in 2 ways:
@@ -423,6 +428,15 @@ GPIO_CONFIG['SLOT2_PRESENT'] = { 'gpio_pin': 'N5', 'direction': 'in' }
GPIO_CONFIG['MEZZ0_PRESENT'] = { 'gpio_pin': 'O0', 'direction': 'in' }
GPIO_CONFIG['MEZZ1_PRESENT'] = { 'gpio_pin': 'O1', 'direction': 'in' }
+
+bus = dbus.SystemBus()
+
+for i in range(1,6):
+ print i
+ obj = bus.get_object("org.openbmc,sensors,hwmon","/org/openbmc/sensors/speed/fan"+str(i))
+ intf = dbus.Interface (obj,"org.openbmc.SensorValue")
+ intf.setValue(dbus.UInt32(255))
+
def convertGpio(name):
name = name.upper()
c = name[0:1]
--
2.6.3
More information about the openbmc
mailing list