Lines Matching refs:mc13xxx

28 	struct mc13xxx *mc13xxx;  member
36 int (*func)(struct mc13xxx *mc13xxx, int irq); in mc13xxx_rtc_irq_enable_unlocked()
42 return func(priv->mc13xxx, irq); in mc13xxx_rtc_irq_enable_unlocked()
51 mc13xxx_lock(priv->mc13xxx); in mc13xxx_rtc_alarm_irq_enable()
55 mc13xxx_unlock(priv->mc13xxx); in mc13xxx_rtc_alarm_irq_enable()
71 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCDAY, &days1); in mc13xxx_rtc_read_time()
75 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCTOD, &seconds); in mc13xxx_rtc_read_time()
79 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCDAY, &days2); in mc13xxx_rtc_read_time()
98 mc13xxx_lock(priv->mc13xxx); in mc13xxx_rtc_set_time()
104 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCTODA, &alarmseconds); in mc13xxx_rtc_set_time()
109 ret = mc13xxx_reg_write(priv->mc13xxx, in mc13xxx_rtc_set_time()
119 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCTOD, 0); in mc13xxx_rtc_set_time()
123 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCDAY, days); in mc13xxx_rtc_set_time()
127 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCTOD, seconds); in mc13xxx_rtc_set_time()
133 ret = mc13xxx_reg_write(priv->mc13xxx, in mc13xxx_rtc_set_time()
140 ret = mc13xxx_irq_ack(priv->mc13xxx, MC13XXX_IRQ_RTCRST); in mc13xxx_rtc_set_time()
144 ret = mc13xxx_irq_unmask(priv->mc13xxx, MC13XXX_IRQ_RTCRST); in mc13xxx_rtc_set_time()
150 mc13xxx_unlock(priv->mc13xxx); in mc13xxx_rtc_set_time()
163 mc13xxx_lock(priv->mc13xxx); in mc13xxx_rtc_read_alarm()
165 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCTODA, &seconds); in mc13xxx_rtc_read_alarm()
173 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCDAY, &days); in mc13xxx_rtc_read_alarm()
177 ret = mc13xxx_irq_status(priv->mc13xxx, MC13XXX_IRQ_TODA, in mc13xxx_rtc_read_alarm()
181 mc13xxx_unlock(priv->mc13xxx); in mc13xxx_rtc_read_alarm()
204 mc13xxx_lock(priv->mc13xxx); in mc13xxx_rtc_set_alarm()
207 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCTODA, 0x1ffff); in mc13xxx_rtc_set_alarm()
211 ret = mc13xxx_irq_ack(priv->mc13xxx, MC13XXX_IRQ_TODA); in mc13xxx_rtc_set_alarm()
227 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCDAYA, days); in mc13xxx_rtc_set_alarm()
231 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCTODA, seconds); in mc13xxx_rtc_set_alarm()
234 mc13xxx_unlock(priv->mc13xxx); in mc13xxx_rtc_set_alarm()
242 struct mc13xxx *mc13xxx = priv->mc13xxx; in mc13xxx_rtc_alarm_handler() local
246 mc13xxx_irq_ack(mc13xxx, irq); in mc13xxx_rtc_alarm_handler()
262 struct mc13xxx *mc13xxx = priv->mc13xxx; in mc13xxx_rtc_reset_handler() local
266 mc13xxx_irq_mask(mc13xxx, irq); in mc13xxx_rtc_reset_handler()
275 struct mc13xxx *mc13xxx; in mc13xxx_rtc_probe() local
281 mc13xxx = dev_get_drvdata(pdev->dev.parent); in mc13xxx_rtc_probe()
282 priv->mc13xxx = mc13xxx; in mc13xxx_rtc_probe()
294 mc13xxx_lock(mc13xxx); in mc13xxx_rtc_probe()
296 mc13xxx_irq_ack(mc13xxx, MC13XXX_IRQ_RTCRST); in mc13xxx_rtc_probe()
298 ret = mc13xxx_irq_request(mc13xxx, MC13XXX_IRQ_RTCRST, in mc13xxx_rtc_probe()
303 ret = mc13xxx_irq_request_nounmask(mc13xxx, MC13XXX_IRQ_TODA, in mc13xxx_rtc_probe()
308 mc13xxx_unlock(mc13xxx); in mc13xxx_rtc_probe()
312 mc13xxx_lock(mc13xxx); in mc13xxx_rtc_probe()
319 mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_TODA, priv); in mc13xxx_rtc_probe()
320 mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_RTCRST, priv); in mc13xxx_rtc_probe()
322 mc13xxx_unlock(mc13xxx); in mc13xxx_rtc_probe()
331 mc13xxx_lock(priv->mc13xxx); in mc13xxx_rtc_remove()
333 mc13xxx_irq_free(priv->mc13xxx, MC13XXX_IRQ_TODA, priv); in mc13xxx_rtc_remove()
334 mc13xxx_irq_free(priv->mc13xxx, MC13XXX_IRQ_RTCRST, priv); in mc13xxx_rtc_remove()
336 mc13xxx_unlock(priv->mc13xxx); in mc13xxx_rtc_remove()