pldm: Add support for OCC state changes
When the state of the OCC changes, host sends stateSensorEvent to
indicate going active or not active which is send as a D-Bus signal
by PLDM daemon. openpower-occ-control app listens for this signal
and updates the OCC D-Bus object. The lowest entity instance number
in the PDRs corresponds to first instance of the OCC.
Tested:
1) On a simics session verified that the sensor event is handled for
OCC going active and OCCActive property is set to true.
2) A sensorEvent is generated for OCC going non active and verified
OCCActive property is set to false.
3) Powered off the host and OCCActive property is set to false.
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: I0469cc483184b66acabc5f0cea1613a7768b3393
diff --git a/configure.ac b/configure.ac
index 6a3f3b0..0137b6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,19 @@
]
AC_SUBST([CPPFLAGS], [$cpp_flags])
)
+
+ AC_ARG_WITH([host-communication-protocol],
+ AS_HELP_STRING([--with-host-communication-protocol], [To specify the host communication protocol])
+ )
+ AM_CONDITIONAL([ENABLE_PLDM], [test "$with_host_communication_protocol" == "pldm"])
+ AS_IF([test "x$with_host_communication_protocol" == "xpldm"],
+ AC_MSG_NOTICE([Enabling PLDM])
+ [
+ cpp_flags="$CPPFLAGS -DPLDM"
+ AX_PKG_CHECK_MODULES([LIBPLDM], [libpldm])
+ ]
+ AC_SUBST([CPPFLAGS], [$cpp_flags])
+ )
])
AC_ARG_VAR(OCC_CONTROL_BUSNAME, [The Dbus busname to own])