Support multi power buttons with multi behaviors
For supporting more-than-one power buttons behaviors,
add new matches and instances by following json config.
This change is for multiple slots integrated on one chassis,
and each slot has button to control power status.
For example:
/xyz/openbmc_project/Chassis/Buttons/Power01 for button on slot1
/xyz/openbmc_project/Chassis/Buttons/Power02 for button on slot2
Moreover, support multi-level power control by json config,
chassis now can do action by corresponding pressing duration.
Tested:
Press buttons and check corresponding behaviors.
Change-Id: I7789f0367d5e846dd9e68f966ba0755fc916217a
Signed-off-by: Rush Chen <rush.chen.wiwynn@gmail.com>
diff --git a/src/serial_uart_mux.cpp b/src/serial_uart_mux.cpp
index c36e82a..efae3f4 100644
--- a/src/serial_uart_mux.cpp
+++ b/src/serial_uart_mux.cpp
@@ -13,7 +13,7 @@
using HostSelectorClientObj =
sdbusplus::common::xyz::openbmc_project::chassis::buttons::HostSelector;
-constexpr std::string_view SERIAL_UART_RX_GPIO = "serial_uart_rx";
+static constexpr auto SERIAL_UART_RX_GPIO = "serial_uart_rx";
void SerialUartMux::init()
{
try