/linux/drivers/rtc/ |
A D | rtc-ds1685.c | 161 rtc->write(rtc, RTC_CTRL_A, in ds1685_rtc_switch_to_bank0() 172 rtc->write(rtc, RTC_CTRL_A, in ds1685_rtc_switch_to_bank1() 193 rtc->write(rtc, RTC_CTRL_B, in ds1685_rtc_begin_data_access() 219 rtc->write(rtc, RTC_CTRL_B, in ds1685_rtc_end_data_access() 497 rtc->read(rtc, RTC_CTRL_C); in ds1685_rtc_set_alarm() 544 rtc->write(rtc, RTC_CTRL_B, (rtc->read(rtc, RTC_CTRL_B) | in ds1685_rtc_alarm_irq_enable() 547 rtc->write(rtc, RTC_CTRL_B, (rtc->read(rtc, RTC_CTRL_B) & in ds1685_rtc_alarm_irq_enable() 551 rtc->read(rtc, RTC_CTRL_C); in ds1685_rtc_alarm_irq_enable() 1161 rtc->write(rtc, RTC_CTRL_B, in ds1685_rtc_probe() 1203 rtc->write(rtc, RTC_HRS, in ds1685_rtc_probe() [all …]
|
A D | Makefile | 9 obj-$(CONFIG_RTC_CLASS) += rtc-core.o 11 rtc-core-y := class.o interface.o 13 rtc-core-$(CONFIG_RTC_NVMEM) += nvmem.o 14 rtc-core-$(CONFIG_RTC_INTF_DEV) += dev.o 15 rtc-core-$(CONFIG_RTC_INTF_PROC) += proc.o 16 rtc-core-$(CONFIG_RTC_INTF_SYSFS) += sysfs.o 28 obj-$(CONFIG_RTC_DRV_AC100) += rtc-ac100.o 41 obj-$(CONFIG_RTC_DRV_CMOS) += rtc-cmos.o 66 obj-$(CONFIG_RTC_DRV_EFI) += rtc-efi.o 111 obj-$(CONFIG_RTC_DRV_MV) += rtc-mv.o [all …]
|
A D | interface.c | 38 if ((rtc->start_secs > rtc->range_min && secs >= rtc->start_secs) || in rtc_add_offset() 39 (rtc->start_secs < rtc->range_min && in rtc_add_offset() 40 secs <= (rtc->start_secs + rtc->range_max - rtc->range_min))) in rtc_add_offset() 69 if (rtc->range_min != rtc->range_max) { in rtc_valid_range() 74 (rtc->start_secs + rtc->range_max - rtc->range_min) : in rtc_valid_range() 94 err = rtc->ops->read_time(rtc->dev.parent, tm); in __rtc_read_time() 158 err = rtc->ops->set_time(rtc->dev.parent, tm); in rtc_set_time() 471 rtc_timer_remove(rtc, &rtc->aie_timer); in rtc_set_alarm() 537 rtc_timer_remove(rtc, &rtc->aie_timer); in rtc_alarm_irq_enable() 597 rtc_timer_remove(rtc, &rtc->uie_rtctimer); in rtc_update_irq_enable() [all …]
|
A D | class.c | 32 kfree(rtc); in rtc_device_release() 198 rtc = kzalloc(sizeof(*rtc), GFP_KERNEL); in rtc_allocate_device() 199 if (!rtc) in rtc_allocate_device() 272 if (rtc->range_min == rtc->range_max) in rtc_device_get_offset() 317 if (rtc->start_secs > rtc->range_max || in rtc_device_get_offset() 319 rtc->offset_secs = rtc->start_secs - rtc->range_min; in rtc_device_get_offset() 320 else if (rtc->start_secs > rtc->range_min) in rtc_device_get_offset() 322 else if (rtc->start_secs < rtc->range_min) in rtc_device_get_offset() 339 cdev_device_del(&rtc->char_dev, &rtc->dev); in devm_rtc_unregister_device() 413 MAJOR(rtc->dev.devt), rtc->id); in __devm_rtc_register_device() [all …]
|
A D | rtc-omap.c | 226 rtc->type->lock(rtc); in rtc_irq() 258 rtc->type->unlock(rtc); in omap_rtc_alarm_irq_enable() 262 rtc->type->lock(rtc); in omap_rtc_alarm_irq_enable() 325 rtc->type->unlock(rtc); in omap_rtc_set_time() 332 rtc->type->lock(rtc); in omap_rtc_set_time() 396 rtc->type->lock(rtc); in omap_rtc_set_alarm() 461 rtc->type->lock(rtc); in omap_rtc_power_off_program() 663 rtc->type->lock(rtc); in rtc_pinconf_set() 712 rtc->type->lock(rtc); in omap_rtc_scratch_write() 867 dev_name(&rtc->rtc->dev), rtc); in omap_rtc_probe() [all …]
|
A D | rtc-sh.c | 154 if ((rtc->periodic_freq & PF_HP) && (rtc->periodic_freq & PF_COUNT)) in __sh_rtc_periodic() 170 spin_lock(&rtc->lock); in sh_rtc_interrupt() 182 spin_lock(&rtc->lock); in sh_rtc_alarm() 194 spin_lock(&rtc->lock); in sh_rtc_periodic() 206 spin_lock(&rtc->lock); in sh_rtc_shared() 470 struct sh_rtc *rtc; in sh_rtc_probe() local 475 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); in sh_rtc_probe() 476 if (unlikely(!rtc)) in sh_rtc_probe() 507 rtc->regbase = devm_ioremap(&pdev->dev, rtc->res->start, rtc->regsize); in sh_rtc_probe() 529 rtc->clk = NULL; in sh_rtc_probe() [all …]
|
A D | dev.c | 31 file->private_data = rtc; in rtc_dev_open() 34 rtc->irq_data = 0; in rtc_dev_open() 75 struct rtc_device *rtc = from_timer(rtc, t, uie_timer); in rtc_uie_timer() local 125 rtc->irq_data = 0; in set_uie() 133 return set_uie(rtc); in rtc_dev_update_irq_enable_emul() 159 rtc->irq_data = 0; in rtc_dev_read() 236 if (rtc->irq_freq > rtc->max_user_freq && in rtc_dev_ioctl() 413 err = rtc->ops->param_get(rtc->dev.parent, ¶m); in rtc_dev_ioctl() 443 err = rtc->ops->param_set(rtc->dev.parent, ¶m); in rtc_dev_ioctl() 550 rtc->dev.devt = MKDEV(MAJOR(rtc_devt), rtc->id); in rtc_dev_prepare() [all …]
|
A D | rtc-armada38x.c | 152 rtc->val_to_freq[i].value = readl(rtc->regs + rtc_reg); in read_rtc_register_38x_wa() 219 time = rtc->data->read_rtc_reg(rtc, RTC_TIME); in armada38x_rtc_read_time() 231 reg = rtc->data->read_rtc_reg(rtc, RTC_CONF_TEST); in armada38x_rtc_reset() 271 time = rtc->data->read_rtc_reg(rtc, reg); in armada38x_rtc_read_alarm() 297 rtc->data->unmask_interrupt(rtc); in armada38x_rtc_set_alarm() 335 rtc->data->clear_isr(rtc); in armada38x_rtc_alarm_irq() 336 val = rtc->data->read_rtc_reg(rtc, reg_irq); in armada38x_rtc_alarm_irq() 405 ccr = rtc->data->read_rtc_reg(rtc, RTC_CCR); in armada38x_rtc_read_offset() 499 if (!rtc) in armada38x_rtc_probe() 541 rtc->data->update_mbus_timing(rtc); in armada38x_rtc_probe() [all …]
|
A D | rtc-at91sam9.c | 90 regmap_read(rtc->gpbr, rtc->gpbr_offset, &val); in gpbr_readl() 97 regmap_write(rtc->gpbr, rtc->gpbr_offset, val); in gpbr_writel() 287 rtc_update_irq(rtc->rtcdev, 1, rtc->events); in at91_rtc_flush_events() 291 rtc->events >> 8, rtc->events & 0x000000FF); in at91_rtc_flush_events() 347 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); in at91_rtc_probe() 348 if (!rtc) in at91_rtc_probe() 352 rtc->irq = irq; in at91_rtc_probe() 418 dev_name(&rtc->rtcdev->dev), rtc); in at91_rtc_probe() 464 rtt_writel(rtc, MR, mr & ~rtc->imr); in at91_rtc_shutdown() 493 rtt_writel(rtc, MR, mr & ~rtc->imr); in at91_rtc_suspend() [all …]
|
A D | rtc-lpc32xx.c | 173 rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF); in lpc32xx_rtc_alarm_interrupt() 192 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); in lpc32xx_rtc_probe() 193 if (unlikely(!rtc)) in lpc32xx_rtc_probe() 235 rtc->rtc = devm_rtc_allocate_device(&pdev->dev); in lpc32xx_rtc_probe() 236 if (IS_ERR(rtc->rtc)) in lpc32xx_rtc_probe() 237 return PTR_ERR(rtc->rtc); in lpc32xx_rtc_probe() 239 rtc->rtc->ops = &lpc32xx_rtc_ops; in lpc32xx_rtc_probe() 240 rtc->rtc->range_max = U32_MAX; in lpc32xx_rtc_probe() 242 err = devm_rtc_register_device(rtc->rtc); in lpc32xx_rtc_probe() 251 if (rtc->irq < 0) { in lpc32xx_rtc_probe() [all …]
|
A D | rtc-st-lpc.c | 142 enable_irq(rtc->irq); in st_rtc_alarm_irq_enable() 145 disable_irq(rtc->irq); in st_rtc_alarm_irq_enable() 187 struct st_rtc *rtc; in st_rtc_probe() local 202 if (!rtc) in st_rtc_probe() 212 if (IS_ERR(rtc->ioaddr)) in st_rtc_probe() 216 if (!rtc->irq) { in st_rtc_probe() 229 disable_irq(rtc->irq); in st_rtc_probe() 232 if (IS_ERR(rtc->clk)) { in st_rtc_probe() 239 rtc->clkrate = clk_get_rate(rtc->clk); in st_rtc_probe() 240 if (!rtc->clkrate) { in st_rtc_probe() [all …]
|
A D | rtc-sc27xx.c | 196 ret = regmap_read(rtc->regmap, rtc->base + sec_reg, &val); in sprd_rtc_get_secs() 419 rtc_ktime_to_tm(rtc->rtc->aie_timer.node.expires); in sprd_rtc_set_alarm() 514 rtc_update_irq(rtc->rtc, 1, RTC_AF | RTC_IRQF); in sprd_rtc_handler() 569 if (!rtc) in sprd_rtc_probe() 586 rtc->rtc = devm_rtc_allocate_device(&pdev->dev); in sprd_rtc_probe() 587 if (IS_ERR(rtc->rtc)) in sprd_rtc_probe() 588 return PTR_ERR(rtc->rtc); in sprd_rtc_probe() 618 rtc->rtc->ops = &sprd_rtc_ops; in sprd_rtc_probe() 619 rtc->rtc->range_min = 0; in sprd_rtc_probe() 620 rtc->rtc->range_max = 5662310399LL; in sprd_rtc_probe() [all …]
|
A D | rtc-stm32.c | 202 rtc->data->clear_events(rtc, flags); in stm32_rtc_clear_event_flags() 212 rtc_lock(rtc->rtc_dev); in stm32_rtc_alarm_irq() 698 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); in stm32_rtc_probe() 699 if (!rtc) in stm32_rtc_probe() 734 rtc->pclk = NULL; in stm32_rtc_probe() 760 regmap_update_bits(rtc->dbp, rtc->dbp_reg, in stm32_rtc_probe() 761 rtc->dbp_mask, rtc->dbp_mask); in stm32_rtc_probe() 810 pdev->name, rtc); in stm32_rtc_probe() 813 rtc->irq_alarm); in stm32_rtc_probe() 841 regmap_update_bits(rtc->dbp, rtc->dbp_reg, rtc->dbp_mask, 0); in stm32_rtc_probe() [all …]
|
A D | rtc-meson.c | 294 struct meson_rtc *rtc; in meson_rtc_probe() local 300 if (!rtc) in meson_rtc_probe() 303 rtc->rtc = devm_rtc_allocate_device(dev); in meson_rtc_probe() 304 if (IS_ERR(rtc->rtc)) in meson_rtc_probe() 305 return PTR_ERR(rtc->rtc); in meson_rtc_probe() 309 rtc->dev = dev; in meson_rtc_probe() 311 rtc->rtc->ops = &meson_rtc_ops; in meson_rtc_probe() 312 rtc->rtc->range_max = U32_MAX; in meson_rtc_probe() 349 rtc->serial = devm_regmap_init(dev, &meson_rtc_serial_bus, rtc, in meson_rtc_probe() 368 ret = devm_rtc_nvmem_register(rtc->rtc, &meson_rtc_nvmem_config); in meson_rtc_probe() [all …]
|
A D | rtc-lpc24xx.c | 64 struct rtc_device *rtc; member 181 rtc_update_irq(rtc->rtc, 1, events); in lpc24xx_rtc_interrupt() 196 struct lpc24xx_rtc *rtc; in lpc24xx_rtc_probe() local 199 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); in lpc24xx_rtc_probe() 200 if (!rtc) in lpc24xx_rtc_probe() 204 if (IS_ERR(rtc->rtc_base)) in lpc24xx_rtc_probe() 212 if (IS_ERR(rtc->clk_rtc)) { in lpc24xx_rtc_probe() 244 pdev->name, rtc); in lpc24xx_rtc_probe() 250 rtc->rtc = devm_rtc_device_register(&pdev->dev, "lpc24xx-rtc", in lpc24xx_rtc_probe() 252 if (IS_ERR(rtc->rtc)) { in lpc24xx_rtc_probe() [all …]
|
A D | rtc-cpcap.c | 93 struct cpcap_rtc *rtc; in cpcap_rtc_read_time() local 120 struct cpcap_rtc *rtc; in cpcap_rtc_set_time() local 128 if (rtc->alarm_enabled) in cpcap_rtc_set_time() 171 struct cpcap_rtc *rtc; in cpcap_rtc_read_alarm() local 194 struct cpcap_rtc *rtc; in cpcap_rtc_set_alarm() local 247 struct cpcap_rtc *rtc; in cpcap_rtc_probe() local 250 rtc = devm_kzalloc(dev, sizeof(*rtc), GFP_KERNEL); in cpcap_rtc_probe() 251 if (!rtc) in cpcap_rtc_probe() 255 if (!rtc->regmap) in cpcap_rtc_probe() 266 err = cpcap_get_vendor(dev, rtc->regmap, &rtc->vendor); in cpcap_rtc_probe() [all …]
|
A D | rtc-da9052.c | 25 struct rtc_device *rtc; member 51 rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF); in da9052_rtc_irq() 280 if (!rtc) in da9052_rtc_probe() 288 rtc_err(rtc, in da9052_rtc_probe() 299 rtc->rtc = devm_rtc_allocate_device(&pdev->dev); in da9052_rtc_probe() 300 if (IS_ERR(rtc->rtc)) in da9052_rtc_probe() 301 return PTR_ERR(rtc->rtc); in da9052_rtc_probe() 303 rtc->rtc->ops = &da9052_rtc_ops; in da9052_rtc_probe() 304 rtc->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; in da9052_rtc_probe() 305 rtc->rtc->range_max = RTC_TIMESTAMP_END_2063; in da9052_rtc_probe() [all …]
|
A D | rtc-mt6397.c | 24 ret = regmap_write(rtc->regmap, rtc->addr_base + rtc->data->wrtgr, 1); in mtk_rtc_write_trigger() 46 ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_IRQ_STA, &irqsta); in mtk_rtc_irq_handler_thread() 51 if (regmap_write(rtc->regmap, rtc->addr_base + RTC_IRQ_EN, in mtk_rtc_irq_handler_thread() 69 ret = regmap_bulk_read(rtc->regmap, rtc->addr_base + RTC_TC_SEC, in __mtk_rtc_read_time() 81 ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_TC_SEC, sec); in __mtk_rtc_read_time() 136 ret = regmap_bulk_write(rtc->regmap, rtc->addr_base + RTC_TC_SEC, in mtk_rtc_set_time() 161 ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_PDN2, &pdn2); in mtk_rtc_read_alarm() 165 ret = regmap_bulk_read(rtc->regmap, rtc->addr_base + RTC_AL_SEC, in mtk_rtc_read_alarm() 201 ret = regmap_bulk_read(rtc->regmap, rtc->addr_base + RTC_AL_SEC, in mtk_rtc_set_alarm() 225 ret = regmap_write(rtc->regmap, rtc->addr_base + RTC_AL_MASK, in mtk_rtc_set_alarm() [all …]
|
A D | rtc-jz4740.c | 57 struct rtc_device *rtc; member 241 rtc_update_irq(rtc->rtc, 1, events); in jz4740_rtc_irq() 318 rtc = devm_kzalloc(dev, sizeof(*rtc), GFP_KERNEL); in jz4740_rtc_probe() 319 if (!rtc) in jz4740_rtc_probe() 329 if (IS_ERR(rtc->base)) in jz4740_rtc_probe() 362 rtc->rtc = devm_rtc_allocate_device(dev); in jz4740_rtc_probe() 363 if (IS_ERR(rtc->rtc)) { in jz4740_rtc_probe() 364 ret = PTR_ERR(rtc->rtc); in jz4740_rtc_probe() 369 rtc->rtc->ops = &jz4740_rtc_ops; in jz4740_rtc_probe() 370 rtc->rtc->range_max = U32_MAX; in jz4740_rtc_probe() [all …]
|
A D | .built-in.a.cmd | 1 …rtc/built-in.a := echo >/dev/null; rm -f drivers/rtc/built-in.a; /usr/bin/ccache /home/test/worksp…
|
A D | rtc-fsl-ftm-alarm.c | 111 rtc_writel(rtc, FTM_SC, rtc_readl(rtc, FTM_SC) & (~FTM_SC_TOF)); in ftm_irq_acknowledge() 159 ftm_irq_disable(rtc); in ftm_rtc_alarm_interrupt() 160 ftm_clean_alarm(rtc); in ftm_rtc_alarm_interrupt() 171 ftm_irq_enable(rtc); in ftm_rtc_alarm_irq_enable() 216 ftm_clean_alarm(rtc); in ftm_rtc_set_alarm() 223 ftm_irq_disable(rtc); in ftm_rtc_set_alarm() 234 ftm_irq_enable(rtc); in ftm_rtc_set_alarm() 251 struct ftm_rtc *rtc; in ftm_rtc_probe() local 253 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); in ftm_rtc_probe() 254 if (unlikely(!rtc)) { in ftm_rtc_probe() [all …]
|
A D | rtc-pcf50633.c | 105 struct pcf50633_rtc *rtc; in pcf50633_rtc_read_time() local 136 struct pcf50633_rtc *rtc; in pcf50633_rtc_set_time() local 173 struct pcf50633_rtc *rtc; in pcf50633_rtc_read_alarm() local 196 struct pcf50633_rtc *rtc; in pcf50633_rtc_set_alarm() local 217 rtc->alarm_pending = 0; in pcf50633_rtc_set_alarm() 239 rtc->alarm_pending = 1; in pcf50633_rtc_irq() 244 struct pcf50633_rtc *rtc; in pcf50633_rtc_probe() local 246 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); in pcf50633_rtc_probe() 247 if (!rtc) in pcf50633_rtc_probe() 255 if (IS_ERR(rtc->rtc_dev)) in pcf50633_rtc_probe() [all …]
|
A D | rtc-ftrtc010.c | 113 struct ftrtc010_rtc *rtc; in ftrtc010_rtc_probe() local 118 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); in ftrtc010_rtc_probe() 119 if (unlikely(!rtc)) in ftrtc010_rtc_probe() 124 if (IS_ERR(rtc->pclk)) { in ftrtc010_rtc_probe() 134 if (IS_ERR(rtc->extclk)) { in ftrtc010_rtc_probe() 148 rtc->rtc_irq = res->start; in ftrtc010_rtc_probe() 156 if (!rtc->rtc_base) in ftrtc010_rtc_probe() 160 if (IS_ERR(rtc->rtc_dev)) in ftrtc010_rtc_probe() 172 rtc->rtc_dev->range_max = U32_MAX + rtc->rtc_dev->range_min; in ftrtc010_rtc_probe() 186 if (!IS_ERR(rtc->extclk)) in ftrtc010_rtc_remove() [all …]
|
A D | rtc-pl030.c | 24 struct rtc_device *rtc; member 94 rtc = devm_kzalloc(&dev->dev, sizeof(*rtc), GFP_KERNEL); in pl030_probe() 95 if (!rtc) { in pl030_probe() 100 rtc->rtc = devm_rtc_allocate_device(&dev->dev); in pl030_probe() 101 if (IS_ERR(rtc->rtc)) { in pl030_probe() 102 ret = PTR_ERR(rtc->rtc); in pl030_probe() 106 rtc->rtc->ops = &pl030_ops; in pl030_probe() 107 rtc->rtc->range_max = U32_MAX; in pl030_probe() 109 if (!rtc->base) { in pl030_probe() 124 ret = devm_rtc_register_device(rtc->rtc); in pl030_probe() [all …]
|
/linux/arch/m68k/bvme6000/ |
A D | config.c | 172 msr = rtc->msr & 0xc0; in bvme6000_timer_int() 208 rtc->irr_icr1 = 0; in bvme6000_sched_init() 214 rtc->msr = msr; in bvme6000_sched_init() 242 msr = rtc->msr & 0xc0; in bvme6000_read_clk() 247 t1int = rtc->msr & 0x20; in bvme6000_read_clk() 262 rtc->msr = msr; in bvme6000_read_clk() 295 rtc->t0cr_rtmr = t->tm_year%4; in bvme6000_hwclk() 296 rtc->bcd_tenms = 0; in bvme6000_hwclk() 297 rtc->bcd_sec = bin2bcd(t->tm_sec); in bvme6000_hwclk() 298 rtc->bcd_min = bin2bcd(t->tm_min); in bvme6000_hwclk() [all …]
|