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_irq_enable()
55 mc13xxx_unlock(priv->mc13xxx); in mc13xxx_rtc_irq_enable()
67 mc13xxx_lock(priv->mc13xxx); in mc13xxx_rtc_read_time()
74 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCDAY, &days1); in mc13xxx_rtc_read_time()
78 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCTOD, &seconds); in mc13xxx_rtc_read_time()
82 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCDAY, &days2); in mc13xxx_rtc_read_time()
84 mc13xxx_unlock(priv->mc13xxx); in mc13xxx_rtc_read_time()
116 mc13xxx_lock(priv->mc13xxx); in mc13xxx_rtc_set_mmss()
122 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCTODA, &alarmseconds); in mc13xxx_rtc_set_mmss()
127 ret = mc13xxx_reg_write(priv->mc13xxx, in mc13xxx_rtc_set_mmss()
137 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCTOD, 0); in mc13xxx_rtc_set_mmss()
141 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCDAY, days); in mc13xxx_rtc_set_mmss()
145 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCTOD, seconds); in mc13xxx_rtc_set_mmss()
151 ret = mc13xxx_reg_write(priv->mc13xxx, in mc13xxx_rtc_set_mmss()
157 ret = mc13xxx_irq_ack(priv->mc13xxx, MC13XXX_IRQ_RTCRST); in mc13xxx_rtc_set_mmss()
161 ret = mc13xxx_irq_unmask(priv->mc13xxx, MC13XXX_IRQ_RTCRST); in mc13xxx_rtc_set_mmss()
165 mc13xxx_unlock(priv->mc13xxx); in mc13xxx_rtc_set_mmss()
178 mc13xxx_lock(priv->mc13xxx); in mc13xxx_rtc_read_alarm()
180 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCTODA, &seconds); in mc13xxx_rtc_read_alarm()
188 ret = mc13xxx_reg_read(priv->mc13xxx, MC13XXX_RTCDAY, &days); in mc13xxx_rtc_read_alarm()
192 ret = mc13xxx_irq_status(priv->mc13xxx, MC13XXX_IRQ_TODA, in mc13xxx_rtc_read_alarm()
196 mc13xxx_unlock(priv->mc13xxx); in mc13xxx_rtc_read_alarm()
219 mc13xxx_lock(priv->mc13xxx); in mc13xxx_rtc_set_alarm()
222 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCTODA, 0x1ffff); in mc13xxx_rtc_set_alarm()
226 ret = mc13xxx_irq_ack(priv->mc13xxx, MC13XXX_IRQ_TODA); in mc13xxx_rtc_set_alarm()
245 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCDAYA, days); in mc13xxx_rtc_set_alarm()
249 ret = mc13xxx_reg_write(priv->mc13xxx, MC13XXX_RTCTODA, seconds); in mc13xxx_rtc_set_alarm()
252 mc13xxx_unlock(priv->mc13xxx); in mc13xxx_rtc_set_alarm()
260 struct mc13xxx *mc13xxx = priv->mc13xxx; in mc13xxx_rtc_alarm_handler() local
266 mc13xxx_irq_ack(mc13xxx, irq); in mc13xxx_rtc_alarm_handler()
274 struct mc13xxx *mc13xxx = priv->mc13xxx; in mc13xxx_rtc_update_handler() local
280 mc13xxx_irq_ack(mc13xxx, irq); in mc13xxx_rtc_update_handler()
302 struct mc13xxx *mc13xxx = priv->mc13xxx; in mc13xxx_rtc_reset_handler() local
307 mc13xxx_irq_mask(mc13xxx, irq); in mc13xxx_rtc_reset_handler()
316 struct mc13xxx *mc13xxx; in mc13xxx_rtc_probe() local
323 mc13xxx = dev_get_drvdata(pdev->dev.parent); in mc13xxx_rtc_probe()
324 priv->mc13xxx = mc13xxx; in mc13xxx_rtc_probe()
328 mc13xxx_lock(mc13xxx); in mc13xxx_rtc_probe()
330 ret = mc13xxx_irq_request(mc13xxx, MC13XXX_IRQ_RTCRST, in mc13xxx_rtc_probe()
335 ret = mc13xxx_irq_status(mc13xxx, MC13XXX_IRQ_RTCRST, in mc13xxx_rtc_probe()
342 ret = mc13xxx_irq_request_nounmask(mc13xxx, MC13XXX_IRQ_1HZ, in mc13xxx_rtc_probe()
347 ret = mc13xxx_irq_request_nounmask(mc13xxx, MC13XXX_IRQ_TODA, in mc13xxx_rtc_probe()
352 mc13xxx_unlock(mc13xxx); in mc13xxx_rtc_probe()
359 mc13xxx_lock(mc13xxx); in mc13xxx_rtc_probe()
361 mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_TODA, priv); in mc13xxx_rtc_probe()
364 mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_1HZ, priv); in mc13xxx_rtc_probe()
369 mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_RTCRST, priv); in mc13xxx_rtc_probe()
372 mc13xxx_unlock(mc13xxx); in mc13xxx_rtc_probe()
385 mc13xxx_lock(priv->mc13xxx); in mc13xxx_rtc_remove()
389 mc13xxx_irq_free(priv->mc13xxx, MC13XXX_IRQ_TODA, priv); in mc13xxx_rtc_remove()
390 mc13xxx_irq_free(priv->mc13xxx, MC13XXX_IRQ_1HZ, priv); in mc13xxx_rtc_remove()
391 mc13xxx_irq_free(priv->mc13xxx, MC13XXX_IRQ_RTCRST, priv); in mc13xxx_rtc_remove()
393 mc13xxx_unlock(priv->mc13xxx); in mc13xxx_rtc_remove()