Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement iphb based timers for use from within mce
There are some mce state transitions that should be taken some time after
display is powered off and device has potentially entered late suspend.
These timers are re-evaluated when the device resume from suspend, but
that might be too late and applications can end up making decisions based
on mce state data that was frozen in time.

There are nemo-keepalive interfaces that use libiphb for waking up from
suspend, but those can't be used from mce because they depend on mce for
keeping the device away from suspend via mce cpu-keepalive dbus-service.

Add mce code module mce-hbtimer, which makes available: Timers that use
regular glib timeouts, but are backed up by iphb wakeups in case the
device gets suspended.

About the backdated copyright blurb: The code dealing with iphb wakeups
is derived from keepalive-heartbeat.c from nemo-keepalive package that
was written by me for Jolla and uses the same license as mce - LGPL v2.1.

[mce] Implement iphb based timers for use from within mce. Contributes to JB#28706
  • Loading branch information
spiiroin committed May 19, 2015
1 parent d993339 commit 6112f54
Show file tree
Hide file tree
Showing 6 changed files with 1,182 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .depend
Expand Up @@ -210,6 +210,22 @@ mce-hal.pic.o:\
mce-lib.h\
mce-log.h\

mce-hbtimer.o:\
mce-hbtimer.c\
datapipe.h\
libwakelock.h\
mce-hbtimer.h\
mce-log.h\
mce.h\

mce-hbtimer.pic.o:\
mce-hbtimer.c\
datapipe.h\
libwakelock.h\
mce-hbtimer.h\
mce-log.h\
mce.h\

mce-hybris.o:\
mce-hybris.c\
datapipe.h\
Expand Down Expand Up @@ -315,6 +331,7 @@ mce.o:\
mce-dsme.h\
mce-fbdev.h\
mce-gconf.h\
mce-hbtimer.h\
mce-log.h\
mce-modules.h\
mce-sensorfw.h\
Expand All @@ -336,6 +353,7 @@ mce.pic.o:\
mce-dsme.h\
mce-fbdev.h\
mce-gconf.h\
mce-hbtimer.h\
mce-log.h\
mce-modules.h\
mce-sensorfw.h\
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -260,6 +260,7 @@ MCE_PKG_NAMES += gmodule-2.0
MCE_PKG_NAMES += dbus-1
MCE_PKG_NAMES += dbus-glib-1
MCE_PKG_NAMES += dsme
MCE_PKG_NAMES += libiphb
MCE_PKG_NAMES += libsystemd-daemon

MCE_PKG_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(MCE_PKG_NAMES))
Expand All @@ -278,6 +279,7 @@ MCE_CORE += mce-fbdev.c
MCE_CORE += mce-dbus.c
MCE_CORE += mce-dsme.c
MCE_CORE += mce-gconf.c
MCE_CORE += mce-hbtimer.c
MCE_CORE += event-input.c
MCE_CORE += event-switches.c
MCE_CORE += mce-hal.c
Expand Down Expand Up @@ -531,6 +533,8 @@ NORMALIZE_USES_SPC =\
mce-fbdev.h\
mce-command-line.c\
mce-command-line.h\
mce-hbtimer.c\
mce-hbtimer.h\
mce-hybris.c\
mce-hybris.h\
mce-modules.h\
Expand Down

0 comments on commit 6112f54

Please sign in to comment.