* auto-cleared after successful update.
*/
unsigned int udr_update;
+ /* Auto-cleared mask in UDR field for writing time and alarm */
+ unsigned int autoclear_udr_mask;
/* Mask for UDR field in 'udr_update' register */
unsigned int udr_mask;
};
.alarm0 = S5M_ALARM0_SEC,
.alarm1 = S5M_ALARM1_SEC,
.udr_update = S5M_RTC_UDR_CON,
+ .autoclear_udr_mask = S5M_RTC_UDR_MASK,
.udr_mask = S5M_RTC_UDR_MASK,
};
.alarm0 = S2MPS_ALARM0_SEC,
.alarm1 = S2MPS_ALARM1_SEC,
.udr_update = S2MPS_RTC_UDR_CON,
+ .autoclear_udr_mask = S2MPS_RTC_WUDR_MASK,
.udr_mask = S2MPS_RTC_WUDR_MASK,
};
do {
ret = regmap_read(info->regmap, info->regs->udr_update, &data);
- } while (--retry && (data & info->regs->udr_mask) && !ret);
+ } while (--retry && (data & info->regs->autoclear_udr_mask) && !ret);
if (!retry)
dev_err(info->dev, "waiting for UDR update, reached max number of retries\n");