I am trying to use power management (sleep mode) in a way that is similar to how Android does it with timerfd and epoll. I want to enable autosleep and use RTC wake timers (created using timerfd) that wake the system back up and prevent sleep mode (using epoll mechanism) until the timer event is handled and all wakelocks have been released again.
When I try using this approach, the wake timer created using timerfd does not wake the system (however, the rtcwake command does work). I'm not sure if this is supported by the BeagleBone kernel or not. I found the following code references from Linux 3.12 code, but appears to be replaced with dts and drivers/soc/ti/wkup_m3_ipc.c in Linux 3.14. Could there be something missing from arch/arm/boot/dts/am33xx.dtsi that would enable what I need?
struct wkup_m3_wakeup_src wakeups[] = {
{.irq_nr = 35, .src = "USB0_PHY"},
{.irq_nr = 36, .src = "USB1_PHY"},
{.irq_nr = 40, .src = "I2C0"},
{.irq_nr = 41, .src = "RTC Timer"},
{.irq_nr = 42, .src = "RTC Alarm"},
{.irq_nr = 43, .src = "Timer0"},
{.irq_nr = 44, .src = "Timer1"},
{.irq_nr = 45, .src = "UART"},
{.irq_nr = 46, .src = "GPIO0"},
{.irq_nr = 48, .src = "MPU_WAKE"},
{.irq_nr = 49, .src = "WDT0"},
{.irq_nr = 50, .src = "WDT1"},
{.irq_nr = 51, .src = "ADC_TSC"},
{.irq_nr = 0, .src = "Unknown"},
};