diff options
author | Raptor Engineering Development Team <support@raptorengineering.com> | 2018-05-19 06:06:03 -0500 |
---|---|---|
committer | Raptor Engineering Development Team <support@raptorengineering.com> | 2019-04-19 13:22:37 +0000 |
commit | 54b8ebd8bc9fbf408f438a69c08a10888cb2c0ea (patch) | |
tree | 8500e2d7b470449593220ec4b8feb8792d301cef /hwmon.hpp | |
parent | b161dc276dd4d2b5f036efbd1f93f071093b255c (diff) | |
download | phosphor-hwmon-54b8ebd8bc9fbf408f438a69c08a10888cb2c0ea.tar.gz phosphor-hwmon-54b8ebd8bc9fbf408f438a69c08a10888cb2c0ea.zip |
Add frequency capability to hwmon publisher
Diffstat (limited to 'hwmon.hpp')
-rw-r--r-- | hwmon.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -33,6 +33,7 @@ static constexpr auto ccurr = "curr"; static constexpr auto cenergy = "energy"; static constexpr auto cpower = "power"; static constexpr auto cpwm = "pwm"; +static constexpr auto cfreq = "freq"; static const std::string fan = cfan; static const std::string temp = ctemp; @@ -41,6 +42,7 @@ static const std::string curr = ccurr; static const std::string energy = cenergy; static const std::string power = cpower; static const std::string pwm = cpwm; +static const std::string freq = cfreq; } // namespace type static constexpr auto typeAttrMap = { @@ -60,6 +62,8 @@ static constexpr auto typeAttrMap = { "energy"), std::make_tuple(hwmon::type::cpower, ValueInterface::Unit::Watts, -6, "power"), + std::make_tuple(hwmon::type::cfreq, ValueInterface::Unit::MHz, 0, + "frequency"), }; inline auto getHwmonType(decltype(typeAttrMap)::const_reference attrs) |