add support for hpe's gxpfan type

Adds basic support for handling HPE's GXPFan sensors

Tested: confirmed that HPE's GXP fans appear in webUI
with this change + appropriate entity-manager config entries

Change-Id: I0e2e3936575881972f536c80ffc2648a2b2a75e6
Signed-off-by: Chris Sides <christopher.sides@hpe.com>
diff --git a/src/FanMain.cpp b/src/FanMain.cpp
index f888e17..32022c1 100644
--- a/src/FanMain.cpp
+++ b/src/FanMain.cpp
@@ -41,14 +41,15 @@
 namespace fs = std::filesystem;
 
 // The following two structures need to be consistent
-static auto sensorTypes{
-    std::to_array<const char*>({"AspeedFan", "I2CFan", "NuvotonFan"})};
+static auto sensorTypes{std::to_array<const char*>(
+    {"AspeedFan", "I2CFan", "NuvotonFan", "HPEFan"})};
 
 enum FanTypes
 {
     aspeed = 0,
     i2c,
     nuvoton,
+    hpe,
     max,
 };
 
@@ -65,7 +66,8 @@
 static const std::map<std::string, FanTypes> compatibleFanTypes = {
     {"aspeed,ast2400-pwm-tacho", FanTypes::aspeed},
     {"aspeed,ast2500-pwm-tacho", FanTypes::aspeed},
-    {"nuvoton,npcm750-pwm-fan", FanTypes::nuvoton}
+    {"nuvoton,npcm750-pwm-fan", FanTypes::nuvoton},
+    {"hpe,gxp-fan-ctrl", FanTypes::hpe}
     // add compatible string here for new fan type
 };
 
@@ -317,9 +319,10 @@
                 {
                     continue;
                 }
-                if (fanType == FanTypes::aspeed || fanType == FanTypes::nuvoton)
+                if (fanType == FanTypes::aspeed ||
+                    fanType == FanTypes::nuvoton || fanType == FanTypes::hpe)
                 {
-                    // there will be only 1 aspeed or nuvoton
+                    // there will be only 1 aspeed or nuvoton or hpe sensor
                     // object in sysfs, we found the fan
                     sensorData = &cfgData;
                     break;