summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRanjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>2021-10-06 11:26:39 -0500
committerPhilippe Schenker <philippe.schenker@toradex.com>2022-05-18 16:47:38 +0200
commit007174143c1307204839e855e9c23a068bc4e29d (patch)
tree2e8ed4135bf0409229ba092e98343bd290de95ea
parentac1f975e1cebbcb400da2aadfa270aec9cefbfbd (diff)
MLK-25649-8 rtc: imx-sc: Add support for identifying SCU wakeup source from sysfs
Consolidate SCU wakeup defines in the header file. Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com> (cherry picked from commit ae44e6f054423fd6b228a147571cc77bc768138e) (cherry picked from commit 8924966cd6cb48c0c549d07f028ee544fa6dca1a)
-rw-r--r--drivers/rtc/rtc-imx-sc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-imx-sc.c b/drivers/rtc/rtc-imx-sc.c
index 531bfce65cd6..0207397f7f12 100644
--- a/drivers/rtc/rtc-imx-sc.c
+++ b/drivers/rtc/rtc-imx-sc.c
@@ -18,9 +18,6 @@
#define IMX_SIP_SRTC 0xC2000002
#define IMX_SIP_SRTC_SET_TIME 0x0
-#define SC_IRQ_GROUP_RTC 2
-#define SC_IRQ_RTC 1
-
static struct imx_sc_ipc *rtc_ipc_handle;
static struct rtc_device *imx_sc_rtc;
@@ -77,7 +74,7 @@ static int imx_sc_rtc_set_time(struct device *dev, struct rtc_time *tm)
static int imx_sc_rtc_alarm_irq_enable(struct device *dev, unsigned int enable)
{
- return imx_scu_irq_group_enable(SC_IRQ_GROUP_RTC, SC_IRQ_RTC, enable);
+ return imx_scu_irq_group_enable(IMX_SC_IRQ_GROUP_RTC, IMX_SC_IRQ_RTC, enable);
}
static int imx_sc_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
@@ -136,7 +133,7 @@ static int imx_sc_rtc_alarm_notify(struct notifier_block *nb,
unsigned long event, void *group)
{
/* ignore non-rtc irq */
- if (!((event & SC_IRQ_RTC) && (*(u8 *)group == SC_IRQ_GROUP_RTC)))
+ if (!((event & IMX_SC_IRQ_RTC) && (*(u8 *)group == IMX_SC_IRQ_GROUP_RTC)))
return 0;
rtc_update_irq(imx_sc_rtc, 1, RTC_IRQF | RTC_AF);