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