blob: aec5367d1db1f5c7ad76835f559b74d14f1221b8 [file] [log] [blame]
George Liud6a1bae2022-06-20 13:47:31 +08001#include "button_handler.hpp"
Matt Spinler69f93512018-11-26 14:55:58 -06002
Delphine CC Chiu15c60e22024-04-12 13:01:32 -05003#include "config.hpp"
Matt Spinler1a309f72023-04-04 13:12:19 -05004#include "power_button_profile_factory.hpp"
5
George Liu9fb15972022-06-20 14:54:38 +08006#include <phosphor-logging/lg2.hpp>
Matt Spinler963c65f2018-11-26 14:46:41 -06007#include <xyz/openbmc_project/State/Chassis/server.hpp>
8#include <xyz/openbmc_project/State/Host/server.hpp>
Matt Spinlerfb35a322018-11-26 14:30:30 -06009namespace phosphor
10{
11namespace button
12{
Matt Spinler963c65f2018-11-26 14:46:41 -060013
14namespace sdbusRule = sdbusplus::bus::match::rules;
15using namespace sdbusplus::xyz::openbmc_project::State::server;
Matt Spinler963c65f2018-11-26 14:46:41 -060016
Matt Spinler963c65f2018-11-26 14:46:41 -060017constexpr auto chassisIface = "xyz.openbmc_project.State.Chassis";
18constexpr auto hostIface = "xyz.openbmc_project.State.Host";
19constexpr auto powerButtonIface = "xyz.openbmc_project.Chassis.Buttons.Power";
Matt Spinler69f93512018-11-26 14:55:58 -060020constexpr auto idButtonIface = "xyz.openbmc_project.Chassis.Buttons.ID";
Matt Spinler06a5bdd2018-11-26 14:50:48 -060021constexpr auto resetButtonIface = "xyz.openbmc_project.Chassis.Buttons.Reset";
Matt Spinler69f93512018-11-26 14:55:58 -060022constexpr auto ledGroupIface = "xyz.openbmc_project.Led.Group";
Naveen Moses3bd1cfc2022-02-14 18:04:20 +053023constexpr auto ledGroupBasePath = "/xyz/openbmc_project/led/groups/";
24constexpr auto hostSelectorIface =
25 "xyz.openbmc_project.Chassis.Buttons.HostSelector";
26constexpr auto debugHostSelectorIface =
Naveen Mosesa6d4e652022-04-13 19:27:25 +053027 "xyz.openbmc_project.Chassis.Buttons.Button";
Naveen Moses3bd1cfc2022-02-14 18:04:20 +053028
29constexpr auto propertyIface = "org.freedesktop.DBus.Properties";
30constexpr auto mapperIface = "xyz.openbmc_project.ObjectMapper";
Matt Spinler963c65f2018-11-26 14:46:41 -060031
32constexpr auto mapperObjPath = "/xyz/openbmc_project/object_mapper";
33constexpr auto mapperService = "xyz.openbmc_project.ObjectMapper";
Naveen Moses3bd1cfc2022-02-14 18:04:20 +053034constexpr auto BMC_POSITION = 0;
Matt Spinler963c65f2018-11-26 14:46:41 -060035
Patrick Williams9a529a62022-07-22 19:26:54 -050036Handler::Handler(sdbusplus::bus_t& bus) : bus(bus)
Matt Spinlerfb35a322018-11-26 14:30:30 -060037{
Matt Spinler963c65f2018-11-26 14:46:41 -060038 try
39 {
40 if (!getService(POWER_DBUS_OBJECT_NAME, powerButtonIface).empty())
41 {
George Liu9fb15972022-06-20 14:54:38 +080042 lg2::info("Starting power button handler");
Matt Spinler1a309f72023-04-04 13:12:19 -050043
44 // Check for a custom handler
45 powerButtonProfile =
46 PowerButtonProfileFactory::instance().createProfile(bus);
47
48 if (!powerButtonProfile)
49 {
50 powerButtonReleased = std::make_unique<sdbusplus::bus::match_t>(
51 bus,
52 sdbusRule::type::signal() + sdbusRule::member("Released") +
53 sdbusRule::path(POWER_DBUS_OBJECT_NAME) +
54 sdbusRule::interface(powerButtonIface),
55 std::bind(std::mem_fn(&Handler::powerReleased), this,
56 std::placeholders::_1));
57 }
Matt Spinler963c65f2018-11-26 14:46:41 -060058 }
59 }
Patrick Williams9a529a62022-07-22 19:26:54 -050060 catch (const sdbusplus::exception_t& e)
Matt Spinler963c65f2018-11-26 14:46:41 -060061 {
62 // The button wasn't implemented
63 }
Matt Spinler06a5bdd2018-11-26 14:50:48 -060064
65 try
66 {
Matt Spinler69f93512018-11-26 14:55:58 -060067 if (!getService(ID_DBUS_OBJECT_NAME, idButtonIface).empty())
68 {
George Liu9fb15972022-06-20 14:54:38 +080069 lg2::info("Registering ID button handler");
Matt Spinler69f93512018-11-26 14:55:58 -060070 idButtonReleased = std::make_unique<sdbusplus::bus::match_t>(
71 bus,
72 sdbusRule::type::signal() + sdbusRule::member("Released") +
73 sdbusRule::path(ID_DBUS_OBJECT_NAME) +
74 sdbusRule::interface(idButtonIface),
Naveen Mosesab8dac52022-07-15 19:32:27 +053075 std::bind(std::mem_fn(&Handler::idReleased), this,
Matt Spinler69f93512018-11-26 14:55:58 -060076 std::placeholders::_1));
77 }
78 }
Patrick Williams9a529a62022-07-22 19:26:54 -050079 catch (const sdbusplus::exception_t& e)
Matt Spinler69f93512018-11-26 14:55:58 -060080 {
81 // The button wasn't implemented
82 }
83
84 try
85 {
Matt Spinler06a5bdd2018-11-26 14:50:48 -060086 if (!getService(RESET_DBUS_OBJECT_NAME, resetButtonIface).empty())
87 {
George Liu9fb15972022-06-20 14:54:38 +080088 lg2::info("Registering reset button handler");
Matt Spinler06a5bdd2018-11-26 14:50:48 -060089 resetButtonReleased = std::make_unique<sdbusplus::bus::match_t>(
90 bus,
91 sdbusRule::type::signal() + sdbusRule::member("Released") +
92 sdbusRule::path(RESET_DBUS_OBJECT_NAME) +
93 sdbusRule::interface(resetButtonIface),
Naveen Mosesab8dac52022-07-15 19:32:27 +053094 std::bind(std::mem_fn(&Handler::resetReleased), this,
Matt Spinler06a5bdd2018-11-26 14:50:48 -060095 std::placeholders::_1));
96 }
97 }
Patrick Williams9a529a62022-07-22 19:26:54 -050098 catch (const sdbusplus::exception_t& e)
Matt Spinler06a5bdd2018-11-26 14:50:48 -060099 {
100 // The button wasn't implemented
101 }
Naveen Mosesa6d4e652022-04-13 19:27:25 +0530102 try
103 {
104 if (!getService(DBG_HS_DBUS_OBJECT_NAME, debugHostSelectorIface)
105 .empty())
106 {
107 lg2::info("Registering debug host selector button handler");
108 debugHSButtonReleased = std::make_unique<sdbusplus::bus::match_t>(
109 bus,
110 sdbusRule::type::signal() + sdbusRule::member("Released") +
111 sdbusRule::path(DBG_HS_DBUS_OBJECT_NAME) +
112 sdbusRule::interface(debugHostSelectorIface),
113 std::bind(std::mem_fn(&Handler::debugHostSelectorReleased),
114 this, std::placeholders::_1));
115 }
116 }
Patrick Williamse3b4e112022-11-26 09:41:58 -0600117 catch (const sdbusplus::exception_t& e)
Naveen Mosesa6d4e652022-04-13 19:27:25 +0530118 {
119 // The button wasn't implemented
120 }
Matt Spinler963c65f2018-11-26 14:46:41 -0600121}
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530122bool Handler::isMultiHost()
123{
124 // return true in case host selector object is available
125 return (!getService(HS_DBUS_OBJECT_NAME, hostSelectorIface).empty());
126}
Matt Spinler963c65f2018-11-26 14:46:41 -0600127std::string Handler::getService(const std::string& path,
128 const std::string& interface) const
129{
130 auto method = bus.new_method_call(mapperService, mapperObjPath, mapperIface,
131 "GetObject");
132 method.append(path, std::vector{interface});
Thang Q. Nguyen42507852022-08-12 09:11:35 +0700133 try
134 {
135 auto result = bus.call(method);
136 std::map<std::string, std::vector<std::string>> objectData;
137 result.read(objectData);
138 return objectData.begin()->first;
139 }
Patrick Williamse3b4e112022-11-26 09:41:58 -0600140 catch (const sdbusplus::exception_t& e)
Thang Q. Nguyen42507852022-08-12 09:11:35 +0700141 {
142 return std::string();
143 }
Matt Spinler963c65f2018-11-26 14:46:41 -0600144}
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530145size_t Handler::getHostSelectorValue()
Matt Spinler963c65f2018-11-26 14:46:41 -0600146{
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530147 auto HSService = getService(HS_DBUS_OBJECT_NAME, hostSelectorIface);
148
149 if (HSService.empty())
150 {
Naveen Mosesa6d4e652022-04-13 19:27:25 +0530151 lg2::info("Host selector dbus object not available");
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530152 throw std::invalid_argument("Host selector dbus object not available");
153 }
154
155 try
156 {
157 auto method = bus.new_method_call(
158 HSService.c_str(), HS_DBUS_OBJECT_NAME, propertyIface, "Get");
159 method.append(hostSelectorIface, "Position");
160 auto result = bus.call(method);
161
162 std::variant<size_t> HSPositionVariant;
163 result.read(HSPositionVariant);
164
165 auto position = std::get<size_t>(HSPositionVariant);
166 return position;
167 }
Patrick Williams9a529a62022-07-22 19:26:54 -0500168 catch (const sdbusplus::exception_t& e)
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530169 {
Naveen Mosesa6d4e652022-04-13 19:27:25 +0530170 lg2::error("Error reading host selector position: {ERROR}", "ERROR", e);
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530171 throw;
172 }
173}
174bool Handler::poweredOn(size_t hostNumber) const
175{
Potin Laic0fee462022-12-23 14:19:23 +0800176 auto hostObjectName = HOST_STATE_OBJECT_NAME + std::to_string(hostNumber);
177 auto service = getService(hostObjectName.c_str(), hostIface);
178 auto method = bus.new_method_call(service.c_str(), hostObjectName.c_str(),
179 propertyIface, "Get");
180 method.append(hostIface, "CurrentHostState");
Matt Spinler963c65f2018-11-26 14:46:41 -0600181 auto result = bus.call(method);
182
Patrick Williams5ed4cc02020-05-13 17:52:15 -0500183 std::variant<std::string> state;
Matt Spinler963c65f2018-11-26 14:46:41 -0600184 result.read(state);
185
Potin Laic0fee462022-12-23 14:19:23 +0800186 return Host::HostState::Off !=
187 Host::convertHostStateFromString(std::get<std::string>(state));
Matt Spinler963c65f2018-11-26 14:46:41 -0600188}
189
DelphineCCChiu395c7642023-04-19 10:46:47 +0800190void Handler::handlePowerEvent(PowerEvent powerEventType,
191 std::chrono::microseconds duration)
Matt Spinler963c65f2018-11-26 14:46:41 -0600192{
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530193 std::string objPathName;
194 std::string dbusIfaceName;
195 std::string transitionName;
196 std::variant<Host::Transition, Chassis::Transition> transition;
Matt Spinler963c65f2018-11-26 14:46:41 -0600197
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530198 size_t hostNumber = 0;
199 auto isMultiHostSystem = isMultiHost();
200 if (isMultiHostSystem)
Matt Spinler963c65f2018-11-26 14:46:41 -0600201 {
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530202 hostNumber = getHostSelectorValue();
Naveen Mosesa6d4e652022-04-13 19:27:25 +0530203 lg2::info("Multi-host system detected : {POSITION}", "POSITION",
George Liu9fb15972022-06-20 14:54:38 +0800204 hostNumber);
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530205 }
206
207 std::string hostNumStr = std::to_string(hostNumber);
208
209 // ignore power and reset button events if BMC is selected.
210 if (isMultiHostSystem && (hostNumber == BMC_POSITION) &&
DelphineCCChiu395c7642023-04-19 10:46:47 +0800211 (powerEventType != PowerEvent::powerReleased) &&
Patrick Williams971312a2024-04-12 13:45:50 -0500212 (duration <= LONG_PRESS_TIME_MS))
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530213 {
George Liu9fb15972022-06-20 14:54:38 +0800214 lg2::info(
Naveen Mosesa6d4e652022-04-13 19:27:25 +0530215 "handlePowerEvent : BMC selected on multi-host system. ignoring power and reset button events...");
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530216 return;
217 }
218
219 switch (powerEventType)
220 {
Naveen Mosesab8dac52022-07-15 19:32:27 +0530221 case PowerEvent::powerReleased:
George Liu5b98f4d2022-06-20 13:31:14 +0800222 {
Patrick Williams971312a2024-04-12 13:45:50 -0500223 if (duration <= LONG_PRESS_TIME_MS)
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530224 {
DelphineCCChiu395c7642023-04-19 10:46:47 +0800225 objPathName = HOST_STATE_OBJECT_NAME + hostNumStr;
226 dbusIfaceName = hostIface;
227 transitionName = "RequestedHostTransition";
228
229 transition = Host::Transition::On;
230
231 if (poweredOn(hostNumber))
232 {
233 transition = Host::Transition::Off;
234 }
235 lg2::info("handlePowerEvent : Handle power button press ");
236
237 break;
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530238 }
DelphineCCChiu395c7642023-04-19 10:46:47 +0800239 else
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530240 {
DelphineCCChiu395c7642023-04-19 10:46:47 +0800241 dbusIfaceName = chassisIface;
242 transitionName = "RequestedPowerTransition";
243 objPathName = CHASSIS_STATE_OBJECT_NAME + hostNumStr;
244 transition = Chassis::Transition::Off;
245
246 /* multi host system :
247 hosts (1 to N) - host shutdown
248 bmc (0) - sled cycle
249 single host system :
250 host(0) - host shutdown
251 */
252 if (isMultiHostSystem && (hostNumber == BMC_POSITION))
253 {
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530254#if CHASSIS_SYSTEM_RESET_ENABLED
DelphineCCChiu395c7642023-04-19 10:46:47 +0800255 objPathName = CHASSISSYSTEM_STATE_OBJECT_NAME + hostNumStr;
256 transition = Chassis::Transition::PowerCycle;
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530257#else
DelphineCCChiu395c7642023-04-19 10:46:47 +0800258 return;
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530259#endif
DelphineCCChiu395c7642023-04-19 10:46:47 +0800260 }
261 else if (!poweredOn(hostNumber))
262 {
263 lg2::info(
264 "Power is off so ignoring long power button press");
265 return;
266 }
267 lg2::info("handlePowerEvent : handle long power button press");
268 break;
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530269 }
Matt Spinler963c65f2018-11-26 14:46:41 -0600270 }
Naveen Mosesab8dac52022-07-15 19:32:27 +0530271 case PowerEvent::resetReleased:
George Liu5b98f4d2022-06-20 13:31:14 +0800272 {
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530273 objPathName = HOST_STATE_OBJECT_NAME + hostNumStr;
274 dbusIfaceName = hostIface;
275 transitionName = "RequestedHostTransition";
Matt Spinler963c65f2018-11-26 14:46:41 -0600276
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530277 if (!poweredOn(hostNumber))
278 {
George Liu9fb15972022-06-20 14:54:38 +0800279 lg2::info("Power is off so ignoring reset button press");
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530280 return;
281 }
Matt Spinler963c65f2018-11-26 14:46:41 -0600282
George Liu9fb15972022-06-20 14:54:38 +0800283 lg2::info("Handling reset button press");
HuyLe9456ffc2023-06-22 15:21:22 +0700284#ifdef ENABLE_RESET_BUTTON_DO_WARM_REBOOT
285 transition = Host::Transition::ForceWarmReboot;
286#else
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530287 transition = Host::Transition::Reboot;
HuyLe9456ffc2023-06-22 15:21:22 +0700288#endif
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530289 break;
290 }
George Liu5b98f4d2022-06-20 13:31:14 +0800291 default:
292 {
George Liu9fb15972022-06-20 14:54:38 +0800293 lg2::error("{EVENT} is invalid power event. skipping...", "EVENT",
Patrick Williams36106082024-02-26 10:26:43 -0600294 powerEventType);
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530295
296 return;
297 }
298 }
299 auto service = getService(objPathName.c_str(), dbusIfaceName);
300 auto method = bus.new_method_call(service.c_str(), objPathName.c_str(),
301 propertyIface, "Set");
302 method.append(dbusIfaceName, transitionName, transition);
303 bus.call(method);
304}
DelphineCCChiu395c7642023-04-19 10:46:47 +0800305void Handler::powerReleased(sdbusplus::message_t& msg)
Naveen Moses3bd1cfc2022-02-14 18:04:20 +0530306{
307 try
308 {
DelphineCCChiu395c7642023-04-19 10:46:47 +0800309 uint64_t time;
310 msg.read(time);
311
312 handlePowerEvent(PowerEvent::powerReleased,
313 std::chrono::microseconds(time));
Matt Spinler963c65f2018-11-26 14:46:41 -0600314 }
Patrick Williams9a529a62022-07-22 19:26:54 -0500315 catch (const sdbusplus::exception_t& e)
Matt Spinler963c65f2018-11-26 14:46:41 -0600316 {
George Liu9fb15972022-06-20 14:54:38 +0800317 lg2::error("Failed power state change on a power button press: {ERROR}",
318 "ERROR", e);
Matt Spinler963c65f2018-11-26 14:46:41 -0600319 }
320}
Matt Spinler06a5bdd2018-11-26 14:50:48 -0600321
Patrick Williams9a529a62022-07-22 19:26:54 -0500322void Handler::resetReleased(sdbusplus::message_t& /* msg */)
Matt Spinler06a5bdd2018-11-26 14:50:48 -0600323{
324 try
325 {
DelphineCCChiu395c7642023-04-19 10:46:47 +0800326 // No need to calculate duration, set to 0.
327 handlePowerEvent(PowerEvent::resetReleased,
328 std::chrono::microseconds(0));
Matt Spinler06a5bdd2018-11-26 14:50:48 -0600329 }
Patrick Williams9a529a62022-07-22 19:26:54 -0500330 catch (const sdbusplus::exception_t& e)
Matt Spinler06a5bdd2018-11-26 14:50:48 -0600331 {
George Liu9fb15972022-06-20 14:54:38 +0800332 lg2::error("Failed power state change on a reset button press: {ERROR}",
333 "ERROR", e);
Matt Spinler06a5bdd2018-11-26 14:50:48 -0600334 }
335}
Matt Spinler69f93512018-11-26 14:55:58 -0600336
Patrick Williams9a529a62022-07-22 19:26:54 -0500337void Handler::idReleased(sdbusplus::message_t& /* msg */)
Matt Spinler69f93512018-11-26 14:55:58 -0600338{
339 std::string groupPath{ledGroupBasePath};
340 groupPath += ID_LED_GROUP;
341
342 auto service = getService(groupPath, ledGroupIface);
343
344 if (service.empty())
345 {
George Liu9fb15972022-06-20 14:54:38 +0800346 lg2::info("No found {GROUP} during ID button press:", "GROUP",
347 groupPath);
Matt Spinler69f93512018-11-26 14:55:58 -0600348 return;
349 }
350
351 try
352 {
353 auto method = bus.new_method_call(service.c_str(), groupPath.c_str(),
354 propertyIface, "Get");
355 method.append(ledGroupIface, "Asserted");
356 auto result = bus.call(method);
357
Patrick Williams5ed4cc02020-05-13 17:52:15 -0500358 std::variant<bool> state;
Matt Spinler69f93512018-11-26 14:55:58 -0600359 result.read(state);
360
Patrick Williams51f5e8b2020-05-13 11:33:44 -0500361 state = !std::get<bool>(state);
Matt Spinler69f93512018-11-26 14:55:58 -0600362
George Liu9fb15972022-06-20 14:54:38 +0800363 lg2::info(
364 "Changing ID LED group state on ID LED press, GROUP = {GROUP}, STATE = {STATE}",
365 "GROUP", groupPath, "STATE", std::get<bool>(state));
Matt Spinler69f93512018-11-26 14:55:58 -0600366
367 method = bus.new_method_call(service.c_str(), groupPath.c_str(),
368 propertyIface, "Set");
369
370 method.append(ledGroupIface, "Asserted", state);
371 result = bus.call(method);
372 }
Patrick Williams9a529a62022-07-22 19:26:54 -0500373 catch (const sdbusplus::exception_t& e)
Matt Spinler69f93512018-11-26 14:55:58 -0600374 {
George Liu9fb15972022-06-20 14:54:38 +0800375 lg2::error("Error toggling ID LED group on ID button press: {ERROR}",
376 "ERROR", e);
Matt Spinler69f93512018-11-26 14:55:58 -0600377 }
378}
Naveen Mosesa6d4e652022-04-13 19:27:25 +0530379
380void Handler::increaseHostSelectorPosition()
381{
382 try
383 {
384 auto HSService = getService(HS_DBUS_OBJECT_NAME, hostSelectorIface);
385
386 if (HSService.empty())
387 {
388 lg2::error("Host selector service not available");
389 return;
390 }
391
392 auto method =
393 bus.new_method_call(HSService.c_str(), HS_DBUS_OBJECT_NAME,
394 phosphor::button::propertyIface, "GetAll");
395 method.append(phosphor::button::hostSelectorIface);
396 auto result = bus.call(method);
397 std::unordered_map<std::string, std::variant<size_t>> properties;
398 result.read(properties);
399
400 auto maxPosition = std::get<size_t>(properties.at("MaxPosition"));
401 auto position = std::get<size_t>(properties.at("Position"));
402
403 std::variant<size_t> HSPositionVariant =
404 (position < maxPosition) ? (position + 1) : 0;
405
406 method = bus.new_method_call(HSService.c_str(), HS_DBUS_OBJECT_NAME,
407 phosphor::button::propertyIface, "Set");
408 method.append(phosphor::button::hostSelectorIface, "Position");
409
410 method.append(HSPositionVariant);
411 result = bus.call(method);
412 }
Patrick Williamse3b4e112022-11-26 09:41:58 -0600413 catch (const sdbusplus::exception_t& e)
Naveen Mosesa6d4e652022-04-13 19:27:25 +0530414 {
415 lg2::error("Error modifying host selector position : {ERROR}", "ERROR",
416 e);
417 }
418}
419
Patrick Williamse3b4e112022-11-26 09:41:58 -0600420void Handler::debugHostSelectorReleased(sdbusplus::message_t& /* msg */)
Naveen Mosesa6d4e652022-04-13 19:27:25 +0530421{
422 try
423 {
424 increaseHostSelectorPosition();
425 }
Patrick Williamse3b4e112022-11-26 09:41:58 -0600426 catch (const sdbusplus::exception_t& e)
Naveen Mosesa6d4e652022-04-13 19:27:25 +0530427 {
428 lg2::error(
429 "Failed power process debug host selector button press : {ERROR}",
430 "ERROR", e);
431 }
432}
433
Matt Spinlerfb35a322018-11-26 14:30:30 -0600434} // namespace button
435} // namespace phosphor