Control.FanPwm: use PDI constants

Use PDI constants instead of local definitions.

Tested: Unit Tests Pass

Change-Id: Iac724d87ddac326d825b843675f314decd6e0de4
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
index 8ba2a1b..a624cee 100644
--- a/dbus/dbusconfiguration.cpp
+++ b/dbus/dbusconfiguration.cpp
@@ -32,6 +32,7 @@
 #include <sdbusplus/exception.hpp>
 #include <sdbusplus/message.hpp>
 #include <sdbusplus/message/native_types.hpp>
+#include <xyz/openbmc_project/Control/FanPwm/client.hpp>
 #include <xyz/openbmc_project/ObjectMapper/common.hpp>
 #include <xyz/openbmc_project/Sensor/Value/client.hpp>
 
@@ -54,6 +55,7 @@
 
 using ObjectMapper = sdbusplus::common::xyz::openbmc_project::ObjectMapper;
 using SensorValue = sdbusplus::common::xyz::openbmc_project::sensor::Value;
+using ControlFanPwm = sdbusplus::common::xyz::openbmc_project::control::FanPwm;
 
 namespace pid_control
 {
@@ -68,8 +70,6 @@
     "xyz.openbmc_project.Configuration.Stepwise";
 constexpr const char* thermalControlIface =
     "xyz.openbmc_project.Control.ThermalMode";
-constexpr const char* defaultPwmInterface =
-    "xyz.openbmc_project.Control.FanPwm";
 
 using Association = std::tuple<std::string, std::string, std::string>;
 using Associations = std::vector<Association>;
@@ -459,7 +459,7 @@
         std::array<const char*, 6>{
             objectManagerInterface, pidConfigurationInterface,
             pidZoneConfigurationInterface, stepwiseConfigurationInterface,
-            SensorValue::interface, defaultPwmInterface});
+            SensorValue::interface, ControlFanPwm::interface});
     std::unordered_map<
         std::string, std::unordered_map<std::string, std::vector<std::string>>>
         respData;
@@ -501,7 +501,7 @@
                     owner.first = true;
                 }
                 if (interface == SensorValue::interface ||
-                    interface == defaultPwmInterface)
+                    interface == ControlFanPwm::interface)
                 {
                     // we're not interested in pwm sensors, just pwm control
                     if (interface == SensorValue::interface &&
@@ -927,11 +927,12 @@
                             pwmInterface =
                                 outputSensorInterfaces.at(idx).second;
                         }
-                        if (defaultPwmInterface != pwmInterface)
+                        if (ControlFanPwm::interface != pwmInterface)
                         {
                             throw std::runtime_error(std::format(
                                 "fan pwm control at dbus path [{}] has an interface [{}] that does not match the expected interface of {}",
-                                pwmPath, pwmInterface, defaultPwmInterface));
+                                pwmPath, pwmInterface,
+                                ControlFanPwm::interface));
                         }
                         const std::string& fanPath =
                             inputSensorInterfaces.at(idx).first;