static int tps65910_rtc_start_alarm(struct tps65910_rtc *tps65910_rtc) { tps65910_rtc->alarm_enabled = 1; return tps65910_set_bits(tps65910_rtc->tps65910, TPS65910_RTC_INTERRUPTS, BIT_RTC_INTERRUPTS_REG_IT_ALARM_M); }
static int tps65910_gpio_output(struct gpio_chip *gc, unsigned offset, int value) { struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio); /* Set the initial value */ tps65910_gpio_set(gc, 0, value); return tps65910_set_bits(tps65910, TPS65910_GPIO0 + offset, GPIO_CFG_MASK); }
static int tps65910_rtc_update_irq_enable(struct device *dev, unsigned int enabled) { struct tps65910_rtc *tps65910_rtc = dev_get_drvdata(dev); if (enabled) return tps65910_set_bits(tps65910_rtc->tps65910, TPS65910_RTC_INTERRUPTS, BIT_RTC_INTERRUPTS_REG_IT_TIMER_M); else return tps65910_clear_bits(tps65910_rtc->tps65910, TPS65910_RTC_INTERRUPTS, BIT_RTC_INTERRUPTS_REG_IT_TIMER_M); }
static void tps65910_gpio_set(struct gpio_chip *gc, unsigned offset, int value) { struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio); if (value) tps65910_set_bits(tps65910, TPS65910_GPIO0 + offset, GPIO_SET_MASK); else tps65910_clear_bits(tps65910, TPS65910_GPIO0 + offset, GPIO_SET_MASK); }