Set Chassis capabilities
Now, front panel and NMI are supported, corresponding it's needed to
update its Chassis capabilities in its property.
Test:
it's test by IPMI command to get Chassis capabilities.
ipmitool raw 0x0 0x0
Change-Id: Ibe6ad1e10c5f5b9730bc011d69000cf293e77787
Signed-off-by: Chen Yugang <yugang.chen@linux.intel.com>
diff --git a/power-control-x86/src/power_control.cpp b/power-control-x86/src/power_control.cpp
index 5348a4b..661f7e9 100644
--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -2308,6 +2308,21 @@
power_control::idButtonIface->initialize();
}
+ // set Chassis CapabilitiesFlags Property with 0x06: front panel(0x2) and
+ // NMI out(0x4)
+ power_control::conn->async_method_call(
+ [](boost::system::error_code ec) {
+ if (ec)
+ {
+ std::cerr << "failed to set Chassis CapabilitiesFlags\n";
+ }
+ },
+ "xyz.openbmc_project.Settings",
+ "/xyz/openbmc_project/control/chassis_capabilities_config",
+ "org.freedesktop.DBus.Properties", "Set",
+ "xyz.openbmc_project.Control.ChassisCapabilities", "CapabilitiesFlags",
+ std::variant<uint8_t>(0x06));
+
// OS State Service
sdbusplus::asio::object_server osServer =
sdbusplus::asio::object_server(power_control::conn);