<html><body><p>The hard-coded 'PowerCap' hwmon sysfs file path is fixed in pull request: <a href="https://github.com/openbmc/skeleton/pull/50">https://github.com/openbmc/skeleton/pull/50</a><br><br>Please have a look.<br><br>Thanks,<br>-Yi<br><br><tt>"openbmc" <openbmc-bounces+shliyi=cn.ibm.com@lists.ozlabs.org> wrote on 05/10/2016 01:50:36 PM:<br><br>> From: OpenBMC Patches <openbmc-patches@stwcx.xyz></tt><br><tt>> To: openbmc@lists.ozlabs.org</tt><br><tt>> Cc: johnhcwang <hsienchiang@gmail.com></tt><br><tt>> Date: 05/10/2016 01:54 PM</tt><br><tt>> Subject: [PATCH skeleton v9 10/23] Modify the hard-coded hwmon ID for PowerCap</tt><br><tt>> Sent by: "openbmc" <openbmc-bounces+shliyi=cn.ibm.com@lists.ozlabs.org></tt><br><tt>> <br>> From: johnhcwang <hsienchiang@gmail.com><br>> <br>> After we enable I2C-6 lm75 outlet sensor in device stree, the hwmon ID<br>> of PowerCap won't be 3 anymore. So we have to modify it as real ID.<br>> ---<br>> bin/Sensors.py | 2 +-<br>> bin/sensor_manager2.py | 4 ++--<br>> 2 files changed, 3 insertions(+), 3 deletions(-)<br>> <br>> diff --git a/bin/Sensors.py b/bin/Sensors.py<br>> index f951eeb..1c6a961 100755<br>> --- a/bin/Sensors.py<br>> +++ b/bin/Sensors.py<br>> @@ -137,7 +137,7 @@ class PowerCap(VirtualSensor):<br>> def __init__(self, bus, name):<br>> VirtualSensor.__init__(self, bus, name)<br>> SensorValue.setValue(self, 0)<br>> - self.sysfs_attr = "/sys/class/hwmon/hwmon3/user_powercap"<br>> + self.sysfs_attr = "/sys/class/hwmon/hwmon4/user_powercap"<br>> ##override setValue method<br>> @dbus.service.method(SensorValue.IFACE_NAME,<br>> in_signature='v', out_signature='')<br>> diff --git a/bin/sensor_manager2.py b/bin/sensor_manager2.py<br>> index b5aac53..6aaef3e 100755<br>> --- a/bin/sensor_manager2.py<br>> +++ b/bin/sensor_manager2.py<br>> @@ -54,9 +54,9 @@ if __name__ == '__main__':<br>> <br>> obj_path = OBJ_PATH+"/host/PowerCap"<br>> sensor_obj = Sensors.PowerCap(bus,obj_path)<br>> - ## hwmon3 is default for master OCC on Barreleye.<br>> + ## hwmon4 is default for master OCC on Barreleye.<br>> ## should rewrite sensor_manager to remove hardcode<br>> - sensor_obj.sysfs_attr = "/sys/class/hwmon/hwmon3/user_powercap"<br>> + sensor_obj.sysfs_attr = "/sys/class/hwmon/hwmon4/user_powercap"<br>> root_sensor.add(obj_path,sensor_obj)<br>> <br>> obj_path = OBJ_PATH+"/host/BootProgress"<br>> -- <br>> 2.8.1<br>> <br>> <br>> _______________________________________________<br>> openbmc mailing list<br>> openbmc@lists.ozlabs.org<br>> <a href="https://lists.ozlabs.org/listinfo/openbmc">https://lists.ozlabs.org/listinfo/openbmc</a><br></tt><BR>
</body></html>