summaryrefslogtreecommitdiffstats
path: root/hwmon.hpp
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2018-05-19 06:06:03 -0500
committerRaptor Engineering Development Team <support@raptorengineering.com>2019-04-19 13:22:37 +0000
commit54b8ebd8bc9fbf408f438a69c08a10888cb2c0ea (patch)
tree8500e2d7b470449593220ec4b8feb8792d301cef /hwmon.hpp
parentb161dc276dd4d2b5f036efbd1f93f071093b255c (diff)
downloadphosphor-hwmon-54b8ebd8bc9fbf408f438a69c08a10888cb2c0ea.tar.gz
phosphor-hwmon-54b8ebd8bc9fbf408f438a69c08a10888cb2c0ea.zip
Add frequency capability to hwmon publisher
Diffstat (limited to 'hwmon.hpp')
-rw-r--r--hwmon.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/hwmon.hpp b/hwmon.hpp
index 6f85f5c..7e00528 100644
--- a/hwmon.hpp
+++ b/hwmon.hpp
@@ -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)
OpenPOWER on IntegriCloud