Add IPMI Sensor support for Power Supply Derating.
Change-Id: I099198a74fc84024eb24e84985df67f0738a0627
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/configs/Witherspoon.py b/configs/Witherspoon.py
index 40f82e2..8a306d6 100644
--- a/configs/Witherspoon.py
+++ b/configs/Witherspoon.py
@@ -294,6 +294,7 @@
0x04 : '<inventory_root>/system/chassis/motherboard/pcielink',
0xD8 : '/org/openbmc/sensors/host/PowerSupplyRedundancy',
0xda : '/org/openbmc/sensors/host/TurboAllowed',
+ 0xb4 : '/org/openbmc/sensors/host/PowerSupplyDerating',
},
'GPIO_PRESENT' : {}
}
@@ -493,9 +494,10 @@
0x02 : { 'class' : 'OperatingSystemStatusSensor' },
0x06 : { 'class' : 'PowerCap',
'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' },
- # Garrison value is used, need to get from P9 XML.
+ # Garrison value is used, Not in P9 XML yet.
0xD8 : { 'class' : 'PowerSupplyRedundancySensor'},
0xda : { 'class' : 'TurboAllowedSensor' },
+ 0xb4 : { 'class' : 'PowerSupplyDeratingSensor' },
}
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
diff --git a/pystatemgr/discover_system_state.py b/pystatemgr/discover_system_state.py
index b05af60..03eb84f 100644
--- a/pystatemgr/discover_system_state.py
+++ b/pystatemgr/discover_system_state.py
@@ -48,6 +48,11 @@
'object_name': '/org/openbmc/sensors/host/TurboAllowed',
'interface_name': 'org.openbmc.SensorValue'
},
+ 'powersupplyderating': {
+ 'bus_name': 'org.openbmc.Sensors',
+ 'object_name': '/org/openbmc/sensors/host/PowerSupplyDerating',
+ 'interface_name': 'org.openbmc.SensorValue'
+ },
}