rtc_qmsi: Add get_pending_int API

For AON peripherals on Quark SE C1000, an API is needed
to retrieve the interrupt status after wake up.
This enables the application to know the wake source before
enabling again the interrupts.
Add this API to the rtc as this is a wake event
on Quark SE C1000.

Jira: ZEP-1188

Change-Id: Id850ce405eb3f4857be720201e462ea8e24a334f
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
This commit is contained in:
Julien Delayen 2016-11-03 13:45:31 +00:00 committed by Anas Nashif
commit ee04a3f6d8
2 changed files with 29 additions and 0 deletions

View file

@ -155,12 +155,18 @@ static uint32_t rtc_qmsi_read(struct device *dev)
return QM_RTC[QM_RTC_0].rtc_ccvr;
}
static uint32_t rtc_qmsi_get_pending_int(struct device *dev)
{
return QM_RTC[QM_RTC_0].rtc_stat;
}
static const struct rtc_driver_api api = {
.enable = rtc_qmsi_enable,
.disable = rtc_qmsi_disable,
.read = rtc_qmsi_read,
.set_config = rtc_qmsi_set_config,
.set_alarm = rtc_qmsi_set_alarm,
.get_pending_int = rtc_qmsi_get_pending_int,
};
static int rtc_qmsi_init(struct device *dev)