diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c index c70384de63..a7c95ab3e8 100644 --- a/drivers/rtc/rtc-s5m.c +++ b/drivers/rtc/rtc-s5m.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -260,6 +261,12 @@ static int s5m_check_pending_alarm_interrupt(struct s5m_rtc_info *info, val &= S2MPG12_STATUS2_RTCA0E; break; case S2MPG10: + ret = regmap_read(info->s5m87xx->regmap_pmic, S2MPG10_PMIC_STATUS2, + &val); + if (ret < 0) + return ret; + val &= S2MPG10_STATUS2_RTCA0E; + break; case S2MPS15X: case S2MPS14X: case S2MPS13X: diff --git a/include/linux/mfd/samsung/s2mpg10.h b/include/linux/mfd/samsung/s2mpg10.h index 8e5cf21cbd..50dcb77d5f 100644 --- a/include/linux/mfd/samsung/s2mpg10.h +++ b/include/linux/mfd/samsung/s2mpg10.h @@ -290,6 +290,9 @@ enum s2mpg10_pmic_reg { S2MPG10_PMIC_LDO_SENSE4, }; +/* Alarm0 pending flag in S2MPG10_PMIC_STATUS2. */ +#define S2MPG10_STATUS2_RTCA0E BIT(2) + /* Rail controlled externally, based on PCTRLSELx */ #define S2MPG10_PMIC_CTRL_ENABLE_EXT BIT(0)