From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 914661A026D for ; Fri, 20 Nov 2015 12:00:53 +1100 (AEDT) Received: from localhost (172.110.7.206 [172.110.7.206]) by mx.zohomail.com with SMTPS id 1447981237502234.63111067548402; Thu, 19 Nov 2015 17:00:37 -0800 (PST) From: OpenBMC Patches To: openbmc@lists.ozlabs.org Cc: Ken Subject: [PATCH skeleton v3 05/19] Force fan duty to 100% Date: Thu, 19 Nov 2015 20:00:19 -0500 Message-Id: <1447981233-5573-6-git-send-email-openbmc-patches@stwcx.xyz> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1447981233-5573-1-git-send-email-openbmc-patches@stwcx.xyz> References: <1447981233-5573-1-git-send-email-openbmc-patches@stwcx.xyz> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2015 01:00:54 -0000 From: Ken --- 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