Lines Matching refs:ctrl_reg

81 	unsigned int ctrl_reg, rtc_ctrl_reg;  in pm8xxx_rtc_set_time()  local
99 rc = regmap_read(rtc_dd->regmap, regs->alarm_ctrl, &ctrl_reg); in pm8xxx_rtc_set_time()
103 if (ctrl_reg & regs->alarm_en) { in pm8xxx_rtc_set_time()
105 ctrl_reg &= ~regs->alarm_en; in pm8xxx_rtc_set_time()
106 rc = regmap_write(rtc_dd->regmap, regs->alarm_ctrl, ctrl_reg); in pm8xxx_rtc_set_time()
161 ctrl_reg |= regs->alarm_en; in pm8xxx_rtc_set_time()
162 rc = regmap_write(rtc_dd->regmap, regs->alarm_ctrl, ctrl_reg); in pm8xxx_rtc_set_time()
223 unsigned int ctrl_reg; in pm8xxx_rtc_set_alarm() local
244 rc = regmap_read(rtc_dd->regmap, regs->alarm_ctrl, &ctrl_reg); in pm8xxx_rtc_set_alarm()
249 ctrl_reg |= regs->alarm_en; in pm8xxx_rtc_set_alarm()
251 ctrl_reg &= ~regs->alarm_en; in pm8xxx_rtc_set_alarm()
253 rc = regmap_write(rtc_dd->regmap, regs->alarm_ctrl, ctrl_reg); in pm8xxx_rtc_set_alarm()
269 unsigned int ctrl_reg; in pm8xxx_rtc_read_alarm() local
287 rc = regmap_read(rtc_dd->regmap, regs->alarm_ctrl, &ctrl_reg); in pm8xxx_rtc_read_alarm()
292 alarm->enabled = !!(ctrl_reg & PM8xxx_RTC_ALARM_ENABLE); in pm8xxx_rtc_read_alarm()
306 unsigned int ctrl_reg; in pm8xxx_rtc_alarm_irq_enable() local
311 rc = regmap_read(rtc_dd->regmap, regs->alarm_ctrl, &ctrl_reg); in pm8xxx_rtc_alarm_irq_enable()
316 ctrl_reg |= regs->alarm_en; in pm8xxx_rtc_alarm_irq_enable()
318 ctrl_reg &= ~regs->alarm_en; in pm8xxx_rtc_alarm_irq_enable()
320 rc = regmap_write(rtc_dd->regmap, regs->alarm_ctrl, ctrl_reg); in pm8xxx_rtc_alarm_irq_enable()
353 unsigned int ctrl_reg; in pm8xxx_alarm_trigger() local
361 rc = regmap_read(rtc_dd->regmap, regs->alarm_ctrl, &ctrl_reg); in pm8xxx_alarm_trigger()
367 ctrl_reg &= ~regs->alarm_en; in pm8xxx_alarm_trigger()
369 rc = regmap_write(rtc_dd->regmap, regs->alarm_ctrl, ctrl_reg); in pm8xxx_alarm_trigger()
380 rc = regmap_read(rtc_dd->regmap, regs->alarm_ctrl2, &ctrl_reg); in pm8xxx_alarm_trigger()
387 ctrl_reg |= PM8xxx_RTC_ALARM_CLEAR; in pm8xxx_alarm_trigger()
388 rc = regmap_write(rtc_dd->regmap, regs->alarm_ctrl2, ctrl_reg); in pm8xxx_alarm_trigger()
400 unsigned int ctrl_reg; in pm8xxx_rtc_enable() local
404 rc = regmap_read(rtc_dd->regmap, regs->ctrl, &ctrl_reg); in pm8xxx_rtc_enable()
408 if (!(ctrl_reg & PM8xxx_RTC_ENABLE)) { in pm8xxx_rtc_enable()
409 ctrl_reg |= PM8xxx_RTC_ENABLE; in pm8xxx_rtc_enable()
410 rc = regmap_write(rtc_dd->regmap, regs->ctrl, ctrl_reg); in pm8xxx_rtc_enable()