static int rtc_resume_device(struct device *dev) { qm_rtc_restore_context(QM_RTC_0, &rtc_ctx); rtc_qmsi_set_power_state(dev, DEVICE_PM_ACTIVE_STATE); return 0; }
void restore_my_context(device_sleep_t dev) { /* * Each core restores its own interrupt context. The function call is * the same for both cores. */ qm_irq_restore_context(&irq_ctx); /* * RTC is only used for the master which triggers the sleep. * Only restore the RTC for this core. */ if (dev == SOC_SLEEP) { qm_rtc_restore_context(QM_RTC_0, &rtc_ctx); } /* * Each core restores its own UART. * STDOUT_UART is defined by the Makefile and should be different for * both cores. */ qm_uart_restore_context(STDOUT_UART, &uart_ctx); }