zone: Add debug thermal/power interface
- Add xyz.openbmc_project.Debug.Pid.ThermalPower interface to
fanctrl/zoneX/pid dbus to record some datas in thermal/power
PID loop.
Tested:
```
busctl introspect xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0/CPU0_PID xyz.openbmc_project.Debug.Pid.ThermalPower
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
.ClassType property s "Temperature" emits-change
.Input property d 36.594 emits-change
.Leader property s "Die_CPU0" emits-change
.Output property d 4200 emits-change
.Setpoint property d 70 emits-change
```
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: I6846c3878c2ca5eaeeb6eaf48aaf0f604a2beccf
diff --git a/pid/builder.cpp b/pid/builder.cpp
index 830c2fb..8525073 100644
--- a/pid/builder.cpp
+++ b/pid/builder.cpp
@@ -115,9 +115,9 @@
getThermalType(info.type));
zone->addThermalPID(std::move(pid));
- zone->addPidControlProcess(name, modeControlBus,
- getPidControlPath(zoneId, name),
- deferSignals);
+ zone->addPidControlProcess(
+ name, info.type, info.setpoint, modeControlBus,
+ getPidControlPath(zoneId, name), deferSignals);
zone->addPidFailSafePercent(name, info.failSafePercent);
}
else if (info.type == "stepwise")
@@ -130,9 +130,9 @@
auto stepwise = StepwiseController::createStepwiseController(
zone.get(), name, inputs, info.stepwiseInfo);
zone->addThermalPID(std::move(stepwise));
- zone->addPidControlProcess(name, modeControlBus,
- getPidControlPath(zoneId, name),
- deferSignals);
+ zone->addPidControlProcess(
+ name, info.type, info.setpoint, modeControlBus,
+ getPidControlPath(zoneId, name), deferSignals);
zone->addPidFailSafePercent(name, info.failSafePercent);
}