Add in support for power supply over-temperature

If a power supply encounters an over-temperature condition, the FAN
FAULT OR WARNING bit of the STATUS_WORD (low byte) command response
should be turned on. Ideally, when this is encountered, both power
supplies would be called out, as one condition that could lead to this
is due to the other supply putting out less current. Since each
monitoring application of the power supplies only knows its own
information, just the power supply indicating the condition will be
called out along with metadata containing potentially relevant command
response data.

Change-Id: I8f96828f85161050f73bb080392e1e8fef4a179b
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/elog-errors.hpp b/elog-errors.hpp
index 3f3e073..d0c5500 100644
--- a/elog-errors.hpp
+++ b/elog-errors.hpp
@@ -75,6 +75,26 @@
 {
 namespace openbmc_project
 {
+namespace Power
+{
+namespace Fault
+{
+namespace Error
+{
+    struct PowerSupplyTemperatureFault;
+} // namespace Error
+} // namespace Fault
+} // namespace Power
+} // namespace openbmc_project
+} // namespace xyz
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace xyz
+{
+namespace openbmc_project
+{
 namespace Common
 {
 namespace Callout
@@ -927,6 +947,54 @@
 {
 namespace Fault
 {
+namespace _PowerSupplyTemperatureFault
+{
+
+struct RAW_STATUS
+{
+    static constexpr auto str = "RAW_STATUS=%s";
+    static constexpr auto str_short = "RAW_STATUS";
+    using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
+    explicit constexpr RAW_STATUS(const char* a) : _entry(entry(str, a)) {};
+    type _entry;
+};
+
+}  // namespace _PowerSupplyTemperatureFault
+
+struct PowerSupplyTemperatureFault
+{
+    static constexpr auto L = level::ERR;
+    using RAW_STATUS = _PowerSupplyTemperatureFault::RAW_STATUS;
+    using CALLOUT_INVENTORY_PATH = xyz::openbmc_project::Common::Callout::Inventory::CALLOUT_INVENTORY_PATH;
+    using metadata_types = std::tuple<RAW_STATUS, CALLOUT_INVENTORY_PATH>;
+
+};
+
+} // namespace Fault
+} // namespace Power
+} // namespace openbmc_project
+} // namespace xyz
+
+
+namespace details
+{
+
+template <>
+struct map_exception_type<sdbusplus::xyz::openbmc_project::Power::Fault::Error::PowerSupplyTemperatureFault>
+{
+    using type = xyz::openbmc_project::Power::Fault::PowerSupplyTemperatureFault;
+};
+
+}
+
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Power
+{
+namespace Fault
+{
 namespace _Shutdown
 {