cfm: allow setting of max pwm
When a change from xyz.openbmc_project.Control.CFMLimit
interface is detected set the max pwm in pid control configs
to limit max fan speed.
This also puts the max CFM on d-bus for other commands to
use.
Tested-by: Used settingsd to control fan speed
Change-Id: Ic4ca37747690f6476cfa12bf3c19a44d7ee086c8
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/ExitAirTempSensor.hpp b/include/ExitAirTempSensor.hpp
index 24f87db..1e774cf 100644
--- a/include/ExitAirTempSensor.hpp
+++ b/include/ExitAirTempSensor.hpp
@@ -27,7 +27,9 @@
bool calculate(double&);
void updateReading(void);
+ void createMaxCFMIface(void);
void checkThresholds(void) override;
+ uint64_t getMaxRpm(uint64_t cfmMax);
private:
std::vector<sdbusplus::bus::match::match> matches;
@@ -35,6 +37,8 @@
boost::container::flat_map<std::string, std::pair<double, double>>
tachRanges;
std::shared_ptr<sdbusplus::asio::connection> dbusConnection;
+ std::shared_ptr<sdbusplus::asio::dbus_interface> pwmLimitIface;
+ std::shared_ptr<sdbusplus::asio::dbus_interface> cfmLimitIface;
sdbusplus::asio::object_server& objServer;
void addTachRanges(const std::string& serviceName, const std::string& path);
};