Skip to content

Commit

Permalink
[shutdownfeedback] Added vibra feedback to shutdown
Browse files Browse the repository at this point in the history
Signed-off-by: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
  • Loading branch information
Pekka Lundstrom committed Mar 11, 2014
1 parent ef6157b commit 9f64658
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
16 changes: 16 additions & 0 deletions configure.ac
Expand Up @@ -156,6 +156,19 @@ AS_IF([test "x$enable_bootreason_logger" != xno],
[AC_DEFINE([DSME_BOOTREASON_LOGGER], [1])])
AM_CONDITIONAL([WANT_BOOTREASON_LOGGER], [test x$enable_bootreason_logger != xno])

#
# Shutdown feedback
#
AC_ARG_ENABLE([shutdown-feedback],
[AS_HELP_STRING([--disable-shutdown-feedback],
[disable bootreason logger (libshutdownfeedback)])],
[],
[enable_shutdown_feedback=yes])

AS_IF([test "x$enable_shutdown_feedback" != xno],
[AC_DEFINE([DSME_SHUTDOWN_FEEDBACK], [1])])
AM_CONDITIONAL([WANT_SHUTDOWN_FEEDBACK], [test x$enable_shutdown_feedback != xno])

#
# Compiler and linker flags
#
Expand Down Expand Up @@ -198,6 +211,9 @@ AM_PROG_CC_C_O()
PKG_CHECK_MODULES(GLIB, glib-2.0)
PKG_CHECK_MODULES(DBUS, dbus-1)
PKG_CHECK_MODULES(DBUSGLIB, dbus-glib-1)
if test "x$enable_shutdown_feedback" != xno; then
PKG_CHECK_MODULES(LIBNGF, libngf0)
fi

# Check libs (that are not yet checked)
# Whitespaces in 'action-if-found' fields in order to not (auto)update LIBS variable
Expand Down
10 changes: 10 additions & 0 deletions modules/Makefile.am
Expand Up @@ -75,6 +75,10 @@ if WANT_BOOTREASON_LOGGER
pkglib_LTLIBRARIES += bootreasonlogger.la
endif

if WANT_SHUTDOWN_FEEDBACK
pkglib_LTLIBRARIES += shutdownfeedback.la
endif

startup_la_SOURCES = startup.c

# TODO: remove this
Expand Down Expand Up @@ -199,3 +203,9 @@ bootreasonlogger_la_SOURCES = bootreasonlogger.c
bootreasonlogger_la_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) $(DBUS_CFLAGS) -D_GNU_SOURCE
bootreasonlogger_la_LIBADD = $(GLIB_LIBS)
endif

if WANT_SHUTDOWN_FEEDBACK
shutdownfeedback_la_SOURCES = shutdownfeedback.c
shutdownfeedback_la_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) $(DBUS_CFLAGS) $(LIBNGF_CFLAGS) -D_GNU_SOURCE
shutdownfeedback_la_LIBADD = $(GLIB_LIBS) $(LIBNGF_LIBS)
endif
3 changes: 3 additions & 0 deletions modules/startup.c
Expand Up @@ -114,6 +114,9 @@ const char *modules[] = {
"dbusautoconnector.so",
#ifdef DSME_PWRKEY_MONITOR
"pwrkeymonitor.so",
#endif
#ifdef DSME_SHUTDOWN_FEEDBACK
"shutdownfeedback.so",
#endif
NULL
};
Expand Down
2 changes: 2 additions & 0 deletions rpm/dsme.spec
Expand Up @@ -10,6 +10,7 @@ Source1: dsme.service
Source2: dsme-rpmlintrc
Requires: systemd
Requires: statefs
Requires: ngfd
Requires(preun): systemd
Requires(post): systemd
Requires(postun): systemd
Expand All @@ -20,6 +21,7 @@ BuildRequires: pkgconfig(libiphb)
BuildRequires: pkgconfig(dsme) >= 0.62.0
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(mce) >= 1.12.3
BuildRequires: pkgconfig(libngf0)
BuildRequires: python
BuildRequires: autoconf
BuildRequires: libtool
Expand Down

0 comments on commit 9f64658

Please sign in to comment.