linux/drivers/rtc/rtc-ds1685.c
/**
 * ds1685_rtc_begin_ctrl_access - prepare the rtc for ctrl access.
 * @rtc: pointer to the ds1685 rtc structure.
 * @flags: irq flags variable for spin_lock_irqsave.
 *
 * This takes several steps to prepare the rtc for access to read just the
 * control registers:
 *  - Sets a spinlock on the rtc IRQ.
 *  - Switches the rtc to bank 1.  This allows access to the two extended
 *    control registers.
 *
 * Only use this where you are certain another lock will not be held.
 */
prepare the rtc for ctrl access.
@rtc: pointer to the ds1685 rtc structure.
@flags: irq flags variable for spin_lock_irqsave.

This takes several steps to prepare the rtc for access to read just the
control registers:
- Sets a spinlock on the rtc IRQ.
- Switches the rtc to bank 1.  This allows access to the two extended
control registers.

Only use this where you are certain another lock will not be held.
prepare the rtc for ctrl access . @rtc : pointer to the ds1685 rtc structure . @flags : irq flags variable for spin_lock_irqsave . This takes several steps to prepare the rtc for access to read just the control registers : - Sets a spinlock on the rtc IRQ . - Switches the rtc to bank 1 . This allows access to the two extended control registers . Only use this where you are certain another lock will not be held .
static inline void
ds1685_rtc_begin_ctrl_access(struct ds1685_priv *rtc, unsigned long *flags)
{
	spin_lock_irqsave(&rtc->lock, *flags);
	ds1685_rtc_switch_to_bank1(rtc);
}
static inline void ds1685_rtc_begin_ctrl_access ( struct ds1685_priv * rtc , unsigned long * flags ) { spin_lock_irqsave ( & rtc -> lock , * flags ) ; ds1685_rtc_switch_to_bank1 ( rtc ) ; }
ds1685_rtc_begin_ctrl_access - prepare the rtc for ctrl access.
ds1685_rtc_begin_ctrl_access - prepare the rtc for ctrl access .