rtc 202 arch/alpha/kernel/rtc.c struct rtc_device *rtc; rtc 207 arch/alpha/kernel/rtc.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 208 arch/alpha/kernel/rtc.c if (IS_ERR(rtc)) rtc 209 arch/alpha/kernel/rtc.c return PTR_ERR(rtc); rtc 211 arch/alpha/kernel/rtc.c platform_set_drvdata(pdev, rtc); rtc 212 arch/alpha/kernel/rtc.c rtc->ops = &alpha_rtc_ops; rtc 216 arch/alpha/kernel/rtc.c rtc->ops = &remote_rtc_ops; rtc 219 arch/alpha/kernel/rtc.c return rtc_register_device(rtc); rtc 312 arch/arc/include/asm/arcregs.h timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4; rtc 183 arch/arc/kernel/setup.c cpu->extn.rtc = timer.rtc; rtc 291 arch/arc/kernel/setup.c IS_AVAIL2(cpu->extn.rtc, "RTC [UP 64-bit] ", CONFIG_ARC_TIMERS_64BIT), rtc 58 arch/arm/mach-mmp/clock-pxa168.c static APBC_CLK(rtc, RTC, 8, 32768); rtc 45 arch/arm/mach-mmp/clock-pxa910.c static APBC_CLK(rtc, RTC, 8, 32768); rtc 210 arch/m68k/apollo/config.c t->tm_sec=rtc->second; rtc 211 arch/m68k/apollo/config.c t->tm_min=rtc->minute; rtc 212 arch/m68k/apollo/config.c t->tm_hour=rtc->hours; rtc 213 arch/m68k/apollo/config.c t->tm_mday=rtc->day_of_month; rtc 214 arch/m68k/apollo/config.c t->tm_wday=rtc->day_of_week; rtc 215 arch/m68k/apollo/config.c t->tm_mon = rtc->month - 1; rtc 216 arch/m68k/apollo/config.c t->tm_year=rtc->year; rtc 220 arch/m68k/apollo/config.c rtc->second=t->tm_sec; rtc 221 arch/m68k/apollo/config.c rtc->minute=t->tm_min; rtc 222 arch/m68k/apollo/config.c rtc->hours=t->tm_hour; rtc 223 arch/m68k/apollo/config.c rtc->day_of_month=t->tm_mday; rtc 225 arch/m68k/apollo/config.c rtc->day_of_week=t->tm_wday; rtc 226 arch/m68k/apollo/config.c rtc->month = t->tm_mon + 1; rtc 227 arch/m68k/apollo/config.c rtc->year = t->tm_year % 100; rtc 171 arch/m68k/bvme6000/config.c volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; rtc 175 arch/m68k/bvme6000/config.c msr = rtc->msr & 0xc0; rtc 176 arch/m68k/bvme6000/config.c rtc->msr = msr | 0x20; /* Ack the interrupt */ rtc 196 arch/m68k/bvme6000/config.c volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; rtc 197 arch/m68k/bvme6000/config.c unsigned char msr = rtc->msr & 0xc0; rtc 199 arch/m68k/bvme6000/config.c rtc->msr = 0; /* Ensure timer registers accessible */ rtc 205 arch/m68k/bvme6000/config.c rtc->t1cr_omr = 0x04; /* Mode 2, ext clk */ rtc 206 arch/m68k/bvme6000/config.c rtc->t1msb = RTC_TIMER_COUNT >> 8; rtc 207 arch/m68k/bvme6000/config.c rtc->t1lsb = RTC_TIMER_COUNT & 0xff; rtc 208 arch/m68k/bvme6000/config.c rtc->irr_icr1 &= 0xef; /* Route timer 1 to INTR pin */ rtc 209 arch/m68k/bvme6000/config.c rtc->msr = 0x40; /* Access int.cntrl, etc */ rtc 210 arch/m68k/bvme6000/config.c rtc->pfr_icr0 = 0x80; /* Just timer 1 ints enabled */ rtc 211 arch/m68k/bvme6000/config.c rtc->irr_icr1 = 0; rtc 212 arch/m68k/bvme6000/config.c rtc->t1cr_omr = 0x0a; /* INTR+T1 active lo, push-pull */ rtc 213 arch/m68k/bvme6000/config.c rtc->t0cr_rtmr &= 0xdf; /* Stop timers in standby */ rtc 214 arch/m68k/bvme6000/config.c rtc->msr = 0; /* Access timer 1 control */ rtc 215 arch/m68k/bvme6000/config.c rtc->t1cr_omr = 0x05; /* Mode 2, ext clk, GO */ rtc 217 arch/m68k/bvme6000/config.c rtc->msr = msr; rtc 237 arch/m68k/bvme6000/config.c volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; rtc 245 arch/m68k/bvme6000/config.c msr = rtc->msr & 0xc0; rtc 246 arch/m68k/bvme6000/config.c rtc->msr = 0; /* Ensure timer registers accessible */ rtc 250 arch/m68k/bvme6000/config.c t1int = rtc->msr & 0x20; rtc 252 arch/m68k/bvme6000/config.c rtc->t1cr_omr |= 0x40; /* Latch timer1 */ rtc 253 arch/m68k/bvme6000/config.c msb = rtc->t1msb; /* Read timer1 */ rtc 254 arch/m68k/bvme6000/config.c v = (msb << 8) | rtc->t1lsb; /* Read timer1 */ rtc 255 arch/m68k/bvme6000/config.c } while (t1int != (rtc->msr & 0x20) || rtc 265 arch/m68k/bvme6000/config.c rtc->msr = msr; rtc 291 arch/m68k/bvme6000/config.c volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; rtc 292 arch/m68k/bvme6000/config.c unsigned char msr = rtc->msr & 0xc0; rtc 294 arch/m68k/bvme6000/config.c rtc->msr = 0x40; /* Ensure clock and real-time-mode-register rtc 298 arch/m68k/bvme6000/config.c rtc->t0cr_rtmr = t->tm_year%4; rtc 299 arch/m68k/bvme6000/config.c rtc->bcd_tenms = 0; rtc 300 arch/m68k/bvme6000/config.c rtc->bcd_sec = bin2bcd(t->tm_sec); rtc 301 arch/m68k/bvme6000/config.c rtc->bcd_min = bin2bcd(t->tm_min); rtc 302 arch/m68k/bvme6000/config.c rtc->bcd_hr = bin2bcd(t->tm_hour); rtc 303 arch/m68k/bvme6000/config.c rtc->bcd_dom = bin2bcd(t->tm_mday); rtc 304 arch/m68k/bvme6000/config.c rtc->bcd_mth = bin2bcd(t->tm_mon + 1); rtc 305 arch/m68k/bvme6000/config.c rtc->bcd_year = bin2bcd(t->tm_year%100); rtc 307 arch/m68k/bvme6000/config.c rtc->bcd_dow = bin2bcd(t->tm_wday+1); rtc 308 arch/m68k/bvme6000/config.c rtc->t0cr_rtmr = t->tm_year%4 | 0x08; rtc 313 arch/m68k/bvme6000/config.c t->tm_sec = bcd2bin(rtc->bcd_sec); rtc 314 arch/m68k/bvme6000/config.c t->tm_min = bcd2bin(rtc->bcd_min); rtc 315 arch/m68k/bvme6000/config.c t->tm_hour = bcd2bin(rtc->bcd_hr); rtc 316 arch/m68k/bvme6000/config.c t->tm_mday = bcd2bin(rtc->bcd_dom); rtc 317 arch/m68k/bvme6000/config.c t->tm_mon = bcd2bin(rtc->bcd_mth)-1; rtc 318 arch/m68k/bvme6000/config.c t->tm_year = bcd2bin(rtc->bcd_year); rtc 321 arch/m68k/bvme6000/config.c t->tm_wday = bcd2bin(rtc->bcd_dow)-1; rtc 322 arch/m68k/bvme6000/config.c } while (t->tm_sec != bcd2bin(rtc->bcd_sec)); rtc 325 arch/m68k/bvme6000/config.c rtc->msr = msr; rtc 41 arch/m68k/bvme6000/rtc.c volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; rtc 52 arch/m68k/bvme6000/rtc.c msr = rtc->msr & 0xc0; rtc 53 arch/m68k/bvme6000/rtc.c rtc->msr = 0x40; rtc 56 arch/m68k/bvme6000/rtc.c wtime.tm_sec = bcd2bin(rtc->bcd_sec); rtc 57 arch/m68k/bvme6000/rtc.c wtime.tm_min = bcd2bin(rtc->bcd_min); rtc 58 arch/m68k/bvme6000/rtc.c wtime.tm_hour = bcd2bin(rtc->bcd_hr); rtc 59 arch/m68k/bvme6000/rtc.c wtime.tm_mday = bcd2bin(rtc->bcd_dom); rtc 60 arch/m68k/bvme6000/rtc.c wtime.tm_mon = bcd2bin(rtc->bcd_mth)-1; rtc 61 arch/m68k/bvme6000/rtc.c wtime.tm_year = bcd2bin(rtc->bcd_year); rtc 64 arch/m68k/bvme6000/rtc.c wtime.tm_wday = bcd2bin(rtc->bcd_dow)-1; rtc 65 arch/m68k/bvme6000/rtc.c } while (wtime.tm_sec != bcd2bin(rtc->bcd_sec)); rtc 66 arch/m68k/bvme6000/rtc.c rtc->msr = msr; rtc 108 arch/m68k/bvme6000/rtc.c msr = rtc->msr & 0xc0; rtc 109 arch/m68k/bvme6000/rtc.c rtc->msr = 0x40; rtc 111 arch/m68k/bvme6000/rtc.c rtc->t0cr_rtmr = yrs%4; rtc 112 arch/m68k/bvme6000/rtc.c rtc->bcd_tenms = 0; rtc 113 arch/m68k/bvme6000/rtc.c rtc->bcd_sec = bin2bcd(sec); rtc 114 arch/m68k/bvme6000/rtc.c rtc->bcd_min = bin2bcd(min); rtc 115 arch/m68k/bvme6000/rtc.c rtc->bcd_hr = bin2bcd(hrs); rtc 116 arch/m68k/bvme6000/rtc.c rtc->bcd_dom = bin2bcd(day); rtc 117 arch/m68k/bvme6000/rtc.c rtc->bcd_mth = bin2bcd(mon); rtc 118 arch/m68k/bvme6000/rtc.c rtc->bcd_year = bin2bcd(yrs%100); rtc 120 arch/m68k/bvme6000/rtc.c rtc->bcd_dow = bin2bcd(rtc_tm.tm_wday+1); rtc 121 arch/m68k/bvme6000/rtc.c rtc->t0cr_rtmr = yrs%4 | 0x08; rtc 123 arch/m68k/bvme6000/rtc.c rtc->msr = msr; rtc 44 arch/m68k/mvme16x/config.c static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE; rtc 442 arch/m68k/mvme16x/config.c rtc->ctrl = RTC_READ; rtc 443 arch/m68k/mvme16x/config.c t->tm_year = bcd2int (rtc->bcd_year); rtc 444 arch/m68k/mvme16x/config.c t->tm_mon = bcd2int(rtc->bcd_mth) - 1; rtc 445 arch/m68k/mvme16x/config.c t->tm_mday = bcd2int (rtc->bcd_dom); rtc 446 arch/m68k/mvme16x/config.c t->tm_hour = bcd2int (rtc->bcd_hr); rtc 447 arch/m68k/mvme16x/config.c t->tm_min = bcd2int (rtc->bcd_min); rtc 448 arch/m68k/mvme16x/config.c t->tm_sec = bcd2int (rtc->bcd_sec); rtc 449 arch/m68k/mvme16x/config.c rtc->ctrl = 0; rtc 40 arch/m68k/mvme16x/rtc.c volatile MK48T08ptr_t rtc = (MK48T08ptr_t)MVME_RTC_BASE; rtc 50 arch/m68k/mvme16x/rtc.c rtc->ctrl = RTC_READ; rtc 52 arch/m68k/mvme16x/rtc.c wtime.tm_sec = bcd2bin(rtc->bcd_sec); rtc 53 arch/m68k/mvme16x/rtc.c wtime.tm_min = bcd2bin(rtc->bcd_min); rtc 54 arch/m68k/mvme16x/rtc.c wtime.tm_hour = bcd2bin(rtc->bcd_hr); rtc 55 arch/m68k/mvme16x/rtc.c wtime.tm_mday = bcd2bin(rtc->bcd_dom); rtc 56 arch/m68k/mvme16x/rtc.c wtime.tm_mon = bcd2bin(rtc->bcd_mth)-1; rtc 57 arch/m68k/mvme16x/rtc.c wtime.tm_year = bcd2bin(rtc->bcd_year); rtc 60 arch/m68k/mvme16x/rtc.c wtime.tm_wday = bcd2bin(rtc->bcd_dow)-1; rtc 61 arch/m68k/mvme16x/rtc.c rtc->ctrl = 0; rtc 102 arch/m68k/mvme16x/rtc.c rtc->ctrl = RTC_WRITE; rtc 104 arch/m68k/mvme16x/rtc.c rtc->bcd_sec = bin2bcd(sec); rtc 105 arch/m68k/mvme16x/rtc.c rtc->bcd_min = bin2bcd(min); rtc 106 arch/m68k/mvme16x/rtc.c rtc->bcd_hr = bin2bcd(hrs); rtc 107 arch/m68k/mvme16x/rtc.c rtc->bcd_dom = bin2bcd(day); rtc 108 arch/m68k/mvme16x/rtc.c rtc->bcd_mth = bin2bcd(mon); rtc 109 arch/m68k/mvme16x/rtc.c rtc->bcd_year = bin2bcd(yrs%100); rtc 111 arch/m68k/mvme16x/rtc.c rtc->ctrl = 0; rtc 335 arch/mips/include/asm/ip32/mace.h volatile unsigned char rtc[0x10000]; rtc 47 arch/mips/include/asm/mach-rc32434/timer.h u32 rtc; /* use RTC_ */ rtc 95 arch/mips/sgi-ip32/ip32-platform.c #define MACE_RTC_RES_START (MACE_BASE + offsetof(struct sgi_mace, isa.rtc)) rtc 66 arch/powerpc/platforms/powernv/opal-rtc.c struct device_node *rtc; rtc 68 arch/powerpc/platforms/powernv/opal-rtc.c rtc = of_find_node_by_path("/ibm,opal/rtc"); rtc 69 arch/powerpc/platforms/powernv/opal-rtc.c if (rtc) { rtc 70 arch/powerpc/platforms/powernv/opal-rtc.c pdev = of_platform_device_create(rtc, "opal-rtc", NULL); rtc 71 arch/powerpc/platforms/powernv/opal-rtc.c of_node_put(rtc); rtc 231 arch/x86/include/asm/x86_init.h int rtc; rtc 970 arch/x86/kernel/acpi/boot.c x86_platform.legacy.rtc = 0; rtc 153 arch/x86/kernel/jailhouse.c x86_platform.legacy.rtc = 0; rtc 11 arch/x86/kernel/platform-quirks.c x86_platform.legacy.rtc = 1; rtc 22 arch/x86/kernel/platform-quirks.c x86_platform.legacy.rtc = 0; rtc 27 arch/x86/kernel/platform-quirks.c x86_platform.legacy.rtc = 0; rtc 198 arch/x86/kernel/rtc.c if (!x86_platform.legacy.rtc) rtc 23 arch/x86/platform/intel-mid/device_libs/platform_mrfld_rtc.c if (!x86_platform.legacy.rtc) rtc 30 arch/x86/platform/intel-mid/device_libs/platform_mrfld_rtc.c x86_platform.legacy.rtc = 0; rtc 121 arch/x86/platform/intel-mid/intel-mid.c x86_platform.legacy.rtc = 1; rtc 75 arch/x86/platform/olpc/olpc-xo1-rtc.c x86_platform.legacy.rtc = 0; rtc 246 arch/x86/platform/olpc/olpc-xo1-sci.c struct device *rtc = bus_find_device_by_name( rtc 248 arch/x86/platform/olpc/olpc-xo1-sci.c if (rtc) { rtc 249 arch/x86/platform/olpc/olpc-xo1-sci.c pm_wakeup_event(rtc, 0); rtc 250 arch/x86/platform/olpc/olpc-xo1-sci.c put_device(rtc); rtc 239 arch/x86/xen/enlighten_hvm.c (x86_platform.legacy.rtc || !x86_platform.legacy.no_vga)) rtc 1183 arch/x86/xen/enlighten_pv.c x86_platform.legacy.rtc = 1; rtc 137 drivers/clk/mxs/clk-imx23.c clks[rtc] = mxs_clk_fixed_factor("rtc", "ref_xtal", 1, 768); rtc 207 drivers/clk/mxs/clk-imx28.c clks[rtc] = mxs_clk_fixed_factor("rtc", "ref_xtal", 1, 768); rtc 132 drivers/clk/sirf/clk-atlas6.c atlas6_clks[rtc] = clk_register_fixed_rate(NULL, "rtc", NULL, 0, 32768); rtc 131 drivers/clk/sirf/clk-prima2.c prima2_clks[rtc] = clk_register_fixed_rate(NULL, "rtc", NULL, 0, 32768); rtc 167 drivers/clocksource/arc_timer.c if (!timer.rtc) { rtc 337 drivers/mfd/88pm800.c rtc_devs[0].platform_data = pdata->rtc; rtc 339 drivers/mfd/88pm800.c pdata->rtc ? sizeof(struct pm80x_rtc_pdata) : 0; rtc 497 drivers/mfd/88pm800.c if (pdata && pdata->rtc) rtc 498 drivers/mfd/88pm800.c pdata->rtc->rtc_wakeup = 1; rtc 878 drivers/mfd/88pm860x-core.c rtc_devs[0].platform_data = pdata->rtc; rtc 492 drivers/mfd/max8925-core.c i2c = chip->rtc; rtc 521 drivers/mfd/max8925-core.c i2c = chip->rtc; rtc 611 drivers/mfd/max8925-core.c max8925_reg_write(chip->rtc, MAX8925_RTC_IRQ_MASK, irq_rtc); rtc 673 drivers/mfd/max8925-core.c max8925_reg_read(chip->rtc, MAX8925_RTC_IRQ); rtc 676 drivers/mfd/max8925-core.c max8925_reg_write(chip->rtc, MAX8925_ALARM0_CNTL, 0); rtc 677 drivers/mfd/max8925-core.c max8925_reg_write(chip->rtc, MAX8925_ALARM1_CNTL, 0); rtc 682 drivers/mfd/max8925-core.c max8925_reg_write(chip->rtc, MAX8925_RTC_IRQ_MASK, 0xff); rtc 854 drivers/mfd/max8925-core.c max8925_set_bits(chip->rtc, MAX8925_MPL_CNTL, 1 << 4, 1 << 4); rtc 179 drivers/mfd/max8925-i2c.c chip->rtc = i2c_new_dummy_device(chip->i2c->adapter, RTC_I2C_ADDR); rtc 180 drivers/mfd/max8925-i2c.c if (IS_ERR(chip->rtc)) { rtc 182 drivers/mfd/max8925-i2c.c return PTR_ERR(chip->rtc); rtc 184 drivers/mfd/max8925-i2c.c i2c_set_clientdata(chip->rtc, chip); rtc 189 drivers/mfd/max8925-i2c.c i2c_unregister_device(chip->rtc); rtc 207 drivers/mfd/max8925-i2c.c i2c_unregister_device(chip->rtc); rtc 188 drivers/mfd/max8997.c max8997->rtc = i2c_new_dummy_device(i2c->adapter, I2C_ADDR_RTC); rtc 189 drivers/mfd/max8997.c if (IS_ERR(max8997->rtc)) { rtc 191 drivers/mfd/max8997.c return PTR_ERR(max8997->rtc); rtc 193 drivers/mfd/max8997.c i2c_set_clientdata(max8997->rtc, max8997); rtc 239 drivers/mfd/max8997.c i2c_unregister_device(max8997->rtc); rtc 198 drivers/mfd/max8998.c max8998->rtc = i2c_new_dummy_device(i2c->adapter, RTC_I2C_ADDR); rtc 199 drivers/mfd/max8998.c if (IS_ERR(max8998->rtc)) { rtc 201 drivers/mfd/max8998.c return PTR_ERR(max8998->rtc); rtc 203 drivers/mfd/max8998.c i2c_set_clientdata(max8998->rtc, max8998); rtc 234 drivers/mfd/max8998.c i2c_unregister_device(max8998->rtc); rtc 158 drivers/mfd/menelaus.c struct rtc_device *rtc; rtc 1012 drivers/mfd/menelaus.c rtc_update_irq(m->rtc, 1, RTC_IRQF | RTC_UF); rtc 1074 drivers/mfd/menelaus.c rtc_update_irq(m->rtc, 1, RTC_IRQF | RTC_AF); rtc 1092 drivers/mfd/menelaus.c m->rtc = devm_rtc_allocate_device(&m->client->dev); rtc 1093 drivers/mfd/menelaus.c if (IS_ERR(m->rtc)) rtc 1096 drivers/mfd/menelaus.c m->rtc->ops = &menelaus_rtc_ops; rtc 1122 drivers/mfd/menelaus.c err = rtc_register_device(m->rtc); rtc 1128 drivers/mfd/menelaus.c the_menelaus->rtc = NULL; rtc 430 drivers/mfd/wm8350-core.c wm8350_client_dev_register(wm8350, "wm8350-rtc", &(wm8350->rtc.pdev)); rtc 1166 drivers/net/ethernet/i825xx/82596.c volatile unsigned char *rtc = (unsigned char *) BVME_RTC_BASE; rtc 1167 drivers/net/ethernet/i825xx/82596.c unsigned char msr = rtc[3]; rtc 1170 drivers/net/ethernet/i825xx/82596.c rtc[3] |= 0x80; rtc 1172 drivers/net/ethernet/i825xx/82596.c eth_addr[i] = rtc[i * 4 + 7]; /* Stored in RTC RAM at offset 1 */ rtc 1173 drivers/net/ethernet/i825xx/82596.c rtc[3] = msr; rtc 5943 drivers/net/wireless/intel/ipw2x00/ipw2100.c u32 rtc = 0xa5a5a5a5; rtc 5944 drivers/net/wireless/intel/ipw2x00/ipw2100.c u32 len = sizeof(rtc); rtc 5955 drivers/net/wireless/intel/ipw2x00/ipw2100.c } else if (ipw2100_get_ordinal(priv, IPW_ORD_RTC_TIME, &rtc, &len) || rtc 5956 drivers/net/wireless/intel/ipw2x00/ipw2100.c (rtc == priv->last_rtc)) { rtc 5973 drivers/net/wireless/intel/ipw2x00/ipw2100.c priv->last_rtc = rtc; rtc 1595 drivers/net/wireless/intel/ipw2x00/ipw2200.c static DEVICE_ATTR(rtc, 0644, show_rtc, NULL); rtc 28 drivers/rtc/class.c struct rtc_device *rtc = to_rtc_device(dev); rtc 30 drivers/rtc/class.c ida_simple_remove(&rtc_ida, rtc->id); rtc 31 drivers/rtc/class.c kfree(rtc); rtc 49 drivers/rtc/class.c struct rtc_device *rtc = to_rtc_device(dev); rtc 57 drivers/rtc/class.c if (strcmp(dev_name(&rtc->dev), CONFIG_RTC_HCTOSYS_DEVICE) != 0) rtc 61 drivers/rtc/class.c err = rtc_read_time(rtc, &tm); rtc 63 drivers/rtc/class.c pr_debug("%s: fail to read rtc time\n", dev_name(&rtc->dev)); rtc 94 drivers/rtc/class.c struct rtc_device *rtc = to_rtc_device(dev); rtc 104 drivers/rtc/class.c if (strcmp(dev_name(&rtc->dev), CONFIG_RTC_HCTOSYS_DEVICE) != 0) rtc 109 drivers/rtc/class.c err = rtc_read_time(rtc, &tm); rtc 111 drivers/rtc/class.c pr_debug("%s: fail to read rtc time\n", dev_name(&rtc->dev)); rtc 119 drivers/rtc/class.c pr_debug("%s: time travel!\n", dev_name(&rtc->dev)); rtc 151 drivers/rtc/class.c struct rtc_device *rtc; rtc 153 drivers/rtc/class.c rtc = kzalloc(sizeof(*rtc), GFP_KERNEL); rtc 154 drivers/rtc/class.c if (!rtc) rtc 157 drivers/rtc/class.c device_initialize(&rtc->dev); rtc 160 drivers/rtc/class.c rtc->set_offset_nsec = NSEC_PER_SEC / 2; rtc 162 drivers/rtc/class.c rtc->irq_freq = 1; rtc 163 drivers/rtc/class.c rtc->max_user_freq = 64; rtc 164 drivers/rtc/class.c rtc->dev.class = rtc_class; rtc 165 drivers/rtc/class.c rtc->dev.groups = rtc_get_dev_attribute_groups(); rtc 166 drivers/rtc/class.c rtc->dev.release = rtc_device_release; rtc 168 drivers/rtc/class.c mutex_init(&rtc->ops_lock); rtc 169 drivers/rtc/class.c spin_lock_init(&rtc->irq_lock); rtc 170 drivers/rtc/class.c init_waitqueue_head(&rtc->irq_queue); rtc 173 drivers/rtc/class.c timerqueue_init_head(&rtc->timerqueue); rtc 174 drivers/rtc/class.c INIT_WORK(&rtc->irqwork, rtc_timer_do_work); rtc 176 drivers/rtc/class.c rtc_timer_init(&rtc->aie_timer, rtc_aie_update_irq, rtc); rtc 178 drivers/rtc/class.c rtc_timer_init(&rtc->uie_rtctimer, rtc_uie_update_irq, rtc); rtc 180 drivers/rtc/class.c hrtimer_init(&rtc->pie_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); rtc 181 drivers/rtc/class.c rtc->pie_timer.function = rtc_pie_update_irq; rtc 182 drivers/rtc/class.c rtc->pie_enabled = 0; rtc 184 drivers/rtc/class.c return rtc; rtc 208 drivers/rtc/class.c static void rtc_device_get_offset(struct rtc_device *rtc) rtc 219 drivers/rtc/class.c if (rtc->range_min == rtc->range_max) rtc 222 drivers/rtc/class.c ret = device_property_read_u32(rtc->dev.parent, "start-year", rtc 225 drivers/rtc/class.c rtc->start_secs = mktime64(start_year, 1, 1, 0, 0, 0); rtc 226 drivers/rtc/class.c rtc->set_start_time = true; rtc 233 drivers/rtc/class.c if (!rtc->set_start_time) rtc 236 drivers/rtc/class.c range_secs = rtc->range_max - rtc->range_min + 1; rtc 264 drivers/rtc/class.c if (rtc->start_secs > rtc->range_max || rtc 265 drivers/rtc/class.c rtc->start_secs + range_secs - 1 < rtc->range_min) rtc 266 drivers/rtc/class.c rtc->offset_secs = rtc->start_secs - rtc->range_min; rtc 267 drivers/rtc/class.c else if (rtc->start_secs > rtc->range_min) rtc 268 drivers/rtc/class.c rtc->offset_secs = range_secs; rtc 269 drivers/rtc/class.c else if (rtc->start_secs < rtc->range_min) rtc 270 drivers/rtc/class.c rtc->offset_secs = -range_secs; rtc 272 drivers/rtc/class.c rtc->offset_secs = 0; rtc 280 drivers/rtc/class.c static void rtc_device_unregister(struct rtc_device *rtc) rtc 282 drivers/rtc/class.c mutex_lock(&rtc->ops_lock); rtc 287 drivers/rtc/class.c rtc_proc_del_device(rtc); rtc 288 drivers/rtc/class.c cdev_device_del(&rtc->char_dev, &rtc->dev); rtc 289 drivers/rtc/class.c rtc->ops = NULL; rtc 290 drivers/rtc/class.c mutex_unlock(&rtc->ops_lock); rtc 291 drivers/rtc/class.c put_device(&rtc->dev); rtc 296 drivers/rtc/class.c struct rtc_device *rtc = *(struct rtc_device **)res; rtc 298 drivers/rtc/class.c rtc_nvmem_unregister(rtc); rtc 300 drivers/rtc/class.c if (rtc->registered) rtc 301 drivers/rtc/class.c rtc_device_unregister(rtc); rtc 303 drivers/rtc/class.c put_device(&rtc->dev); rtc 308 drivers/rtc/class.c struct rtc_device **ptr, *rtc; rtc 321 drivers/rtc/class.c rtc = rtc_allocate_device(); rtc 322 drivers/rtc/class.c if (!rtc) { rtc 327 drivers/rtc/class.c *ptr = rtc; rtc 330 drivers/rtc/class.c rtc->id = id; rtc 331 drivers/rtc/class.c rtc->dev.parent = dev; rtc 332 drivers/rtc/class.c dev_set_name(&rtc->dev, "rtc%d", id); rtc 334 drivers/rtc/class.c return rtc; rtc 344 drivers/rtc/class.c int __rtc_register_device(struct module *owner, struct rtc_device *rtc) rtc 349 drivers/rtc/class.c if (!rtc->ops) { rtc 350 drivers/rtc/class.c dev_dbg(&rtc->dev, "no ops set\n"); rtc 354 drivers/rtc/class.c rtc->owner = owner; rtc 355 drivers/rtc/class.c rtc_device_get_offset(rtc); rtc 358 drivers/rtc/class.c err = __rtc_read_alarm(rtc, &alrm); rtc 360 drivers/rtc/class.c rtc_initialize_alarm(rtc, &alrm); rtc 362 drivers/rtc/class.c rtc_dev_prepare(rtc); rtc 364 drivers/rtc/class.c err = cdev_device_add(&rtc->char_dev, &rtc->dev); rtc 366 drivers/rtc/class.c dev_warn(rtc->dev.parent, "failed to add char device %d:%d\n", rtc 367 drivers/rtc/class.c MAJOR(rtc->dev.devt), rtc->id); rtc 369 drivers/rtc/class.c dev_dbg(rtc->dev.parent, "char device (%d:%d)\n", rtc 370 drivers/rtc/class.c MAJOR(rtc->dev.devt), rtc->id); rtc 372 drivers/rtc/class.c rtc_proc_add_device(rtc); rtc 374 drivers/rtc/class.c rtc->registered = true; rtc 375 drivers/rtc/class.c dev_info(rtc->dev.parent, "registered as %s\n", rtc 376 drivers/rtc/class.c dev_name(&rtc->dev)); rtc 401 drivers/rtc/class.c struct rtc_device *rtc; rtc 404 drivers/rtc/class.c rtc = devm_rtc_allocate_device(dev); rtc 405 drivers/rtc/class.c if (IS_ERR(rtc)) rtc 406 drivers/rtc/class.c return rtc; rtc 408 drivers/rtc/class.c rtc->ops = ops; rtc 410 drivers/rtc/class.c err = __rtc_register_device(owner, rtc); rtc 414 drivers/rtc/class.c return rtc; rtc 24 drivers/rtc/dev.c struct rtc_device *rtc = container_of(inode->i_cdev, rtc 27 drivers/rtc/dev.c if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) rtc 30 drivers/rtc/dev.c file->private_data = rtc; rtc 32 drivers/rtc/dev.c spin_lock_irq(&rtc->irq_lock); rtc 33 drivers/rtc/dev.c rtc->irq_data = 0; rtc 34 drivers/rtc/dev.c spin_unlock_irq(&rtc->irq_lock); rtc 46 drivers/rtc/dev.c struct rtc_device *rtc = rtc 52 drivers/rtc/dev.c err = rtc_read_time(rtc, &tm); rtc 54 drivers/rtc/dev.c spin_lock_irq(&rtc->irq_lock); rtc 55 drivers/rtc/dev.c if (rtc->stop_uie_polling || err) { rtc 56 drivers/rtc/dev.c rtc->uie_task_active = 0; rtc 57 drivers/rtc/dev.c } else if (rtc->oldsecs != tm.tm_sec) { rtc 58 drivers/rtc/dev.c num = (tm.tm_sec + 60 - rtc->oldsecs) % 60; rtc 59 drivers/rtc/dev.c rtc->oldsecs = tm.tm_sec; rtc 60 drivers/rtc/dev.c rtc->uie_timer.expires = jiffies + HZ - (HZ / 10); rtc 61 drivers/rtc/dev.c rtc->uie_timer_active = 1; rtc 62 drivers/rtc/dev.c rtc->uie_task_active = 0; rtc 63 drivers/rtc/dev.c add_timer(&rtc->uie_timer); rtc 64 drivers/rtc/dev.c } else if (schedule_work(&rtc->uie_task) == 0) { rtc 65 drivers/rtc/dev.c rtc->uie_task_active = 0; rtc 67 drivers/rtc/dev.c spin_unlock_irq(&rtc->irq_lock); rtc 69 drivers/rtc/dev.c rtc_handle_legacy_irq(rtc, num, RTC_UF); rtc 74 drivers/rtc/dev.c struct rtc_device *rtc = from_timer(rtc, t, uie_timer); rtc 77 drivers/rtc/dev.c spin_lock_irqsave(&rtc->irq_lock, flags); rtc 78 drivers/rtc/dev.c rtc->uie_timer_active = 0; rtc 79 drivers/rtc/dev.c rtc->uie_task_active = 1; rtc 80 drivers/rtc/dev.c if ((schedule_work(&rtc->uie_task) == 0)) rtc 81 drivers/rtc/dev.c rtc->uie_task_active = 0; rtc 82 drivers/rtc/dev.c spin_unlock_irqrestore(&rtc->irq_lock, flags); rtc 85 drivers/rtc/dev.c static int clear_uie(struct rtc_device *rtc) rtc 87 drivers/rtc/dev.c spin_lock_irq(&rtc->irq_lock); rtc 88 drivers/rtc/dev.c if (rtc->uie_irq_active) { rtc 89 drivers/rtc/dev.c rtc->stop_uie_polling = 1; rtc 90 drivers/rtc/dev.c if (rtc->uie_timer_active) { rtc 91 drivers/rtc/dev.c spin_unlock_irq(&rtc->irq_lock); rtc 92 drivers/rtc/dev.c del_timer_sync(&rtc->uie_timer); rtc 93 drivers/rtc/dev.c spin_lock_irq(&rtc->irq_lock); rtc 94 drivers/rtc/dev.c rtc->uie_timer_active = 0; rtc 96 drivers/rtc/dev.c if (rtc->uie_task_active) { rtc 97 drivers/rtc/dev.c spin_unlock_irq(&rtc->irq_lock); rtc 99 drivers/rtc/dev.c spin_lock_irq(&rtc->irq_lock); rtc 101 drivers/rtc/dev.c rtc->uie_irq_active = 0; rtc 103 drivers/rtc/dev.c spin_unlock_irq(&rtc->irq_lock); rtc 107 drivers/rtc/dev.c static int set_uie(struct rtc_device *rtc) rtc 112 drivers/rtc/dev.c err = rtc_read_time(rtc, &tm); rtc 115 drivers/rtc/dev.c spin_lock_irq(&rtc->irq_lock); rtc 116 drivers/rtc/dev.c if (!rtc->uie_irq_active) { rtc 117 drivers/rtc/dev.c rtc->uie_irq_active = 1; rtc 118 drivers/rtc/dev.c rtc->stop_uie_polling = 0; rtc 119 drivers/rtc/dev.c rtc->oldsecs = tm.tm_sec; rtc 120 drivers/rtc/dev.c rtc->uie_task_active = 1; rtc 121 drivers/rtc/dev.c if (schedule_work(&rtc->uie_task) == 0) rtc 122 drivers/rtc/dev.c rtc->uie_task_active = 0; rtc 124 drivers/rtc/dev.c rtc->irq_data = 0; rtc 125 drivers/rtc/dev.c spin_unlock_irq(&rtc->irq_lock); rtc 129 drivers/rtc/dev.c int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, unsigned int enabled) rtc 132 drivers/rtc/dev.c return set_uie(rtc); rtc 134 drivers/rtc/dev.c return clear_uie(rtc); rtc 143 drivers/rtc/dev.c struct rtc_device *rtc = file->private_data; rtc 152 drivers/rtc/dev.c add_wait_queue(&rtc->irq_queue, &wait); rtc 156 drivers/rtc/dev.c spin_lock_irq(&rtc->irq_lock); rtc 157 drivers/rtc/dev.c data = rtc->irq_data; rtc 158 drivers/rtc/dev.c rtc->irq_data = 0; rtc 159 drivers/rtc/dev.c spin_unlock_irq(&rtc->irq_lock); rtc 176 drivers/rtc/dev.c remove_wait_queue(&rtc->irq_queue, &wait); rtc 192 drivers/rtc/dev.c struct rtc_device *rtc = file->private_data; rtc 195 drivers/rtc/dev.c poll_wait(file, &rtc->irq_queue, wait); rtc 197 drivers/rtc/dev.c data = rtc->irq_data; rtc 206 drivers/rtc/dev.c struct rtc_device *rtc = file->private_data; rtc 207 drivers/rtc/dev.c const struct rtc_class_ops *ops = rtc->ops; rtc 212 drivers/rtc/dev.c err = mutex_lock_interruptible(&rtc->ops_lock); rtc 228 drivers/rtc/dev.c if (arg > rtc->max_user_freq && !capable(CAP_SYS_RESOURCE)) rtc 233 drivers/rtc/dev.c if (rtc->irq_freq > rtc->max_user_freq && rtc 255 drivers/rtc/dev.c mutex_unlock(&rtc->ops_lock); rtc 257 drivers/rtc/dev.c err = rtc_read_alarm(rtc, &alarm); rtc 266 drivers/rtc/dev.c mutex_unlock(&rtc->ops_lock); rtc 293 drivers/rtc/dev.c err = rtc_read_time(rtc, &tm); rtc 315 drivers/rtc/dev.c return rtc_set_alarm(rtc, &alarm); rtc 318 drivers/rtc/dev.c mutex_unlock(&rtc->ops_lock); rtc 320 drivers/rtc/dev.c err = rtc_read_time(rtc, &tm); rtc 329 drivers/rtc/dev.c mutex_unlock(&rtc->ops_lock); rtc 334 drivers/rtc/dev.c return rtc_set_time(rtc, &tm); rtc 337 drivers/rtc/dev.c err = rtc_irq_set_state(rtc, 1); rtc 341 drivers/rtc/dev.c err = rtc_irq_set_state(rtc, 0); rtc 345 drivers/rtc/dev.c mutex_unlock(&rtc->ops_lock); rtc 346 drivers/rtc/dev.c return rtc_alarm_irq_enable(rtc, 1); rtc 349 drivers/rtc/dev.c mutex_unlock(&rtc->ops_lock); rtc 350 drivers/rtc/dev.c return rtc_alarm_irq_enable(rtc, 0); rtc 353 drivers/rtc/dev.c mutex_unlock(&rtc->ops_lock); rtc 354 drivers/rtc/dev.c return rtc_update_irq_enable(rtc, 1); rtc 357 drivers/rtc/dev.c mutex_unlock(&rtc->ops_lock); rtc 358 drivers/rtc/dev.c return rtc_update_irq_enable(rtc, 0); rtc 361 drivers/rtc/dev.c err = rtc_irq_set_freq(rtc, arg); rtc 365 drivers/rtc/dev.c err = put_user(rtc->irq_freq, (unsigned long __user *)uarg); rtc 369 drivers/rtc/dev.c mutex_unlock(&rtc->ops_lock); rtc 373 drivers/rtc/dev.c return rtc_set_alarm(rtc, &alarm); rtc 376 drivers/rtc/dev.c mutex_unlock(&rtc->ops_lock); rtc 377 drivers/rtc/dev.c err = rtc_read_alarm(rtc, &alarm); rtc 388 drivers/rtc/dev.c err = ops->ioctl(rtc->dev.parent, cmd, arg); rtc 398 drivers/rtc/dev.c mutex_unlock(&rtc->ops_lock); rtc 404 drivers/rtc/dev.c struct rtc_device *rtc = file->private_data; rtc 406 drivers/rtc/dev.c return fasync_helper(fd, file, on, &rtc->async_queue); rtc 411 drivers/rtc/dev.c struct rtc_device *rtc = file->private_data; rtc 424 drivers/rtc/dev.c rtc_update_irq_enable(rtc, 0); rtc 425 drivers/rtc/dev.c rtc_irq_set_state(rtc, 0); rtc 427 drivers/rtc/dev.c clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); rtc 444 drivers/rtc/dev.c void rtc_dev_prepare(struct rtc_device *rtc) rtc 449 drivers/rtc/dev.c if (rtc->id >= RTC_DEV_MAX) { rtc 450 drivers/rtc/dev.c dev_dbg(&rtc->dev, "too many RTC devices\n"); rtc 454 drivers/rtc/dev.c rtc->dev.devt = MKDEV(MAJOR(rtc_devt), rtc->id); rtc 457 drivers/rtc/dev.c INIT_WORK(&rtc->uie_task, rtc_uie_task); rtc 458 drivers/rtc/dev.c timer_setup(&rtc->uie_timer, rtc_uie_timer, 0); rtc 461 drivers/rtc/dev.c cdev_init(&rtc->char_dev, &rtc_dev_fops); rtc 462 drivers/rtc/dev.c rtc->char_dev.owner = rtc->owner; rtc 31 drivers/rtc/hctosys.c struct rtc_device *rtc = rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE); rtc 33 drivers/rtc/hctosys.c if (!rtc) { rtc 39 drivers/rtc/hctosys.c err = rtc_read_time(rtc, &tm); rtc 41 drivers/rtc/hctosys.c dev_err(rtc->dev.parent, rtc 57 drivers/rtc/hctosys.c dev_info(rtc->dev.parent, "setting system clock to %ptR UTC (%lld)\n", rtc 61 drivers/rtc/hctosys.c rtc_class_close(rtc); rtc 20 drivers/rtc/interface.c static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer); rtc 21 drivers/rtc/interface.c static void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer); rtc 23 drivers/rtc/interface.c static void rtc_add_offset(struct rtc_device *rtc, struct rtc_time *tm) rtc 27 drivers/rtc/interface.c if (!rtc->offset_secs) rtc 38 drivers/rtc/interface.c if ((rtc->start_secs > rtc->range_min && secs >= rtc->start_secs) || rtc 39 drivers/rtc/interface.c (rtc->start_secs < rtc->range_min && rtc 40 drivers/rtc/interface.c secs <= (rtc->start_secs + rtc->range_max - rtc->range_min))) rtc 43 drivers/rtc/interface.c rtc_time64_to_tm(secs + rtc->offset_secs, tm); rtc 46 drivers/rtc/interface.c static void rtc_subtract_offset(struct rtc_device *rtc, struct rtc_time *tm) rtc 50 drivers/rtc/interface.c if (!rtc->offset_secs) rtc 61 drivers/rtc/interface.c if (secs >= rtc->range_min && secs <= rtc->range_max) rtc 64 drivers/rtc/interface.c rtc_time64_to_tm(secs - rtc->offset_secs, tm); rtc 67 drivers/rtc/interface.c static int rtc_valid_range(struct rtc_device *rtc, struct rtc_time *tm) rtc 69 drivers/rtc/interface.c if (rtc->range_min != rtc->range_max) { rtc 71 drivers/rtc/interface.c time64_t range_min = rtc->set_start_time ? rtc->start_secs : rtc 72 drivers/rtc/interface.c rtc->range_min; rtc 73 drivers/rtc/interface.c time64_t range_max = rtc->set_start_time ? rtc 74 drivers/rtc/interface.c (rtc->start_secs + rtc->range_max - rtc->range_min) : rtc 75 drivers/rtc/interface.c rtc->range_max; rtc 84 drivers/rtc/interface.c static int __rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm) rtc 88 drivers/rtc/interface.c if (!rtc->ops) { rtc 90 drivers/rtc/interface.c } else if (!rtc->ops->read_time) { rtc 94 drivers/rtc/interface.c err = rtc->ops->read_time(rtc->dev.parent, tm); rtc 96 drivers/rtc/interface.c dev_dbg(&rtc->dev, "read_time: fail to read: %d\n", rtc 101 drivers/rtc/interface.c rtc_add_offset(rtc, tm); rtc 105 drivers/rtc/interface.c dev_dbg(&rtc->dev, "read_time: rtc_time isn't valid\n"); rtc 110 drivers/rtc/interface.c int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm) rtc 114 drivers/rtc/interface.c err = mutex_lock_interruptible(&rtc->ops_lock); rtc 118 drivers/rtc/interface.c err = __rtc_read_time(rtc, tm); rtc 119 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 126 drivers/rtc/interface.c int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm) rtc 134 drivers/rtc/interface.c err = rtc_valid_range(rtc, tm); rtc 138 drivers/rtc/interface.c rtc_subtract_offset(rtc, tm); rtc 141 drivers/rtc/interface.c uie = rtc->uie_rtctimer.enabled || rtc->uie_irq_active; rtc 143 drivers/rtc/interface.c uie = rtc->uie_rtctimer.enabled; rtc 146 drivers/rtc/interface.c err = rtc_update_irq_enable(rtc, 0); rtc 151 drivers/rtc/interface.c err = mutex_lock_interruptible(&rtc->ops_lock); rtc 155 drivers/rtc/interface.c if (!rtc->ops) rtc 157 drivers/rtc/interface.c else if (rtc->ops->set_time) rtc 158 drivers/rtc/interface.c err = rtc->ops->set_time(rtc->dev.parent, tm); rtc 162 drivers/rtc/interface.c pm_stay_awake(rtc->dev.parent); rtc 163 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 165 drivers/rtc/interface.c schedule_work(&rtc->irqwork); rtc 168 drivers/rtc/interface.c err = rtc_update_irq_enable(rtc, 1); rtc 178 drivers/rtc/interface.c static int rtc_read_alarm_internal(struct rtc_device *rtc, rtc 183 drivers/rtc/interface.c err = mutex_lock_interruptible(&rtc->ops_lock); rtc 187 drivers/rtc/interface.c if (!rtc->ops) { rtc 189 drivers/rtc/interface.c } else if (!rtc->ops->read_alarm) { rtc 203 drivers/rtc/interface.c err = rtc->ops->read_alarm(rtc->dev.parent, alarm); rtc 206 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 212 drivers/rtc/interface.c int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) rtc 263 drivers/rtc/interface.c err = rtc_read_time(rtc, &before); rtc 272 drivers/rtc/interface.c err = rtc_read_alarm_internal(rtc, alarm); rtc 278 drivers/rtc/interface.c rtc_add_offset(rtc, &alarm->time); rtc 283 drivers/rtc/interface.c err = rtc_read_time(rtc, &now); rtc 339 drivers/rtc/interface.c dev_dbg(&rtc->dev, "alarm rollover: %s\n", "day"); rtc 350 drivers/rtc/interface.c dev_dbg(&rtc->dev, "alarm rollover: %s\n", "month"); rtc 365 drivers/rtc/interface.c dev_dbg(&rtc->dev, "alarm rollover: %s\n", "year"); rtc 373 drivers/rtc/interface.c dev_warn(&rtc->dev, "alarm rollover not handled\n"); rtc 380 drivers/rtc/interface.c dev_warn(&rtc->dev, "invalid alarm value: %ptR\n", rtc 386 drivers/rtc/interface.c int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) rtc 390 drivers/rtc/interface.c err = mutex_lock_interruptible(&rtc->ops_lock); rtc 393 drivers/rtc/interface.c if (!rtc->ops) { rtc 395 drivers/rtc/interface.c } else if (!rtc->ops->read_alarm) { rtc 399 drivers/rtc/interface.c alarm->enabled = rtc->aie_timer.enabled; rtc 400 drivers/rtc/interface.c alarm->time = rtc_ktime_to_tm(rtc->aie_timer.node.expires); rtc 402 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 409 drivers/rtc/interface.c static int __rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) rtc 422 drivers/rtc/interface.c err = __rtc_read_time(rtc, &tm); rtc 435 drivers/rtc/interface.c rtc_subtract_offset(rtc, &alarm->time); rtc 437 drivers/rtc/interface.c if (!rtc->ops) rtc 439 drivers/rtc/interface.c else if (!rtc->ops->set_alarm) rtc 442 drivers/rtc/interface.c err = rtc->ops->set_alarm(rtc->dev.parent, alarm); rtc 448 drivers/rtc/interface.c int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) rtc 452 drivers/rtc/interface.c if (!rtc->ops) rtc 454 drivers/rtc/interface.c else if (!rtc->ops->set_alarm) rtc 461 drivers/rtc/interface.c err = rtc_valid_range(rtc, &alarm->time); rtc 465 drivers/rtc/interface.c err = mutex_lock_interruptible(&rtc->ops_lock); rtc 468 drivers/rtc/interface.c if (rtc->aie_timer.enabled) rtc 469 drivers/rtc/interface.c rtc_timer_remove(rtc, &rtc->aie_timer); rtc 471 drivers/rtc/interface.c rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); rtc 472 drivers/rtc/interface.c rtc->aie_timer.period = 0; rtc 474 drivers/rtc/interface.c err = rtc_timer_enqueue(rtc, &rtc->aie_timer); rtc 476 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 483 drivers/rtc/interface.c int rtc_initialize_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) rtc 492 drivers/rtc/interface.c err = rtc_read_time(rtc, &now); rtc 496 drivers/rtc/interface.c err = mutex_lock_interruptible(&rtc->ops_lock); rtc 500 drivers/rtc/interface.c rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); rtc 501 drivers/rtc/interface.c rtc->aie_timer.period = 0; rtc 505 drivers/rtc/interface.c rtc->aie_timer.node.expires)) { rtc 506 drivers/rtc/interface.c rtc->aie_timer.enabled = 1; rtc 507 drivers/rtc/interface.c timerqueue_add(&rtc->timerqueue, &rtc->aie_timer.node); rtc 508 drivers/rtc/interface.c trace_rtc_timer_enqueue(&rtc->aie_timer); rtc 510 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 515 drivers/rtc/interface.c int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled) rtc 519 drivers/rtc/interface.c err = mutex_lock_interruptible(&rtc->ops_lock); rtc 523 drivers/rtc/interface.c if (rtc->aie_timer.enabled != enabled) { rtc 525 drivers/rtc/interface.c err = rtc_timer_enqueue(rtc, &rtc->aie_timer); rtc 527 drivers/rtc/interface.c rtc_timer_remove(rtc, &rtc->aie_timer); rtc 532 drivers/rtc/interface.c else if (!rtc->ops) rtc 534 drivers/rtc/interface.c else if (!rtc->ops->alarm_irq_enable) rtc 537 drivers/rtc/interface.c err = rtc->ops->alarm_irq_enable(rtc->dev.parent, enabled); rtc 539 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 546 drivers/rtc/interface.c int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled) rtc 550 drivers/rtc/interface.c err = mutex_lock_interruptible(&rtc->ops_lock); rtc 555 drivers/rtc/interface.c if (enabled == 0 && rtc->uie_irq_active) { rtc 556 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 557 drivers/rtc/interface.c return rtc_dev_update_irq_enable_emul(rtc, 0); rtc 561 drivers/rtc/interface.c if (rtc->uie_rtctimer.enabled == enabled) rtc 564 drivers/rtc/interface.c if (rtc->uie_unsupported) { rtc 573 drivers/rtc/interface.c __rtc_read_time(rtc, &tm); rtc 576 drivers/rtc/interface.c rtc->uie_rtctimer.node.expires = ktime_add(now, onesec); rtc 577 drivers/rtc/interface.c rtc->uie_rtctimer.period = ktime_set(1, 0); rtc 578 drivers/rtc/interface.c err = rtc_timer_enqueue(rtc, &rtc->uie_rtctimer); rtc 580 drivers/rtc/interface.c rtc_timer_remove(rtc, &rtc->uie_rtctimer); rtc 584 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 592 drivers/rtc/interface.c err = rtc_dev_update_irq_enable_emul(rtc, enabled); rtc 606 drivers/rtc/interface.c void rtc_handle_legacy_irq(struct rtc_device *rtc, int num, int mode) rtc 611 drivers/rtc/interface.c spin_lock_irqsave(&rtc->irq_lock, flags); rtc 612 drivers/rtc/interface.c rtc->irq_data = (rtc->irq_data + (num << 8)) | (RTC_IRQF | mode); rtc 613 drivers/rtc/interface.c spin_unlock_irqrestore(&rtc->irq_lock, flags); rtc 615 drivers/rtc/interface.c wake_up_interruptible(&rtc->irq_queue); rtc 616 drivers/rtc/interface.c kill_fasync(&rtc->async_queue, SIGIO, POLL_IN); rtc 625 drivers/rtc/interface.c void rtc_aie_update_irq(struct rtc_device *rtc) rtc 627 drivers/rtc/interface.c rtc_handle_legacy_irq(rtc, 1, RTC_AF); rtc 636 drivers/rtc/interface.c void rtc_uie_update_irq(struct rtc_device *rtc) rtc 638 drivers/rtc/interface.c rtc_handle_legacy_irq(rtc, 1, RTC_UF); rtc 651 drivers/rtc/interface.c struct rtc_device *rtc; rtc 655 drivers/rtc/interface.c rtc = container_of(timer, struct rtc_device, pie_timer); rtc 657 drivers/rtc/interface.c period = NSEC_PER_SEC / rtc->irq_freq; rtc 660 drivers/rtc/interface.c rtc_handle_legacy_irq(rtc, count, RTC_PF); rtc 672 drivers/rtc/interface.c void rtc_update_irq(struct rtc_device *rtc, rtc 675 drivers/rtc/interface.c if (IS_ERR_OR_NULL(rtc)) rtc 678 drivers/rtc/interface.c pm_stay_awake(rtc->dev.parent); rtc 679 drivers/rtc/interface.c schedule_work(&rtc->irqwork); rtc 686 drivers/rtc/interface.c struct rtc_device *rtc = NULL; rtc 690 drivers/rtc/interface.c rtc = to_rtc_device(dev); rtc 692 drivers/rtc/interface.c if (rtc) { rtc 693 drivers/rtc/interface.c if (!try_module_get(rtc->owner)) { rtc 695 drivers/rtc/interface.c rtc = NULL; rtc 699 drivers/rtc/interface.c return rtc; rtc 703 drivers/rtc/interface.c void rtc_class_close(struct rtc_device *rtc) rtc 705 drivers/rtc/interface.c module_put(rtc->owner); rtc 706 drivers/rtc/interface.c put_device(&rtc->dev); rtc 710 drivers/rtc/interface.c static int rtc_update_hrtimer(struct rtc_device *rtc, int enabled) rtc 722 drivers/rtc/interface.c if (hrtimer_try_to_cancel(&rtc->pie_timer) < 0) rtc 726 drivers/rtc/interface.c ktime_t period = NSEC_PER_SEC / rtc->irq_freq; rtc 728 drivers/rtc/interface.c hrtimer_start(&rtc->pie_timer, period, HRTIMER_MODE_REL); rtc 742 drivers/rtc/interface.c int rtc_irq_set_state(struct rtc_device *rtc, int enabled) rtc 746 drivers/rtc/interface.c while (rtc_update_hrtimer(rtc, enabled) < 0) rtc 749 drivers/rtc/interface.c rtc->pie_enabled = enabled; rtc 764 drivers/rtc/interface.c int rtc_irq_set_freq(struct rtc_device *rtc, int freq) rtc 771 drivers/rtc/interface.c rtc->irq_freq = freq; rtc 772 drivers/rtc/interface.c while (rtc->pie_enabled && rtc_update_hrtimer(rtc, 1) < 0) rtc 791 drivers/rtc/interface.c static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer) rtc 793 drivers/rtc/interface.c struct timerqueue_node *next = timerqueue_getnext(&rtc->timerqueue); rtc 798 drivers/rtc/interface.c __rtc_read_time(rtc, &tm); rtc 808 drivers/rtc/interface.c timerqueue_add(&rtc->timerqueue, &timer->node); rtc 816 drivers/rtc/interface.c err = __rtc_set_alarm(rtc, &alarm); rtc 818 drivers/rtc/interface.c pm_stay_awake(rtc->dev.parent); rtc 819 drivers/rtc/interface.c schedule_work(&rtc->irqwork); rtc 821 drivers/rtc/interface.c timerqueue_del(&rtc->timerqueue, &timer->node); rtc 830 drivers/rtc/interface.c static void rtc_alarm_disable(struct rtc_device *rtc) rtc 832 drivers/rtc/interface.c if (!rtc->ops || !rtc->ops->alarm_irq_enable) rtc 835 drivers/rtc/interface.c rtc->ops->alarm_irq_enable(rtc->dev.parent, false); rtc 851 drivers/rtc/interface.c static void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer) rtc 853 drivers/rtc/interface.c struct timerqueue_node *next = timerqueue_getnext(&rtc->timerqueue); rtc 855 drivers/rtc/interface.c timerqueue_del(&rtc->timerqueue, &timer->node); rtc 862 drivers/rtc/interface.c next = timerqueue_getnext(&rtc->timerqueue); rtc 864 drivers/rtc/interface.c rtc_alarm_disable(rtc); rtc 869 drivers/rtc/interface.c err = __rtc_set_alarm(rtc, &alarm); rtc 871 drivers/rtc/interface.c pm_stay_awake(rtc->dev.parent); rtc 872 drivers/rtc/interface.c schedule_work(&rtc->irqwork); rtc 894 drivers/rtc/interface.c struct rtc_device *rtc = rtc 897 drivers/rtc/interface.c mutex_lock(&rtc->ops_lock); rtc 899 drivers/rtc/interface.c __rtc_read_time(rtc, &tm); rtc 901 drivers/rtc/interface.c while ((next = timerqueue_getnext(&rtc->timerqueue))) { rtc 907 drivers/rtc/interface.c timerqueue_del(&rtc->timerqueue, &timer->node); rtc 911 drivers/rtc/interface.c timer->func(timer->rtc); rtc 919 drivers/rtc/interface.c timerqueue_add(&rtc->timerqueue, &timer->node); rtc 933 drivers/rtc/interface.c err = __rtc_set_alarm(rtc, &alarm); rtc 941 drivers/rtc/interface.c timerqueue_del(&rtc->timerqueue, &timer->node); rtc 944 drivers/rtc/interface.c dev_err(&rtc->dev, "__rtc_set_alarm: err=%d\n", err); rtc 948 drivers/rtc/interface.c rtc_alarm_disable(rtc); rtc 951 drivers/rtc/interface.c pm_relax(rtc->dev.parent); rtc 952 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 963 drivers/rtc/interface.c struct rtc_device *rtc) rtc 968 drivers/rtc/interface.c timer->rtc = rtc; rtc 979 drivers/rtc/interface.c int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer *timer, rtc 984 drivers/rtc/interface.c mutex_lock(&rtc->ops_lock); rtc 986 drivers/rtc/interface.c rtc_timer_remove(rtc, timer); rtc 991 drivers/rtc/interface.c ret = rtc_timer_enqueue(rtc, timer); rtc 993 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 1003 drivers/rtc/interface.c void rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer) rtc 1005 drivers/rtc/interface.c mutex_lock(&rtc->ops_lock); rtc 1007 drivers/rtc/interface.c rtc_timer_remove(rtc, timer); rtc 1008 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 1022 drivers/rtc/interface.c int rtc_read_offset(struct rtc_device *rtc, long *offset) rtc 1026 drivers/rtc/interface.c if (!rtc->ops) rtc 1029 drivers/rtc/interface.c if (!rtc->ops->read_offset) rtc 1032 drivers/rtc/interface.c mutex_lock(&rtc->ops_lock); rtc 1033 drivers/rtc/interface.c ret = rtc->ops->read_offset(rtc->dev.parent, offset); rtc 1034 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 1057 drivers/rtc/interface.c int rtc_set_offset(struct rtc_device *rtc, long offset) rtc 1061 drivers/rtc/interface.c if (!rtc->ops) rtc 1064 drivers/rtc/interface.c if (!rtc->ops->set_offset) rtc 1067 drivers/rtc/interface.c mutex_lock(&rtc->ops_lock); rtc 1068 drivers/rtc/interface.c ret = rtc->ops->set_offset(rtc->dev.parent, offset); rtc 1069 drivers/rtc/interface.c mutex_unlock(&rtc->ops_lock); rtc 41 drivers/rtc/nvmem.c static int rtc_nvram_register(struct rtc_device *rtc, rtc 46 drivers/rtc/nvmem.c rtc->nvram = kzalloc(sizeof(*rtc->nvram), GFP_KERNEL); rtc 47 drivers/rtc/nvmem.c if (!rtc->nvram) rtc 50 drivers/rtc/nvmem.c rtc->nvram->attr.name = "nvram"; rtc 51 drivers/rtc/nvmem.c rtc->nvram->attr.mode = 0644; rtc 52 drivers/rtc/nvmem.c rtc->nvram->private = nvmem; rtc 54 drivers/rtc/nvmem.c sysfs_bin_attr_init(rtc->nvram); rtc 56 drivers/rtc/nvmem.c rtc->nvram->read = rtc_nvram_read; rtc 57 drivers/rtc/nvmem.c rtc->nvram->write = rtc_nvram_write; rtc 58 drivers/rtc/nvmem.c rtc->nvram->size = size; rtc 60 drivers/rtc/nvmem.c err = sysfs_create_bin_file(&rtc->dev.parent->kobj, rtc 61 drivers/rtc/nvmem.c rtc->nvram); rtc 63 drivers/rtc/nvmem.c kfree(rtc->nvram); rtc 64 drivers/rtc/nvmem.c rtc->nvram = NULL; rtc 70 drivers/rtc/nvmem.c static void rtc_nvram_unregister(struct rtc_device *rtc) rtc 72 drivers/rtc/nvmem.c sysfs_remove_bin_file(&rtc->dev.parent->kobj, rtc->nvram); rtc 73 drivers/rtc/nvmem.c kfree(rtc->nvram); rtc 74 drivers/rtc/nvmem.c rtc->nvram = NULL; rtc 80 drivers/rtc/nvmem.c int rtc_nvmem_register(struct rtc_device *rtc, rtc 88 drivers/rtc/nvmem.c nvmem_config->dev = rtc->dev.parent; rtc 89 drivers/rtc/nvmem.c nvmem_config->owner = rtc->owner; rtc 90 drivers/rtc/nvmem.c nvmem = devm_nvmem_register(rtc->dev.parent, nvmem_config); rtc 95 drivers/rtc/nvmem.c if (rtc->nvram_old_abi) rtc 96 drivers/rtc/nvmem.c rtc_nvram_register(rtc, nvmem, nvmem_config->size); rtc 102 drivers/rtc/nvmem.c void rtc_nvmem_unregister(struct rtc_device *rtc) rtc 105 drivers/rtc/nvmem.c if (rtc->nvram) rtc 106 drivers/rtc/nvmem.c rtc_nvram_unregister(rtc); rtc 21 drivers/rtc/proc.c static bool is_rtc_hctosys(struct rtc_device *rtc) rtc 26 drivers/rtc/proc.c size = scnprintf(name, NAME_SIZE, "rtc%d", rtc->id); rtc 33 drivers/rtc/proc.c static bool is_rtc_hctosys(struct rtc_device *rtc) rtc 35 drivers/rtc/proc.c return (rtc->id == 0); rtc 42 drivers/rtc/proc.c struct rtc_device *rtc = seq->private; rtc 43 drivers/rtc/proc.c const struct rtc_class_ops *ops = rtc->ops; rtc 47 drivers/rtc/proc.c err = rtc_read_time(rtc, &tm); rtc 55 drivers/rtc/proc.c err = rtc_read_alarm(rtc, &alrm); rtc 64 drivers/rtc/proc.c (rtc->uie_rtctimer.enabled) ? "yes" : "no"); rtc 66 drivers/rtc/proc.c (rtc->pie_enabled) ? "yes" : "no"); rtc 68 drivers/rtc/proc.c rtc->irq_freq); rtc 70 drivers/rtc/proc.c rtc->max_user_freq); rtc 76 drivers/rtc/proc.c ops->proc(rtc->dev.parent, seq); rtc 81 drivers/rtc/proc.c void rtc_proc_add_device(struct rtc_device *rtc) rtc 83 drivers/rtc/proc.c if (is_rtc_hctosys(rtc)) rtc 85 drivers/rtc/proc.c rtc); rtc 88 drivers/rtc/proc.c void rtc_proc_del_device(struct rtc_device *rtc) rtc 90 drivers/rtc/proc.c if (is_rtc_hctosys(rtc)) rtc 120 drivers/rtc/rtc-ab-b5ze-s3.c struct rtc_device *rtc; rtc 749 drivers/rtc/rtc-ab-b5ze-s3.c struct rtc_device *rtc = rtc_data->rtc; rtc 778 drivers/rtc/rtc-ab-b5ze-s3.c rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF); rtc 791 drivers/rtc/rtc-ab-b5ze-s3.c rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF); rtc 856 drivers/rtc/rtc-ab-b5ze-s3.c data->rtc = devm_rtc_allocate_device(dev); rtc 857 drivers/rtc/rtc-ab-b5ze-s3.c ret = PTR_ERR_OR_ZERO(data->rtc); rtc 881 drivers/rtc/rtc-ab-b5ze-s3.c data->rtc->ops = &rtc_ops; rtc 882 drivers/rtc/rtc-ab-b5ze-s3.c data->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 883 drivers/rtc/rtc-ab-b5ze-s3.c data->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 895 drivers/rtc/rtc-ab-b5ze-s3.c ret = rtc_register_device(data->rtc); rtc 76 drivers/rtc/rtc-ab-eoz9.c struct rtc_device *rtc; rtc 414 drivers/rtc/rtc-ab-eoz9.c data->rtc = devm_rtc_allocate_device(dev); rtc 415 drivers/rtc/rtc-ab-eoz9.c ret = PTR_ERR_OR_ZERO(data->rtc); rtc 419 drivers/rtc/rtc-ab-eoz9.c data->rtc->ops = &rtc_ops; rtc 420 drivers/rtc/rtc-ab-eoz9.c data->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 421 drivers/rtc/rtc-ab-eoz9.c data->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 423 drivers/rtc/rtc-ab-eoz9.c ret = rtc_register_device(data->rtc); rtc 205 drivers/rtc/rtc-ab3100.c struct rtc_device *rtc; rtc 231 drivers/rtc/rtc-ab3100.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 232 drivers/rtc/rtc-ab3100.c if (IS_ERR(rtc)) rtc 233 drivers/rtc/rtc-ab3100.c return PTR_ERR(rtc); rtc 235 drivers/rtc/rtc-ab3100.c rtc->ops = &ab3100_rtc_ops; rtc 237 drivers/rtc/rtc-ab3100.c rtc->range_max = U32_MAX; rtc 239 drivers/rtc/rtc-ab3100.c platform_set_drvdata(pdev, rtc); rtc 241 drivers/rtc/rtc-ab3100.c return rtc_register_device(rtc); rtc 325 drivers/rtc/rtc-ab8500.c struct rtc_device *rtc = data; rtc 328 drivers/rtc/rtc-ab8500.c dev_dbg(&rtc->dev, "%s\n", __func__); rtc 329 drivers/rtc/rtc-ab8500.c rtc_update_irq(rtc, 1, events); rtc 352 drivers/rtc/rtc-ab8500.c struct rtc_device *rtc; rtc 382 drivers/rtc/rtc-ab8500.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 383 drivers/rtc/rtc-ab8500.c if (IS_ERR(rtc)) rtc 384 drivers/rtc/rtc-ab8500.c return PTR_ERR(rtc); rtc 386 drivers/rtc/rtc-ab8500.c rtc->ops = (struct rtc_class_ops *)platid->driver_data; rtc 390 drivers/rtc/rtc-ab8500.c "ab8500-rtc", rtc); rtc 395 drivers/rtc/rtc-ab8500.c platform_set_drvdata(pdev, rtc); rtc 397 drivers/rtc/rtc-ab8500.c rtc->uie_unsupported = 1; rtc 399 drivers/rtc/rtc-ab8500.c rtc->range_max = (1ULL << 24) * 60 - 1; // 24-bit minutes + 59 secs rtc 400 drivers/rtc/rtc-ab8500.c rtc->start_secs = RTC_TIMESTAMP_BEGIN_2000; rtc 401 drivers/rtc/rtc-ab8500.c rtc->set_start_time = true; rtc 403 drivers/rtc/rtc-ab8500.c err = rtc_add_group(rtc, &ab8500_rtc_sysfs_files); rtc 407 drivers/rtc/rtc-ab8500.c return rtc_register_device(rtc); rtc 114 drivers/rtc/rtc-abx80x.c struct rtc_device *rtc; rtc 244 drivers/rtc/rtc-abx80x.c struct rtc_device *rtc = priv->rtc; rtc 252 drivers/rtc/rtc-abx80x.c rtc_update_irq(rtc, 1, RTC_AF | RTC_IRQF); rtc 816 drivers/rtc/rtc-abx80x.c priv->rtc = devm_rtc_allocate_device(&client->dev); rtc 817 drivers/rtc/rtc-abx80x.c if (IS_ERR(priv->rtc)) rtc 818 drivers/rtc/rtc-abx80x.c return PTR_ERR(priv->rtc); rtc 820 drivers/rtc/rtc-abx80x.c priv->rtc->ops = &abx80x_rtc_ops; rtc 844 drivers/rtc/rtc-abx80x.c err = rtc_add_group(priv->rtc, &rtc_calib_attr_group); rtc 851 drivers/rtc/rtc-abx80x.c return rtc_register_device(priv->rtc); rtc 91 drivers/rtc/rtc-ac100.c struct rtc_device *rtc; rtc 531 drivers/rtc/rtc-ac100.c mutex_lock(&chip->rtc->ops_lock); rtc 540 drivers/rtc/rtc-ac100.c rtc_update_irq(chip->rtc, 1, RTC_AF | RTC_IRQF); rtc 554 drivers/rtc/rtc-ac100.c mutex_unlock(&chip->rtc->ops_lock); rtc 584 drivers/rtc/rtc-ac100.c chip->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 585 drivers/rtc/rtc-ac100.c if (IS_ERR(chip->rtc)) rtc 586 drivers/rtc/rtc-ac100.c return PTR_ERR(chip->rtc); rtc 588 drivers/rtc/rtc-ac100.c chip->rtc->ops = &ac100_rtc_ops; rtc 613 drivers/rtc/rtc-ac100.c return rtc_register_device(chip->rtc); rtc 87 drivers/rtc/rtc-armada38x.c void (*update_mbus_timing)(struct armada38x_rtc *rtc); rtc 88 drivers/rtc/rtc-armada38x.c u32 (*read_rtc_reg)(struct armada38x_rtc *rtc, u8 rtc_reg); rtc 89 drivers/rtc/rtc-armada38x.c void (*clear_isr)(struct armada38x_rtc *rtc); rtc 90 drivers/rtc/rtc-armada38x.c void (*unmask_interrupt)(struct armada38x_rtc *rtc); rtc 104 drivers/rtc/rtc-armada38x.c static void rtc_delayed_write(u32 val, struct armada38x_rtc *rtc, int offset) rtc 106 drivers/rtc/rtc-armada38x.c writel(0, rtc->regs + RTC_STATUS); rtc 107 drivers/rtc/rtc-armada38x.c writel(0, rtc->regs + RTC_STATUS); rtc 108 drivers/rtc/rtc-armada38x.c writel(val, rtc->regs + offset); rtc 113 drivers/rtc/rtc-armada38x.c static void rtc_update_38x_mbus_timing_params(struct armada38x_rtc *rtc) rtc 117 drivers/rtc/rtc-armada38x.c reg = readl(rtc->regs_soc + RTC_38X_BRIDGE_TIMING_CTL); rtc 122 drivers/rtc/rtc-armada38x.c writel(reg, rtc->regs_soc + RTC_38X_BRIDGE_TIMING_CTL); rtc 125 drivers/rtc/rtc-armada38x.c static void rtc_update_8k_mbus_timing_params(struct armada38x_rtc *rtc) rtc 129 drivers/rtc/rtc-armada38x.c reg = readl(rtc->regs_soc + RTC_8K_BRIDGE_TIMING_CTL0); rtc 134 drivers/rtc/rtc-armada38x.c writel(reg, rtc->regs_soc + RTC_8K_BRIDGE_TIMING_CTL0); rtc 136 drivers/rtc/rtc-armada38x.c reg = readl(rtc->regs_soc + RTC_8K_BRIDGE_TIMING_CTL1); rtc 139 drivers/rtc/rtc-armada38x.c writel(reg, rtc->regs_soc + RTC_8K_BRIDGE_TIMING_CTL1); rtc 142 drivers/rtc/rtc-armada38x.c static u32 read_rtc_register(struct armada38x_rtc *rtc, u8 rtc_reg) rtc 144 drivers/rtc/rtc-armada38x.c return readl(rtc->regs + rtc_reg); rtc 147 drivers/rtc/rtc-armada38x.c static u32 read_rtc_register_38x_wa(struct armada38x_rtc *rtc, u8 rtc_reg) rtc 152 drivers/rtc/rtc-armada38x.c rtc->val_to_freq[i].value = readl(rtc->regs + rtc_reg); rtc 153 drivers/rtc/rtc-armada38x.c rtc->val_to_freq[i].freq = 0; rtc 158 drivers/rtc/rtc-armada38x.c u32 value = rtc->val_to_freq[i].value; rtc 160 drivers/rtc/rtc-armada38x.c while (rtc->val_to_freq[j].freq) { rtc 161 drivers/rtc/rtc-armada38x.c if (rtc->val_to_freq[j].value == value) { rtc 162 drivers/rtc/rtc-armada38x.c rtc->val_to_freq[j].freq++; rtc 168 drivers/rtc/rtc-armada38x.c if (!rtc->val_to_freq[j].freq) { rtc 169 drivers/rtc/rtc-armada38x.c rtc->val_to_freq[j].value = value; rtc 170 drivers/rtc/rtc-armada38x.c rtc->val_to_freq[j].freq = 1; rtc 173 drivers/rtc/rtc-armada38x.c if (rtc->val_to_freq[j].freq > max) { rtc 175 drivers/rtc/rtc-armada38x.c max = rtc->val_to_freq[j].freq; rtc 186 drivers/rtc/rtc-armada38x.c return rtc->val_to_freq[index_max].value; rtc 189 drivers/rtc/rtc-armada38x.c static void armada38x_clear_isr(struct armada38x_rtc *rtc) rtc 191 drivers/rtc/rtc-armada38x.c u32 val = readl(rtc->regs_soc + SOC_RTC_INTERRUPT); rtc 193 drivers/rtc/rtc-armada38x.c writel(val & ~SOC_RTC_ALARM1, rtc->regs_soc + SOC_RTC_INTERRUPT); rtc 196 drivers/rtc/rtc-armada38x.c static void armada38x_unmask_interrupt(struct armada38x_rtc *rtc) rtc 198 drivers/rtc/rtc-armada38x.c u32 val = readl(rtc->regs_soc + SOC_RTC_INTERRUPT); rtc 200 drivers/rtc/rtc-armada38x.c writel(val | SOC_RTC_ALARM1_MASK, rtc->regs_soc + SOC_RTC_INTERRUPT); rtc 203 drivers/rtc/rtc-armada38x.c static void armada8k_clear_isr(struct armada38x_rtc *rtc) rtc 205 drivers/rtc/rtc-armada38x.c writel(RTC_8K_ALARM2, rtc->regs_soc + RTC_8K_ISR); rtc 208 drivers/rtc/rtc-armada38x.c static void armada8k_unmask_interrupt(struct armada38x_rtc *rtc) rtc 210 drivers/rtc/rtc-armada38x.c writel(RTC_8K_ALARM2, rtc->regs_soc + RTC_8K_IMR); rtc 215 drivers/rtc/rtc-armada38x.c struct armada38x_rtc *rtc = dev_get_drvdata(dev); rtc 218 drivers/rtc/rtc-armada38x.c spin_lock_irqsave(&rtc->lock, flags); rtc 219 drivers/rtc/rtc-armada38x.c time = rtc->data->read_rtc_reg(rtc, RTC_TIME); rtc 220 drivers/rtc/rtc-armada38x.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 227 drivers/rtc/rtc-armada38x.c static void armada38x_rtc_reset(struct armada38x_rtc *rtc) rtc 231 drivers/rtc/rtc-armada38x.c reg = rtc->data->read_rtc_reg(rtc, RTC_CONF_TEST); rtc 234 drivers/rtc/rtc-armada38x.c rtc_delayed_write(0, rtc, RTC_CONF_TEST); rtc 236 drivers/rtc/rtc-armada38x.c rtc_delayed_write(0, rtc, RTC_TIME); rtc 237 drivers/rtc/rtc-armada38x.c rtc_delayed_write(SOC_RTC_ALARM1 | SOC_RTC_ALARM2, rtc, rtc 239 drivers/rtc/rtc-armada38x.c rtc_delayed_write(RTC_NOMINAL_TIMING, rtc, RTC_CCR); rtc 241 drivers/rtc/rtc-armada38x.c rtc->initialized = true; rtc 246 drivers/rtc/rtc-armada38x.c struct armada38x_rtc *rtc = dev_get_drvdata(dev); rtc 251 drivers/rtc/rtc-armada38x.c if (!rtc->initialized) rtc 252 drivers/rtc/rtc-armada38x.c armada38x_rtc_reset(rtc); rtc 254 drivers/rtc/rtc-armada38x.c spin_lock_irqsave(&rtc->lock, flags); rtc 255 drivers/rtc/rtc-armada38x.c rtc_delayed_write(time, rtc, RTC_TIME); rtc 256 drivers/rtc/rtc-armada38x.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 263 drivers/rtc/rtc-armada38x.c struct armada38x_rtc *rtc = dev_get_drvdata(dev); rtc 265 drivers/rtc/rtc-armada38x.c u32 reg = ALARM_REG(RTC_ALARM1, rtc->data->alarm); rtc 266 drivers/rtc/rtc-armada38x.c u32 reg_irq = ALARM_REG(RTC_IRQ1_CONF, rtc->data->alarm); rtc 269 drivers/rtc/rtc-armada38x.c spin_lock_irqsave(&rtc->lock, flags); rtc 271 drivers/rtc/rtc-armada38x.c time = rtc->data->read_rtc_reg(rtc, reg); rtc 272 drivers/rtc/rtc-armada38x.c val = rtc->data->read_rtc_reg(rtc, reg_irq) & RTC_IRQ_AL_EN; rtc 274 drivers/rtc/rtc-armada38x.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 284 drivers/rtc/rtc-armada38x.c struct armada38x_rtc *rtc = dev_get_drvdata(dev); rtc 285 drivers/rtc/rtc-armada38x.c u32 reg = ALARM_REG(RTC_ALARM1, rtc->data->alarm); rtc 286 drivers/rtc/rtc-armada38x.c u32 reg_irq = ALARM_REG(RTC_IRQ1_CONF, rtc->data->alarm); rtc 291 drivers/rtc/rtc-armada38x.c spin_lock_irqsave(&rtc->lock, flags); rtc 293 drivers/rtc/rtc-armada38x.c rtc_delayed_write(time, rtc, reg); rtc 296 drivers/rtc/rtc-armada38x.c rtc_delayed_write(RTC_IRQ_AL_EN, rtc, reg_irq); rtc 297 drivers/rtc/rtc-armada38x.c rtc->data->unmask_interrupt(rtc); rtc 300 drivers/rtc/rtc-armada38x.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 308 drivers/rtc/rtc-armada38x.c struct armada38x_rtc *rtc = dev_get_drvdata(dev); rtc 309 drivers/rtc/rtc-armada38x.c u32 reg_irq = ALARM_REG(RTC_IRQ1_CONF, rtc->data->alarm); rtc 312 drivers/rtc/rtc-armada38x.c spin_lock_irqsave(&rtc->lock, flags); rtc 315 drivers/rtc/rtc-armada38x.c rtc_delayed_write(RTC_IRQ_AL_EN, rtc, reg_irq); rtc 317 drivers/rtc/rtc-armada38x.c rtc_delayed_write(0, rtc, reg_irq); rtc 319 drivers/rtc/rtc-armada38x.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 326 drivers/rtc/rtc-armada38x.c struct armada38x_rtc *rtc = data; rtc 329 drivers/rtc/rtc-armada38x.c u32 reg_irq = ALARM_REG(RTC_IRQ1_CONF, rtc->data->alarm); rtc 331 drivers/rtc/rtc-armada38x.c dev_dbg(&rtc->rtc_dev->dev, "%s:irq(%d)\n", __func__, irq); rtc 333 drivers/rtc/rtc-armada38x.c spin_lock(&rtc->lock); rtc 335 drivers/rtc/rtc-armada38x.c rtc->data->clear_isr(rtc); rtc 336 drivers/rtc/rtc-armada38x.c val = rtc->data->read_rtc_reg(rtc, reg_irq); rtc 338 drivers/rtc/rtc-armada38x.c rtc_delayed_write(0, rtc, reg_irq); rtc 340 drivers/rtc/rtc-armada38x.c rtc_delayed_write(1 << rtc->data->alarm, rtc, RTC_STATUS); rtc 342 drivers/rtc/rtc-armada38x.c spin_unlock(&rtc->lock); rtc 351 drivers/rtc/rtc-armada38x.c rtc_update_irq(rtc->rtc_dev, 1, event); rtc 400 drivers/rtc/rtc-armada38x.c struct armada38x_rtc *rtc = dev_get_drvdata(dev); rtc 404 drivers/rtc/rtc-armada38x.c spin_lock_irqsave(&rtc->lock, flags); rtc 405 drivers/rtc/rtc-armada38x.c ccr = rtc->data->read_rtc_reg(rtc, RTC_CCR); rtc 406 drivers/rtc/rtc-armada38x.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 417 drivers/rtc/rtc-armada38x.c struct armada38x_rtc *rtc = dev_get_drvdata(dev); rtc 446 drivers/rtc/rtc-armada38x.c rtc_delayed_write(ccr, rtc, RTC_CCR); rtc 503 drivers/rtc/rtc-armada38x.c struct armada38x_rtc *rtc; rtc 510 drivers/rtc/rtc-armada38x.c rtc = devm_kzalloc(&pdev->dev, sizeof(struct armada38x_rtc), rtc 512 drivers/rtc/rtc-armada38x.c if (!rtc) rtc 515 drivers/rtc/rtc-armada38x.c rtc->val_to_freq = devm_kcalloc(&pdev->dev, SAMPLE_NR, rtc 517 drivers/rtc/rtc-armada38x.c if (!rtc->val_to_freq) rtc 520 drivers/rtc/rtc-armada38x.c spin_lock_init(&rtc->lock); rtc 523 drivers/rtc/rtc-armada38x.c rtc->regs = devm_ioremap_resource(&pdev->dev, res); rtc 524 drivers/rtc/rtc-armada38x.c if (IS_ERR(rtc->regs)) rtc 525 drivers/rtc/rtc-armada38x.c return PTR_ERR(rtc->regs); rtc 527 drivers/rtc/rtc-armada38x.c rtc->regs_soc = devm_ioremap_resource(&pdev->dev, res); rtc 528 drivers/rtc/rtc-armada38x.c if (IS_ERR(rtc->regs_soc)) rtc 529 drivers/rtc/rtc-armada38x.c return PTR_ERR(rtc->regs_soc); rtc 531 drivers/rtc/rtc-armada38x.c rtc->irq = platform_get_irq(pdev, 0); rtc 532 drivers/rtc/rtc-armada38x.c if (rtc->irq < 0) rtc 533 drivers/rtc/rtc-armada38x.c return rtc->irq; rtc 535 drivers/rtc/rtc-armada38x.c rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev); rtc 536 drivers/rtc/rtc-armada38x.c if (IS_ERR(rtc->rtc_dev)) rtc 537 drivers/rtc/rtc-armada38x.c return PTR_ERR(rtc->rtc_dev); rtc 539 drivers/rtc/rtc-armada38x.c if (devm_request_irq(&pdev->dev, rtc->irq, armada38x_rtc_alarm_irq, rtc 540 drivers/rtc/rtc-armada38x.c 0, pdev->name, rtc) < 0) { rtc 542 drivers/rtc/rtc-armada38x.c rtc->irq = -1; rtc 544 drivers/rtc/rtc-armada38x.c platform_set_drvdata(pdev, rtc); rtc 546 drivers/rtc/rtc-armada38x.c if (rtc->irq != -1) { rtc 548 drivers/rtc/rtc-armada38x.c rtc->rtc_dev->ops = &armada38x_rtc_ops; rtc 554 drivers/rtc/rtc-armada38x.c rtc->rtc_dev->ops = &armada38x_rtc_ops_noirq; rtc 556 drivers/rtc/rtc-armada38x.c rtc->data = (struct armada38x_rtc_data *)match->data; rtc 559 drivers/rtc/rtc-armada38x.c rtc->data->update_mbus_timing(rtc); rtc 561 drivers/rtc/rtc-armada38x.c rtc->rtc_dev->range_max = U32_MAX; rtc 563 drivers/rtc/rtc-armada38x.c return rtc_register_device(rtc->rtc_dev); rtc 570 drivers/rtc/rtc-armada38x.c struct armada38x_rtc *rtc = dev_get_drvdata(dev); rtc 572 drivers/rtc/rtc-armada38x.c return enable_irq_wake(rtc->irq); rtc 581 drivers/rtc/rtc-armada38x.c struct armada38x_rtc *rtc = dev_get_drvdata(dev); rtc 584 drivers/rtc/rtc-armada38x.c rtc->data->update_mbus_timing(rtc); rtc 586 drivers/rtc/rtc-armada38x.c return disable_irq_wake(rtc->irq); rtc 26 drivers/rtc/rtc-as3722.c struct rtc_device *rtc; rtc 155 drivers/rtc/rtc-as3722.c rtc_update_irq(as3722_rtc->rtc, 1, RTC_IRQF | RTC_AF); rtc 192 drivers/rtc/rtc-as3722.c as3722_rtc->rtc = devm_rtc_device_register(&pdev->dev, "as3722-rtc", rtc 194 drivers/rtc/rtc-as3722.c if (IS_ERR(as3722_rtc->rtc)) { rtc 195 drivers/rtc/rtc-as3722.c ret = PTR_ERR(as3722_rtc->rtc); rtc 109 drivers/rtc/rtc-asm9260.c struct rtc_device *rtc; rtc 119 drivers/rtc/rtc-asm9260.c mutex_lock(&priv->rtc->ops_lock); rtc 122 drivers/rtc/rtc-asm9260.c mutex_unlock(&priv->rtc->ops_lock); rtc 127 drivers/rtc/rtc-asm9260.c mutex_unlock(&priv->rtc->ops_lock); rtc 131 drivers/rtc/rtc-asm9260.c rtc_update_irq(priv->rtc, 1, events); rtc 286 drivers/rtc/rtc-asm9260.c priv->rtc = devm_rtc_device_register(dev, dev_name(dev), rtc 288 drivers/rtc/rtc-asm9260.c if (IS_ERR(priv->rtc)) { rtc 289 drivers/rtc/rtc-asm9260.c ret = PTR_ERR(priv->rtc); rtc 24 drivers/rtc/rtc-aspeed.c struct aspeed_rtc *rtc = dev_get_drvdata(dev); rtc 28 drivers/rtc/rtc-aspeed.c if (!(readl(rtc->base + RTC_CTRL) & RTC_ENABLE)) { rtc 34 drivers/rtc/rtc-aspeed.c reg2 = readl(rtc->base + RTC_YEAR); rtc 35 drivers/rtc/rtc-aspeed.c reg1 = readl(rtc->base + RTC_TIME); rtc 36 drivers/rtc/rtc-aspeed.c } while (reg2 != readl(rtc->base + RTC_YEAR)); rtc 55 drivers/rtc/rtc-aspeed.c struct aspeed_rtc *rtc = dev_get_drvdata(dev); rtc 68 drivers/rtc/rtc-aspeed.c ctrl = readl(rtc->base + RTC_CTRL); rtc 69 drivers/rtc/rtc-aspeed.c writel(ctrl | RTC_UNLOCK, rtc->base + RTC_CTRL); rtc 71 drivers/rtc/rtc-aspeed.c writel(reg1, rtc->base + RTC_TIME); rtc 72 drivers/rtc/rtc-aspeed.c writel(reg2, rtc->base + RTC_YEAR); rtc 75 drivers/rtc/rtc-aspeed.c writel(ctrl | RTC_ENABLE, rtc->base + RTC_CTRL); rtc 87 drivers/rtc/rtc-aspeed.c struct aspeed_rtc *rtc; rtc 90 drivers/rtc/rtc-aspeed.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 91 drivers/rtc/rtc-aspeed.c if (!rtc) rtc 95 drivers/rtc/rtc-aspeed.c rtc->base = devm_ioremap_resource(&pdev->dev, res); rtc 96 drivers/rtc/rtc-aspeed.c if (IS_ERR(rtc->base)) rtc 97 drivers/rtc/rtc-aspeed.c return PTR_ERR(rtc->base); rtc 99 drivers/rtc/rtc-aspeed.c rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev); rtc 100 drivers/rtc/rtc-aspeed.c if (IS_ERR(rtc->rtc_dev)) rtc 101 drivers/rtc/rtc-aspeed.c return PTR_ERR(rtc->rtc_dev); rtc 103 drivers/rtc/rtc-aspeed.c platform_set_drvdata(pdev, rtc); rtc 105 drivers/rtc/rtc-aspeed.c rtc->rtc_dev->ops = &aspeed_rtc_ops; rtc 106 drivers/rtc/rtc-aspeed.c rtc->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_1900; rtc 107 drivers/rtc/rtc-aspeed.c rtc->rtc_dev->range_max = 38814989399LL; /* 3199-12-31 23:59:59 */ rtc 109 drivers/rtc/rtc-aspeed.c return rtc_register_device(rtc->rtc_dev); rtc 278 drivers/rtc/rtc-at91rm9200.c struct rtc_device *rtc = platform_get_drvdata(pdev); rtc 298 drivers/rtc/rtc-at91rm9200.c rtc_update_irq(rtc, 1, events); rtc 366 drivers/rtc/rtc-at91rm9200.c struct rtc_device *rtc; rtc 391 drivers/rtc/rtc-at91rm9200.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 392 drivers/rtc/rtc-at91rm9200.c if (IS_ERR(rtc)) rtc 393 drivers/rtc/rtc-at91rm9200.c return PTR_ERR(rtc); rtc 394 drivers/rtc/rtc-at91rm9200.c platform_set_drvdata(pdev, rtc); rtc 428 drivers/rtc/rtc-at91rm9200.c rtc->ops = &at91_rtc_ops; rtc 429 drivers/rtc/rtc-at91rm9200.c rtc->range_min = RTC_TIMESTAMP_BEGIN_1900; rtc 430 drivers/rtc/rtc-at91rm9200.c rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 431 drivers/rtc/rtc-at91rm9200.c ret = rtc_register_device(rtc); rtc 503 drivers/rtc/rtc-at91rm9200.c struct rtc_device *rtc = dev_get_drvdata(dev); rtc 512 drivers/rtc/rtc-at91rm9200.c rtc_update_irq(rtc, 1, cached_events); rtc 81 drivers/rtc/rtc-at91sam9.c #define rtt_readl(rtc, field) \ rtc 82 drivers/rtc/rtc-at91sam9.c readl((rtc)->rtt + AT91_RTT_ ## field) rtc 83 drivers/rtc/rtc-at91sam9.c #define rtt_writel(rtc, field, val) \ rtc 84 drivers/rtc/rtc-at91sam9.c writel((val), (rtc)->rtt + AT91_RTT_ ## field) rtc 86 drivers/rtc/rtc-at91sam9.c static inline unsigned int gpbr_readl(struct sam9_rtc *rtc) rtc 90 drivers/rtc/rtc-at91sam9.c regmap_read(rtc->gpbr, rtc->gpbr_offset, &val); rtc 95 drivers/rtc/rtc-at91sam9.c static inline void gpbr_writel(struct sam9_rtc *rtc, unsigned int val) rtc 97 drivers/rtc/rtc-at91sam9.c regmap_write(rtc->gpbr, rtc->gpbr_offset, val); rtc 105 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc = dev_get_drvdata(dev); rtc 110 drivers/rtc/rtc-at91sam9.c offset = gpbr_readl(rtc); rtc 115 drivers/rtc/rtc-at91sam9.c secs = rtt_readl(rtc, VR); rtc 116 drivers/rtc/rtc-at91sam9.c secs2 = rtt_readl(rtc, VR); rtc 118 drivers/rtc/rtc-at91sam9.c secs = rtt_readl(rtc, VR); rtc 132 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc = dev_get_drvdata(dev); rtc 140 drivers/rtc/rtc-at91sam9.c mr = rtt_readl(rtc, MR); rtc 143 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr & ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN)); rtc 146 drivers/rtc/rtc-at91sam9.c offset = gpbr_readl(rtc); rtc 150 drivers/rtc/rtc-at91sam9.c gpbr_writel(rtc, secs); rtc 153 drivers/rtc/rtc-at91sam9.c alarm = rtt_readl(rtc, AR); rtc 166 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, AR, alarm); rtc 170 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr | AT91_RTT_RTTRST); rtc 177 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc = dev_get_drvdata(dev); rtc 179 drivers/rtc/rtc-at91sam9.c u32 alarm = rtt_readl(rtc, AR); rtc 182 drivers/rtc/rtc-at91sam9.c offset = gpbr_readl(rtc); rtc 192 drivers/rtc/rtc-at91sam9.c if (rtt_readl(rtc, MR) & AT91_RTT_ALMIEN) rtc 201 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc = dev_get_drvdata(dev); rtc 209 drivers/rtc/rtc-at91sam9.c offset = gpbr_readl(rtc); rtc 214 drivers/rtc/rtc-at91sam9.c mr = rtt_readl(rtc, MR); rtc 215 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr & ~AT91_RTT_ALMIEN); rtc 219 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, AR, ALARM_DISABLED); rtc 224 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, AR, secs - offset); rtc 226 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr | AT91_RTT_ALMIEN); rtc 235 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc = dev_get_drvdata(dev); rtc 236 drivers/rtc/rtc-at91sam9.c u32 mr = rtt_readl(rtc, MR); rtc 240 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr | AT91_RTT_ALMIEN); rtc 242 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr & ~AT91_RTT_ALMIEN); rtc 251 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc = dev_get_drvdata(dev); rtc 252 drivers/rtc/rtc-at91sam9.c u32 mr = rtt_readl(rtc, MR); rtc 259 drivers/rtc/rtc-at91sam9.c static irqreturn_t at91_rtc_cache_events(struct sam9_rtc *rtc) rtc 266 drivers/rtc/rtc-at91sam9.c mr = rtt_readl(rtc, MR) & (AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN); rtc 267 drivers/rtc/rtc-at91sam9.c sr = rtt_readl(rtc, SR) & (mr >> 16); rtc 273 drivers/rtc/rtc-at91sam9.c rtc->events |= (RTC_AF | RTC_IRQF); rtc 277 drivers/rtc/rtc-at91sam9.c rtc->events |= (RTC_UF | RTC_IRQF); rtc 282 drivers/rtc/rtc-at91sam9.c static void at91_rtc_flush_events(struct sam9_rtc *rtc) rtc 284 drivers/rtc/rtc-at91sam9.c if (!rtc->events) rtc 287 drivers/rtc/rtc-at91sam9.c rtc_update_irq(rtc->rtcdev, 1, rtc->events); rtc 288 drivers/rtc/rtc-at91sam9.c rtc->events = 0; rtc 291 drivers/rtc/rtc-at91sam9.c rtc->events >> 8, rtc->events & 0x000000FF); rtc 299 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc = _rtc; rtc 302 drivers/rtc/rtc-at91sam9.c spin_lock(&rtc->lock); rtc 304 drivers/rtc/rtc-at91sam9.c ret = at91_rtc_cache_events(rtc); rtc 307 drivers/rtc/rtc-at91sam9.c if (rtc->suspended) { rtc 309 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, rtc 310 drivers/rtc/rtc-at91sam9.c rtt_readl(rtc, MR) & rtc 315 drivers/rtc/rtc-at91sam9.c at91_rtc_flush_events(rtc); rtc 318 drivers/rtc/rtc-at91sam9.c spin_unlock(&rtc->lock); rtc 338 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc; rtc 348 drivers/rtc/rtc-at91sam9.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 349 drivers/rtc/rtc-at91sam9.c if (!rtc) rtc 352 drivers/rtc/rtc-at91sam9.c spin_lock_init(&rtc->lock); rtc 353 drivers/rtc/rtc-at91sam9.c rtc->irq = irq; rtc 359 drivers/rtc/rtc-at91sam9.c platform_set_drvdata(pdev, rtc); rtc 362 drivers/rtc/rtc-at91sam9.c rtc->rtt = devm_ioremap_resource(&pdev->dev, r); rtc 363 drivers/rtc/rtc-at91sam9.c if (IS_ERR(rtc->rtt)) rtc 364 drivers/rtc/rtc-at91sam9.c return PTR_ERR(rtc->rtt); rtc 372 drivers/rtc/rtc-at91sam9.c rtc->gpbr = syscon_node_to_regmap(args.np); rtc 373 drivers/rtc/rtc-at91sam9.c rtc->gpbr_offset = args.args[0]; rtc 374 drivers/rtc/rtc-at91sam9.c if (IS_ERR(rtc->gpbr)) { rtc 379 drivers/rtc/rtc-at91sam9.c rtc->sclk = devm_clk_get(&pdev->dev, NULL); rtc 380 drivers/rtc/rtc-at91sam9.c if (IS_ERR(rtc->sclk)) rtc 381 drivers/rtc/rtc-at91sam9.c return PTR_ERR(rtc->sclk); rtc 383 drivers/rtc/rtc-at91sam9.c ret = clk_prepare_enable(rtc->sclk); rtc 389 drivers/rtc/rtc-at91sam9.c sclk_rate = clk_get_rate(rtc->sclk); rtc 396 drivers/rtc/rtc-at91sam9.c mr = rtt_readl(rtc, MR); rtc 401 drivers/rtc/rtc-at91sam9.c gpbr_writel(rtc, 0); rtc 406 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr); rtc 408 drivers/rtc/rtc-at91sam9.c rtc->rtcdev = devm_rtc_allocate_device(&pdev->dev); rtc 409 drivers/rtc/rtc-at91sam9.c if (IS_ERR(rtc->rtcdev)) { rtc 410 drivers/rtc/rtc-at91sam9.c ret = PTR_ERR(rtc->rtcdev); rtc 414 drivers/rtc/rtc-at91sam9.c rtc->rtcdev->ops = &at91_rtc_ops; rtc 415 drivers/rtc/rtc-at91sam9.c rtc->rtcdev->range_max = U32_MAX; rtc 418 drivers/rtc/rtc-at91sam9.c ret = devm_request_irq(&pdev->dev, rtc->irq, at91_rtc_interrupt, rtc 420 drivers/rtc/rtc-at91sam9.c dev_name(&rtc->rtcdev->dev), rtc); rtc 422 drivers/rtc/rtc-at91sam9.c dev_dbg(&pdev->dev, "can't share IRQ %d?\n", rtc->irq); rtc 432 drivers/rtc/rtc-at91sam9.c if (gpbr_readl(rtc) == 0) rtc 434 drivers/rtc/rtc-at91sam9.c dev_name(&rtc->rtcdev->dev)); rtc 436 drivers/rtc/rtc-at91sam9.c return rtc_register_device(rtc->rtcdev); rtc 439 drivers/rtc/rtc-at91sam9.c clk_disable_unprepare(rtc->sclk); rtc 449 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc = platform_get_drvdata(pdev); rtc 450 drivers/rtc/rtc-at91sam9.c u32 mr = rtt_readl(rtc, MR); rtc 453 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr & ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN)); rtc 455 drivers/rtc/rtc-at91sam9.c clk_disable_unprepare(rtc->sclk); rtc 462 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc = platform_get_drvdata(pdev); rtc 463 drivers/rtc/rtc-at91sam9.c u32 mr = rtt_readl(rtc, MR); rtc 465 drivers/rtc/rtc-at91sam9.c rtc->imr = mr & (AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN); rtc 466 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr & ~rtc->imr); rtc 475 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc = dev_get_drvdata(dev); rtc 476 drivers/rtc/rtc-at91sam9.c u32 mr = rtt_readl(rtc, MR); rtc 482 drivers/rtc/rtc-at91sam9.c rtc->imr = mr & (AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN); rtc 483 drivers/rtc/rtc-at91sam9.c if (rtc->imr) { rtc 487 drivers/rtc/rtc-at91sam9.c enable_irq_wake(rtc->irq); rtc 488 drivers/rtc/rtc-at91sam9.c spin_lock_irqsave(&rtc->lock, flags); rtc 489 drivers/rtc/rtc-at91sam9.c rtc->suspended = true; rtc 490 drivers/rtc/rtc-at91sam9.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 493 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr & ~AT91_RTT_RTTINCIEN); rtc 495 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr & ~rtc->imr); rtc 504 drivers/rtc/rtc-at91sam9.c struct sam9_rtc *rtc = dev_get_drvdata(dev); rtc 507 drivers/rtc/rtc-at91sam9.c if (rtc->imr) { rtc 511 drivers/rtc/rtc-at91sam9.c disable_irq_wake(rtc->irq); rtc 512 drivers/rtc/rtc-at91sam9.c mr = rtt_readl(rtc, MR); rtc 513 drivers/rtc/rtc-at91sam9.c rtt_writel(rtc, MR, mr | rtc->imr); rtc 515 drivers/rtc/rtc-at91sam9.c spin_lock_irqsave(&rtc->lock, flags); rtc 516 drivers/rtc/rtc-at91sam9.c rtc->suspended = false; rtc 517 drivers/rtc/rtc-at91sam9.c at91_rtc_cache_events(rtc); rtc 518 drivers/rtc/rtc-at91sam9.c at91_rtc_flush_events(rtc); rtc 519 drivers/rtc/rtc-at91sam9.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 391 drivers/rtc/rtc-bd70528.c struct rtc_device *rtc = data; rtc 393 drivers/rtc/rtc-bd70528.c rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF | RTC_PF); rtc 402 drivers/rtc/rtc-bd70528.c struct rtc_device *rtc; rtc 449 drivers/rtc/rtc-bd70528.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 450 drivers/rtc/rtc-bd70528.c if (IS_ERR(rtc)) { rtc 452 drivers/rtc/rtc-bd70528.c return PTR_ERR(rtc); rtc 455 drivers/rtc/rtc-bd70528.c rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 456 drivers/rtc/rtc-bd70528.c rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 457 drivers/rtc/rtc-bd70528.c rtc->ops = &bd70528_rtc_ops; rtc 461 drivers/rtc/rtc-bd70528.c IRQF_ONESHOT, "bd70528-rtc", rtc); rtc 479 drivers/rtc/rtc-bd70528.c return rtc_register_device(rtc); rtc 256 drivers/rtc/rtc-bq32k.c struct rtc_device *rtc; rtc 283 drivers/rtc/rtc-bq32k.c rtc = devm_rtc_device_register(&client->dev, bq32k_driver.driver.name, rtc 285 drivers/rtc/rtc-bq32k.c if (IS_ERR(rtc)) rtc 286 drivers/rtc/rtc-bq32k.c return PTR_ERR(rtc); rtc 296 drivers/rtc/rtc-bq32k.c i2c_set_clientdata(client, rtc); rtc 23 drivers/rtc/rtc-bq4802.c struct rtc_device *rtc; rtc 179 drivers/rtc/rtc-bq4802.c p->rtc = devm_rtc_device_register(&pdev->dev, "bq4802", rtc 181 drivers/rtc/rtc-bq4802.c if (IS_ERR(p->rtc)) { rtc 182 drivers/rtc/rtc-bq4802.c err = PTR_ERR(p->rtc); rtc 27 drivers/rtc/rtc-brcmstb-waketimer.c struct rtc_device *rtc; rtc 218 drivers/rtc/rtc-brcmstb-waketimer.c timer->rtc = devm_rtc_allocate_device(dev); rtc 219 drivers/rtc/rtc-brcmstb-waketimer.c if (IS_ERR(timer->rtc)) rtc 220 drivers/rtc/rtc-brcmstb-waketimer.c return PTR_ERR(timer->rtc); rtc 254 drivers/rtc/rtc-brcmstb-waketimer.c timer->rtc->ops = &brcmstb_waketmr_ops; rtc 255 drivers/rtc/rtc-brcmstb-waketimer.c timer->rtc->range_max = U32_MAX; rtc 257 drivers/rtc/rtc-brcmstb-waketimer.c ret = rtc_register_device(timer->rtc); rtc 74 drivers/rtc/rtc-cmos.c struct rtc_device *rtc; rtc 335 drivers/rtc/rtc-cmos.c rtc_update_irq(cmos->rtc, 1, rtc_intr); rtc 558 drivers/rtc/rtc-cmos.c cmos->rtc->irq_freq, rtc 797 drivers/rtc/rtc-cmos.c cmos_rtc.rtc = devm_rtc_allocate_device(dev); rtc 798 drivers/rtc/rtc-cmos.c if (IS_ERR(cmos_rtc.rtc)) { rtc 799 drivers/rtc/rtc-cmos.c retval = PTR_ERR(cmos_rtc.rtc); rtc 803 drivers/rtc/rtc-cmos.c rename_region(ports, dev_name(&cmos_rtc.rtc->dev)); rtc 814 drivers/rtc/rtc-cmos.c cmos_rtc.rtc->irq_freq = 1024; rtc 816 drivers/rtc/rtc-cmos.c hpet_set_periodic_freq(cmos_rtc.rtc->irq_freq); rtc 853 drivers/rtc/rtc-cmos.c 0, dev_name(&cmos_rtc.rtc->dev), rtc 854 drivers/rtc/rtc-cmos.c cmos_rtc.rtc); rtc 860 drivers/rtc/rtc-cmos.c cmos_rtc.rtc->ops = &cmos_rtc_ops; rtc 862 drivers/rtc/rtc-cmos.c cmos_rtc.rtc->ops = &cmos_rtc_ops_no_alarm; rtc 865 drivers/rtc/rtc-cmos.c cmos_rtc.rtc->nvram_old_abi = true; rtc 866 drivers/rtc/rtc-cmos.c retval = rtc_register_device(cmos_rtc.rtc); rtc 872 drivers/rtc/rtc-cmos.c if (rtc_nvmem_register(cmos_rtc.rtc, &nvmem_cfg)) rtc 888 drivers/rtc/rtc-cmos.c free_irq(rtc_irq, cmos_rtc.rtc); rtc 915 drivers/rtc/rtc-cmos.c free_irq(cmos->irq, cmos->rtc); rtc 920 drivers/rtc/rtc-cmos.c cmos->rtc = NULL; rtc 1052 drivers/rtc/rtc-cmos.c cmos_interrupt(0, (void *)cmos->rtc); rtc 1107 drivers/rtc/rtc-cmos.c rtc_update_irq(cmos->rtc, 1, mask); rtc 1153 drivers/rtc/rtc-cmos.c cmos_interrupt(0, (void *)cmos->rtc); rtc 1163 drivers/rtc/rtc-cmos.c rtc_update_irq(cmos->rtc, 1, rtc_intr); rtc 1275 drivers/rtc/rtc-cmos.c rtc_update_irq(cmos->rtc, 1, mask); rtc 45 drivers/rtc/rtc-coh901331.c struct rtc_device *rtc; rtc 72 drivers/rtc/rtc-coh901331.c rtc_update_irq(rtap->rtc, 1, RTC_AF); rtc 191 drivers/rtc/rtc-coh901331.c rtap->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 192 drivers/rtc/rtc-coh901331.c if (IS_ERR(rtap->rtc)) rtc 193 drivers/rtc/rtc-coh901331.c return PTR_ERR(rtap->rtc); rtc 195 drivers/rtc/rtc-coh901331.c rtap->rtc->ops = &coh901331_ops; rtc 196 drivers/rtc/rtc-coh901331.c rtap->rtc->range_max = U32_MAX; rtc 208 drivers/rtc/rtc-coh901331.c ret = rtc_register_device(rtap->rtc); rtc 6 drivers/rtc/rtc-core.h extern void rtc_dev_prepare(struct rtc_device *rtc); rtc 18 drivers/rtc/rtc-core.h static inline void rtc_dev_prepare(struct rtc_device *rtc) rtc 26 drivers/rtc/rtc-core.h extern void rtc_proc_add_device(struct rtc_device *rtc); rtc 27 drivers/rtc/rtc-core.h extern void rtc_proc_del_device(struct rtc_device *rtc); rtc 31 drivers/rtc/rtc-core.h static inline void rtc_proc_add_device(struct rtc_device *rtc) rtc 35 drivers/rtc/rtc-core.h static inline void rtc_proc_del_device(struct rtc_device *rtc) rtc 51 drivers/rtc/rtc-cpcap.c static void cpcap2rtc_time(struct rtc_time *rtc, struct cpcap_time *cpcap) rtc 59 drivers/rtc/rtc-cpcap.c rtc_time_to_tm(time, rtc); rtc 62 drivers/rtc/rtc-cpcap.c static void rtc2cpcap_time(struct cpcap_time *cpcap, struct rtc_time *rtc) rtc 66 drivers/rtc/rtc-cpcap.c rtc_tm_to_time(rtc, &time); rtc 76 drivers/rtc/rtc-cpcap.c struct cpcap_rtc *rtc = dev_get_drvdata(dev); rtc 78 drivers/rtc/rtc-cpcap.c if (rtc->alarm_enabled == enabled) rtc 82 drivers/rtc/rtc-cpcap.c enable_irq(rtc->alarm_irq); rtc 84 drivers/rtc/rtc-cpcap.c disable_irq(rtc->alarm_irq); rtc 86 drivers/rtc/rtc-cpcap.c rtc->alarm_enabled = !!enabled; rtc 93 drivers/rtc/rtc-cpcap.c struct cpcap_rtc *rtc; rtc 98 drivers/rtc/rtc-cpcap.c rtc = dev_get_drvdata(dev); rtc 100 drivers/rtc/rtc-cpcap.c ret = regmap_read(rtc->regmap, CPCAP_REG_TOD2, &temp_tod2); rtc 101 drivers/rtc/rtc-cpcap.c ret |= regmap_read(rtc->regmap, CPCAP_REG_DAY, &cpcap_tm.day); rtc 102 drivers/rtc/rtc-cpcap.c ret |= regmap_read(rtc->regmap, CPCAP_REG_TOD1, &cpcap_tm.tod1); rtc 103 drivers/rtc/rtc-cpcap.c ret |= regmap_read(rtc->regmap, CPCAP_REG_TOD2, &cpcap_tm.tod2); rtc 106 drivers/rtc/rtc-cpcap.c ret |= regmap_read(rtc->regmap, CPCAP_REG_DAY, &cpcap_tm.day); rtc 120 drivers/rtc/rtc-cpcap.c struct cpcap_rtc *rtc; rtc 124 drivers/rtc/rtc-cpcap.c rtc = dev_get_drvdata(dev); rtc 128 drivers/rtc/rtc-cpcap.c if (rtc->alarm_enabled) rtc 129 drivers/rtc/rtc-cpcap.c disable_irq(rtc->alarm_irq); rtc 130 drivers/rtc/rtc-cpcap.c if (rtc->update_enabled) rtc 131 drivers/rtc/rtc-cpcap.c disable_irq(rtc->update_irq); rtc 133 drivers/rtc/rtc-cpcap.c if (rtc->vendor == CPCAP_VENDOR_ST) { rtc 137 drivers/rtc/rtc-cpcap.c ret |= regmap_update_bits(rtc->regmap, CPCAP_REG_TOD1, rtc 139 drivers/rtc/rtc-cpcap.c ret |= regmap_update_bits(rtc->regmap, CPCAP_REG_TOD2, rtc 141 drivers/rtc/rtc-cpcap.c ret |= regmap_update_bits(rtc->regmap, CPCAP_REG_DAY, rtc 151 drivers/rtc/rtc-cpcap.c ret |= regmap_update_bits(rtc->regmap, CPCAP_REG_TOD1, rtc 153 drivers/rtc/rtc-cpcap.c ret |= regmap_update_bits(rtc->regmap, CPCAP_REG_DAY, rtc 155 drivers/rtc/rtc-cpcap.c ret |= regmap_update_bits(rtc->regmap, CPCAP_REG_TOD2, rtc 157 drivers/rtc/rtc-cpcap.c ret |= regmap_update_bits(rtc->regmap, CPCAP_REG_TOD1, rtc 161 drivers/rtc/rtc-cpcap.c if (rtc->update_enabled) rtc 162 drivers/rtc/rtc-cpcap.c enable_irq(rtc->update_irq); rtc 163 drivers/rtc/rtc-cpcap.c if (rtc->alarm_enabled) rtc 164 drivers/rtc/rtc-cpcap.c enable_irq(rtc->alarm_irq); rtc 171 drivers/rtc/rtc-cpcap.c struct cpcap_rtc *rtc; rtc 175 drivers/rtc/rtc-cpcap.c rtc = dev_get_drvdata(dev); rtc 177 drivers/rtc/rtc-cpcap.c alrm->enabled = rtc->alarm_enabled; rtc 179 drivers/rtc/rtc-cpcap.c ret = regmap_read(rtc->regmap, CPCAP_REG_DAYA, &cpcap_tm.day); rtc 180 drivers/rtc/rtc-cpcap.c ret |= regmap_read(rtc->regmap, CPCAP_REG_TODA2, &cpcap_tm.tod2); rtc 181 drivers/rtc/rtc-cpcap.c ret |= regmap_read(rtc->regmap, CPCAP_REG_TODA1, &cpcap_tm.tod1); rtc 194 drivers/rtc/rtc-cpcap.c struct cpcap_rtc *rtc; rtc 198 drivers/rtc/rtc-cpcap.c rtc = dev_get_drvdata(dev); rtc 202 drivers/rtc/rtc-cpcap.c if (rtc->alarm_enabled) rtc 203 drivers/rtc/rtc-cpcap.c disable_irq(rtc->alarm_irq); rtc 205 drivers/rtc/rtc-cpcap.c ret = regmap_update_bits(rtc->regmap, CPCAP_REG_DAYA, DAY_MASK, rtc 207 drivers/rtc/rtc-cpcap.c ret |= regmap_update_bits(rtc->regmap, CPCAP_REG_TODA2, TOD2_MASK, rtc 209 drivers/rtc/rtc-cpcap.c ret |= regmap_update_bits(rtc->regmap, CPCAP_REG_TODA1, TOD1_MASK, rtc 213 drivers/rtc/rtc-cpcap.c enable_irq(rtc->alarm_irq); rtc 214 drivers/rtc/rtc-cpcap.c rtc->alarm_enabled = true; rtc 230 drivers/rtc/rtc-cpcap.c struct cpcap_rtc *rtc = data; rtc 232 drivers/rtc/rtc-cpcap.c rtc_update_irq(rtc->rtc_dev, 1, RTC_AF | RTC_IRQF); rtc 238 drivers/rtc/rtc-cpcap.c struct cpcap_rtc *rtc = data; rtc 240 drivers/rtc/rtc-cpcap.c rtc_update_irq(rtc->rtc_dev, 1, RTC_UF | RTC_IRQF); rtc 247 drivers/rtc/rtc-cpcap.c struct cpcap_rtc *rtc; rtc 250 drivers/rtc/rtc-cpcap.c rtc = devm_kzalloc(dev, sizeof(*rtc), GFP_KERNEL); rtc 251 drivers/rtc/rtc-cpcap.c if (!rtc) rtc 254 drivers/rtc/rtc-cpcap.c rtc->regmap = dev_get_regmap(dev->parent, NULL); rtc 255 drivers/rtc/rtc-cpcap.c if (!rtc->regmap) rtc 258 drivers/rtc/rtc-cpcap.c platform_set_drvdata(pdev, rtc); rtc 259 drivers/rtc/rtc-cpcap.c rtc->rtc_dev = devm_rtc_device_register(dev, "cpcap_rtc", rtc 262 drivers/rtc/rtc-cpcap.c if (IS_ERR(rtc->rtc_dev)) rtc 263 drivers/rtc/rtc-cpcap.c return PTR_ERR(rtc->rtc_dev); rtc 265 drivers/rtc/rtc-cpcap.c err = cpcap_get_vendor(dev, rtc->regmap, &rtc->vendor); rtc 269 drivers/rtc/rtc-cpcap.c rtc->alarm_irq = platform_get_irq(pdev, 0); rtc 270 drivers/rtc/rtc-cpcap.c err = devm_request_threaded_irq(dev, rtc->alarm_irq, NULL, rtc 272 drivers/rtc/rtc-cpcap.c "rtc_alarm", rtc); rtc 277 drivers/rtc/rtc-cpcap.c disable_irq(rtc->alarm_irq); rtc 285 drivers/rtc/rtc-cpcap.c rtc->update_irq = platform_get_irq(pdev, 1); rtc 286 drivers/rtc/rtc-cpcap.c err = devm_request_threaded_irq(dev, rtc->update_irq, NULL, rtc 288 drivers/rtc/rtc-cpcap.c "rtc_1hz", rtc); rtc 293 drivers/rtc/rtc-cpcap.c disable_irq(rtc->update_irq); rtc 28 drivers/rtc/rtc-cros-ec.c struct rtc_device *rtc; rtc 270 drivers/rtc/rtc-cros-ec.c struct rtc_device *rtc; rtc 275 drivers/rtc/rtc-cros-ec.c rtc = cros_ec_rtc->rtc; rtc 280 drivers/rtc/rtc-cros-ec.c rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF); rtc 351 drivers/rtc/rtc-cros-ec.c cros_ec_rtc->rtc = devm_rtc_device_register(&pdev->dev, DRV_NAME, rtc 354 drivers/rtc/rtc-cros-ec.c if (IS_ERR(cros_ec_rtc->rtc)) { rtc 355 drivers/rtc/rtc-cros-ec.c ret = PTR_ERR(cros_ec_rtc->rtc); rtc 19 drivers/rtc/rtc-da9052.c #define rtc_err(rtc, fmt, ...) \ rtc 20 drivers/rtc/rtc-da9052.c dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__) rtc 25 drivers/rtc/rtc-da9052.c struct rtc_device *rtc; rtc 29 drivers/rtc/rtc-da9052.c static int da9052_rtc_enable_alarm(struct da9052_rtc *rtc, bool enable) rtc 33 drivers/rtc/rtc-da9052.c ret = da9052_reg_update(rtc->da9052, DA9052_ALARM_Y_REG, rtc 37 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Failed to enable ALM: %d\n", ret); rtc 39 drivers/rtc/rtc-da9052.c ret = da9052_reg_update(rtc->da9052, DA9052_ALARM_Y_REG, rtc 42 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Write error: %d\n", ret); rtc 49 drivers/rtc/rtc-da9052.c struct da9052_rtc *rtc = data; rtc 51 drivers/rtc/rtc-da9052.c rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF); rtc 56 drivers/rtc/rtc-da9052.c static int da9052_read_alarm(struct da9052_rtc *rtc, struct rtc_time *rtc_tm) rtc 63 drivers/rtc/rtc-da9052.c ret = da9052_group_read(rtc->da9052, DA9052_ALARM_MI_REG, 5, &v[0][0]); rtc 65 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Failed to group read ALM: %d\n", ret); rtc 70 drivers/rtc/rtc-da9052.c ret = da9052_group_read(rtc->da9052, rtc 73 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Failed to group read ALM: %d\n", ret); rtc 94 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Timed out reading alarm time\n"); rtc 99 drivers/rtc/rtc-da9052.c static int da9052_set_alarm(struct da9052_rtc *rtc, struct rtc_time *rtc_tm) rtc 101 drivers/rtc/rtc-da9052.c struct da9052 *da9052 = rtc->da9052; rtc 122 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Failed to write ALRM MIN: %d\n", ret); rtc 137 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Failed to write ALRM YEAR: %d\n", ret); rtc 142 drivers/rtc/rtc-da9052.c static int da9052_rtc_get_alarm_status(struct da9052_rtc *rtc) rtc 146 drivers/rtc/rtc-da9052.c ret = da9052_reg_read(rtc->da9052, DA9052_ALARM_Y_REG); rtc 148 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Failed to read ALM: %d\n", ret); rtc 157 drivers/rtc/rtc-da9052.c struct da9052_rtc *rtc = dev_get_drvdata(dev); rtc 163 drivers/rtc/rtc-da9052.c ret = da9052_group_read(rtc->da9052, DA9052_COUNT_S_REG, 6, &v[0][0]); rtc 165 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Failed to read RTC time : %d\n", ret); rtc 170 drivers/rtc/rtc-da9052.c ret = da9052_group_read(rtc->da9052, rtc 173 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Failed to read RTC time : %d\n", ret); rtc 193 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Timed out reading time\n"); rtc 200 drivers/rtc/rtc-da9052.c struct da9052_rtc *rtc; rtc 208 drivers/rtc/rtc-da9052.c rtc = dev_get_drvdata(dev); rtc 217 drivers/rtc/rtc-da9052.c ret = da9052_group_write(rtc->da9052, DA9052_COUNT_S_REG, 6, v); rtc 219 drivers/rtc/rtc-da9052.c rtc_err(rtc, "failed to set RTC time: %d\n", ret); rtc 227 drivers/rtc/rtc-da9052.c struct da9052_rtc *rtc = dev_get_drvdata(dev); rtc 229 drivers/rtc/rtc-da9052.c ret = da9052_read_alarm(rtc, tm); rtc 231 drivers/rtc/rtc-da9052.c rtc_err(rtc, "failed to read RTC alarm: %d\n", ret); rtc 235 drivers/rtc/rtc-da9052.c alrm->enabled = da9052_rtc_get_alarm_status(rtc); rtc 243 drivers/rtc/rtc-da9052.c struct da9052_rtc *rtc = dev_get_drvdata(dev); rtc 249 drivers/rtc/rtc-da9052.c ret = da9052_rtc_enable_alarm(rtc, 0); rtc 253 drivers/rtc/rtc-da9052.c ret = da9052_set_alarm(rtc, tm); rtc 257 drivers/rtc/rtc-da9052.c ret = da9052_rtc_enable_alarm(rtc, 1); rtc 263 drivers/rtc/rtc-da9052.c struct da9052_rtc *rtc = dev_get_drvdata(dev); rtc 265 drivers/rtc/rtc-da9052.c return da9052_rtc_enable_alarm(rtc, enabled); rtc 278 drivers/rtc/rtc-da9052.c struct da9052_rtc *rtc; rtc 281 drivers/rtc/rtc-da9052.c rtc = devm_kzalloc(&pdev->dev, sizeof(struct da9052_rtc), GFP_KERNEL); rtc 282 drivers/rtc/rtc-da9052.c if (!rtc) rtc 285 drivers/rtc/rtc-da9052.c rtc->da9052 = dev_get_drvdata(pdev->dev.parent); rtc 286 drivers/rtc/rtc-da9052.c platform_set_drvdata(pdev, rtc); rtc 288 drivers/rtc/rtc-da9052.c ret = da9052_reg_write(rtc->da9052, DA9052_BBAT_CONT_REG, 0xFE); rtc 290 drivers/rtc/rtc-da9052.c rtc_err(rtc, rtc 295 drivers/rtc/rtc-da9052.c ret = da9052_reg_update(rtc->da9052, DA9052_ALARM_Y_REG, rtc 298 drivers/rtc/rtc-da9052.c rtc_err(rtc, "Failed to disable TICKS: %d\n", ret); rtc 301 drivers/rtc/rtc-da9052.c rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 304 drivers/rtc/rtc-da9052.c if (IS_ERR(rtc->rtc)) rtc 305 drivers/rtc/rtc-da9052.c return PTR_ERR(rtc->rtc); rtc 307 drivers/rtc/rtc-da9052.c ret = da9052_request_irq(rtc->da9052, DA9052_IRQ_ALARM, "ALM", rtc 308 drivers/rtc/rtc-da9052.c da9052_rtc_irq, rtc); rtc 310 drivers/rtc/rtc-da9052.c rtc_err(rtc, "irq registration failed: %d\n", ret); rtc 19 drivers/rtc/rtc-da9055.c struct rtc_device *rtc; rtc 24 drivers/rtc/rtc-da9055.c static int da9055_rtc_enable_alarm(struct da9055_rtc *rtc, bool enable) rtc 28 drivers/rtc/rtc-da9055.c ret = da9055_reg_update(rtc->da9055, DA9055_REG_ALARM_Y, rtc 32 drivers/rtc/rtc-da9055.c dev_err(rtc->da9055->dev, "Failed to enable ALM: %d\n", rtc 34 drivers/rtc/rtc-da9055.c rtc->alarm_enable = 1; rtc 36 drivers/rtc/rtc-da9055.c ret = da9055_reg_update(rtc->da9055, DA9055_REG_ALARM_Y, rtc 39 drivers/rtc/rtc-da9055.c dev_err(rtc->da9055->dev, rtc 41 drivers/rtc/rtc-da9055.c rtc->alarm_enable = 0; rtc 48 drivers/rtc/rtc-da9055.c struct da9055_rtc *rtc = data; rtc 50 drivers/rtc/rtc-da9055.c da9055_rtc_enable_alarm(rtc, 0); rtc 51 drivers/rtc/rtc-da9055.c rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF); rtc 127 drivers/rtc/rtc-da9055.c struct da9055_rtc *rtc = dev_get_drvdata(dev); rtc 131 drivers/rtc/rtc-da9055.c ret = da9055_reg_read(rtc->da9055, DA9055_REG_COUNT_S); rtc 142 drivers/rtc/rtc-da9055.c ret = da9055_group_read(rtc->da9055, DA9055_REG_COUNT_S, 6, v); rtc 144 drivers/rtc/rtc-da9055.c dev_err(rtc->da9055->dev, "Failed to read RTC time : %d\n", rtc 161 drivers/rtc/rtc-da9055.c struct da9055_rtc *rtc; rtc 164 drivers/rtc/rtc-da9055.c rtc = dev_get_drvdata(dev); rtc 173 drivers/rtc/rtc-da9055.c return da9055_group_write(rtc->da9055, DA9055_REG_COUNT_S, 6, v); rtc 180 drivers/rtc/rtc-da9055.c struct da9055_rtc *rtc = dev_get_drvdata(dev); rtc 182 drivers/rtc/rtc-da9055.c ret = da9055_read_alarm(rtc->da9055, tm); rtc 187 drivers/rtc/rtc-da9055.c alrm->enabled = da9055_rtc_get_alarm_status(rtc->da9055); rtc 196 drivers/rtc/rtc-da9055.c struct da9055_rtc *rtc = dev_get_drvdata(dev); rtc 198 drivers/rtc/rtc-da9055.c ret = da9055_rtc_enable_alarm(rtc, 0); rtc 202 drivers/rtc/rtc-da9055.c ret = da9055_set_alarm(rtc->da9055, tm); rtc 206 drivers/rtc/rtc-da9055.c ret = da9055_rtc_enable_alarm(rtc, 1); rtc 213 drivers/rtc/rtc-da9055.c struct da9055_rtc *rtc = dev_get_drvdata(dev); rtc 215 drivers/rtc/rtc-da9055.c return da9055_rtc_enable_alarm(rtc, enabled); rtc 268 drivers/rtc/rtc-da9055.c struct da9055_rtc *rtc; rtc 272 drivers/rtc/rtc-da9055.c rtc = devm_kzalloc(&pdev->dev, sizeof(struct da9055_rtc), GFP_KERNEL); rtc 273 drivers/rtc/rtc-da9055.c if (!rtc) rtc 276 drivers/rtc/rtc-da9055.c rtc->da9055 = dev_get_drvdata(pdev->dev.parent); rtc 277 drivers/rtc/rtc-da9055.c pdata = dev_get_platdata(rtc->da9055->dev); rtc 278 drivers/rtc/rtc-da9055.c platform_set_drvdata(pdev, rtc); rtc 280 drivers/rtc/rtc-da9055.c ret = da9055_rtc_device_init(rtc->da9055, pdata); rtc 284 drivers/rtc/rtc-da9055.c ret = da9055_reg_read(rtc->da9055, DA9055_REG_ALARM_Y); rtc 289 drivers/rtc/rtc-da9055.c rtc->alarm_enable = 1; rtc 293 drivers/rtc/rtc-da9055.c rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 295 drivers/rtc/rtc-da9055.c if (IS_ERR(rtc->rtc)) { rtc 296 drivers/rtc/rtc-da9055.c ret = PTR_ERR(rtc->rtc); rtc 307 drivers/rtc/rtc-da9055.c "ALM", rtc); rtc 309 drivers/rtc/rtc-da9055.c dev_err(rtc->da9055->dev, "irq registration failed: %d\n", ret); rtc 321 drivers/rtc/rtc-da9055.c struct da9055_rtc *rtc = dev_get_drvdata(&pdev->dev); rtc 326 drivers/rtc/rtc-da9055.c ret = da9055_rtc_enable_alarm(rtc, 0); rtc 340 drivers/rtc/rtc-da9055.c struct da9055_rtc *rtc = dev_get_drvdata(&pdev->dev); rtc 344 drivers/rtc/rtc-da9055.c if (rtc->alarm_enable) { rtc 345 drivers/rtc/rtc-da9055.c ret = da9055_rtc_enable_alarm(rtc, 1); rtc 359 drivers/rtc/rtc-da9055.c struct da9055_rtc *rtc = dev_get_drvdata(&pdev->dev); rtc 362 drivers/rtc/rtc-da9055.c ret = da9055_rtc_enable_alarm(rtc, 0); rtc 167 drivers/rtc/rtc-da9063.c struct da9063_compatible_rtc *rtc) rtc 169 drivers/rtc/rtc-da9063.c const struct da9063_compatible_rtc_regmap *config = rtc->config; rtc 182 drivers/rtc/rtc-da9063.c struct da9063_compatible_rtc *rtc) rtc 184 drivers/rtc/rtc-da9063.c const struct da9063_compatible_rtc_regmap *config = rtc->config; rtc 198 drivers/rtc/rtc-da9063.c struct da9063_compatible_rtc *rtc = dev_get_drvdata(dev); rtc 199 drivers/rtc/rtc-da9063.c const struct da9063_compatible_rtc_regmap *config = rtc->config; rtc 201 drivers/rtc/rtc-da9063.c return regmap_update_bits(rtc->regmap, rtc 209 drivers/rtc/rtc-da9063.c struct da9063_compatible_rtc *rtc = dev_get_drvdata(dev); rtc 210 drivers/rtc/rtc-da9063.c const struct da9063_compatible_rtc_regmap *config = rtc->config; rtc 212 drivers/rtc/rtc-da9063.c return regmap_update_bits(rtc->regmap, rtc 220 drivers/rtc/rtc-da9063.c struct da9063_compatible_rtc *rtc = dev_get_drvdata(dev); rtc 221 drivers/rtc/rtc-da9063.c const struct da9063_compatible_rtc_regmap *config = rtc->config; rtc 227 drivers/rtc/rtc-da9063.c ret = regmap_bulk_read(rtc->regmap, rtc 240 drivers/rtc/rtc-da9063.c da9063_data_to_tm(data, tm, rtc); rtc 243 drivers/rtc/rtc-da9063.c al_secs = rtc_tm_to_time64(&rtc->alarm_time); rtc 246 drivers/rtc/rtc-da9063.c if (rtc->rtc_sync == true && al_secs - tm_secs == 1) rtc 247 drivers/rtc/rtc-da9063.c memcpy(tm, &rtc->alarm_time, sizeof(struct rtc_time)); rtc 249 drivers/rtc/rtc-da9063.c rtc->rtc_sync = false; rtc 256 drivers/rtc/rtc-da9063.c struct da9063_compatible_rtc *rtc = dev_get_drvdata(dev); rtc 257 drivers/rtc/rtc-da9063.c const struct da9063_compatible_rtc_regmap *config = rtc->config; rtc 261 drivers/rtc/rtc-da9063.c da9063_tm_to_data(tm, data, rtc); rtc 262 drivers/rtc/rtc-da9063.c ret = regmap_bulk_write(rtc->regmap, rtc 273 drivers/rtc/rtc-da9063.c struct da9063_compatible_rtc *rtc = dev_get_drvdata(dev); rtc 274 drivers/rtc/rtc-da9063.c const struct da9063_compatible_rtc_regmap *config = rtc->config; rtc 280 drivers/rtc/rtc-da9063.c ret = regmap_bulk_read(rtc->regmap, rtc 287 drivers/rtc/rtc-da9063.c da9063_data_to_tm(data, &alrm->time, rtc); rtc 291 drivers/rtc/rtc-da9063.c ret = regmap_read(rtc->regmap, rtc 307 drivers/rtc/rtc-da9063.c struct da9063_compatible_rtc *rtc = dev_get_drvdata(dev); rtc 308 drivers/rtc/rtc-da9063.c const struct da9063_compatible_rtc_regmap *config = rtc->config; rtc 312 drivers/rtc/rtc-da9063.c da9063_tm_to_data(&alrm->time, data, rtc); rtc 320 drivers/rtc/rtc-da9063.c ret = regmap_bulk_write(rtc->regmap, rtc 329 drivers/rtc/rtc-da9063.c da9063_data_to_tm(data, &rtc->alarm_time, rtc); rtc 353 drivers/rtc/rtc-da9063.c struct da9063_compatible_rtc *rtc = data; rtc 354 drivers/rtc/rtc-da9063.c const struct da9063_compatible_rtc_regmap *config = rtc->config; rtc 356 drivers/rtc/rtc-da9063.c regmap_update_bits(rtc->regmap, rtc 361 drivers/rtc/rtc-da9063.c rtc->rtc_sync = true; rtc 362 drivers/rtc/rtc-da9063.c rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF); rtc 377 drivers/rtc/rtc-da9063.c struct da9063_compatible_rtc *rtc; rtc 390 drivers/rtc/rtc-da9063.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 391 drivers/rtc/rtc-da9063.c if (!rtc) rtc 394 drivers/rtc/rtc-da9063.c rtc->config = match->data; rtc 399 drivers/rtc/rtc-da9063.c rtc->config = &da9063_ad_regs; rtc 402 drivers/rtc/rtc-da9063.c rtc->regmap = dev_get_regmap(pdev->dev.parent, NULL); rtc 403 drivers/rtc/rtc-da9063.c if (!rtc->regmap) { rtc 408 drivers/rtc/rtc-da9063.c config = rtc->config; rtc 409 drivers/rtc/rtc-da9063.c ret = regmap_update_bits(rtc->regmap, rtc 418 drivers/rtc/rtc-da9063.c ret = regmap_update_bits(rtc->regmap, rtc 427 drivers/rtc/rtc-da9063.c ret = regmap_update_bits(rtc->regmap, rtc 436 drivers/rtc/rtc-da9063.c ret = regmap_update_bits(rtc->regmap, rtc 445 drivers/rtc/rtc-da9063.c ret = regmap_update_bits(rtc->regmap, rtc 455 drivers/rtc/rtc-da9063.c ret = regmap_bulk_read(rtc->regmap, rtc 465 drivers/rtc/rtc-da9063.c platform_set_drvdata(pdev, rtc); rtc 467 drivers/rtc/rtc-da9063.c rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev); rtc 468 drivers/rtc/rtc-da9063.c if (IS_ERR(rtc->rtc_dev)) rtc 469 drivers/rtc/rtc-da9063.c return PTR_ERR(rtc->rtc_dev); rtc 471 drivers/rtc/rtc-da9063.c rtc->rtc_dev->ops = &da9063_rtc_ops; rtc 472 drivers/rtc/rtc-da9063.c rtc->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 473 drivers/rtc/rtc-da9063.c rtc->rtc_dev->range_max = RTC_TIMESTAMP_END_2063; rtc 475 drivers/rtc/rtc-da9063.c da9063_data_to_tm(data, &rtc->alarm_time, rtc); rtc 476 drivers/rtc/rtc-da9063.c rtc->rtc_sync = false; rtc 483 drivers/rtc/rtc-da9063.c rtc->rtc_dev->uie_unsupported = 1; rtc 489 drivers/rtc/rtc-da9063.c "ALARM", rtc); rtc 494 drivers/rtc/rtc-da9063.c return rtc_register_device(rtc->rtc_dev); rtc 107 drivers/rtc/rtc-davinci.c struct rtc_device *rtc; rtc 192 drivers/rtc/rtc-davinci.c rtc_update_irq(davinci_rtc->rtc, 1, events); rtc 490 drivers/rtc/rtc-davinci.c davinci_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 492 drivers/rtc/rtc-davinci.c if (IS_ERR(davinci_rtc->rtc)) { rtc 495 drivers/rtc/rtc-davinci.c return PTR_ERR(davinci_rtc->rtc); rtc 41 drivers/rtc/rtc-digicolor.c static int dc_rtc_cmds(struct dc_rtc *rtc, const u8 *cmds, int len) rtc 48 drivers/rtc/rtc-digicolor.c rtc->regs + DC_RTC_CONTROL); rtc 50 drivers/rtc/rtc-digicolor.c rtc->regs + DC_RTC_CONTROL, val, rtc 59 drivers/rtc/rtc-digicolor.c static int dc_rtc_read(struct dc_rtc *rtc, unsigned long *val) rtc 65 drivers/rtc/rtc-digicolor.c ret = dc_rtc_cmds(rtc, read_cmds, ARRAY_SIZE(read_cmds)); rtc 69 drivers/rtc/rtc-digicolor.c reference = readl_relaxed(rtc->regs + DC_RTC_REFERENCE); rtc 70 drivers/rtc/rtc-digicolor.c time1 = readl_relaxed(rtc->regs + DC_RTC_TIME); rtc 73 drivers/rtc/rtc-digicolor.c time2 = readl_relaxed(rtc->regs + DC_RTC_TIME); rtc 83 drivers/rtc/rtc-digicolor.c static int dc_rtc_write(struct dc_rtc *rtc, u32 val) rtc 87 drivers/rtc/rtc-digicolor.c writel_relaxed(val, rtc->regs + DC_RTC_REFERENCE); rtc 88 drivers/rtc/rtc-digicolor.c return dc_rtc_cmds(rtc, write_cmds, ARRAY_SIZE(write_cmds)); rtc 93 drivers/rtc/rtc-digicolor.c struct dc_rtc *rtc = dev_get_drvdata(dev); rtc 97 drivers/rtc/rtc-digicolor.c ret = dc_rtc_read(rtc, &now); rtc 107 drivers/rtc/rtc-digicolor.c struct dc_rtc *rtc = dev_get_drvdata(dev); rtc 109 drivers/rtc/rtc-digicolor.c return dc_rtc_write(rtc, rtc_tm_to_time64(tm)); rtc 114 drivers/rtc/rtc-digicolor.c struct dc_rtc *rtc = dev_get_drvdata(dev); rtc 119 drivers/rtc/rtc-digicolor.c alarm_reg = readl_relaxed(rtc->regs + DC_RTC_ALARM); rtc 120 drivers/rtc/rtc-digicolor.c reference = readl_relaxed(rtc->regs + DC_RTC_REFERENCE); rtc 123 drivers/rtc/rtc-digicolor.c ret = dc_rtc_read(rtc, &now); rtc 128 drivers/rtc/rtc-digicolor.c alarm->enabled = readl_relaxed(rtc->regs + DC_RTC_INTENABLE); rtc 135 drivers/rtc/rtc-digicolor.c struct dc_rtc *rtc = dev_get_drvdata(dev); rtc 141 drivers/rtc/rtc-digicolor.c reference = readl_relaxed(rtc->regs + DC_RTC_REFERENCE); rtc 142 drivers/rtc/rtc-digicolor.c writel_relaxed(alarm_time - reference, rtc->regs + DC_RTC_ALARM); rtc 144 drivers/rtc/rtc-digicolor.c writeb_relaxed(!!alarm->enabled, rtc->regs + DC_RTC_INTENABLE); rtc 151 drivers/rtc/rtc-digicolor.c struct dc_rtc *rtc = dev_get_drvdata(dev); rtc 153 drivers/rtc/rtc-digicolor.c writeb_relaxed(!!enabled, rtc->regs + DC_RTC_INTENABLE); rtc 168 drivers/rtc/rtc-digicolor.c struct dc_rtc *rtc = dev_id; rtc 170 drivers/rtc/rtc-digicolor.c writeb_relaxed(1, rtc->regs + DC_RTC_INTFLAG_CLEAR); rtc 171 drivers/rtc/rtc-digicolor.c rtc_update_irq(rtc->rtc_dev, 1, RTC_AF | RTC_IRQF); rtc 179 drivers/rtc/rtc-digicolor.c struct dc_rtc *rtc; rtc 182 drivers/rtc/rtc-digicolor.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 183 drivers/rtc/rtc-digicolor.c if (!rtc) rtc 187 drivers/rtc/rtc-digicolor.c rtc->regs = devm_ioremap_resource(&pdev->dev, res); rtc 188 drivers/rtc/rtc-digicolor.c if (IS_ERR(rtc->regs)) rtc 189 drivers/rtc/rtc-digicolor.c return PTR_ERR(rtc->regs); rtc 191 drivers/rtc/rtc-digicolor.c rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev); rtc 192 drivers/rtc/rtc-digicolor.c if (IS_ERR(rtc->rtc_dev)) rtc 193 drivers/rtc/rtc-digicolor.c return PTR_ERR(rtc->rtc_dev); rtc 198 drivers/rtc/rtc-digicolor.c ret = devm_request_irq(&pdev->dev, irq, dc_rtc_irq, 0, pdev->name, rtc); rtc 202 drivers/rtc/rtc-digicolor.c platform_set_drvdata(pdev, rtc); rtc 204 drivers/rtc/rtc-digicolor.c rtc->rtc_dev->ops = &dc_rtc_ops; rtc 205 drivers/rtc/rtc-digicolor.c rtc->rtc_dev->range_max = U32_MAX; rtc 207 drivers/rtc/rtc-digicolor.c return rtc_register_device(rtc->rtc_dev); rtc 124 drivers/rtc/rtc-dm355evm.c struct rtc_device *rtc; rtc 126 drivers/rtc/rtc-dm355evm.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 127 drivers/rtc/rtc-dm355evm.c if (IS_ERR(rtc)) rtc 128 drivers/rtc/rtc-dm355evm.c return PTR_ERR(rtc); rtc 130 drivers/rtc/rtc-dm355evm.c platform_set_drvdata(pdev, rtc); rtc 132 drivers/rtc/rtc-dm355evm.c rtc->ops = &dm355evm_rtc_ops; rtc 133 drivers/rtc/rtc-dm355evm.c rtc->range_max = U32_MAX; rtc 135 drivers/rtc/rtc-dm355evm.c return rtc_register_device(rtc); rtc 30 drivers/rtc/rtc-ds1216.c struct rtc_device *rtc; rtc 155 drivers/rtc/rtc-ds1216.c priv->rtc = devm_rtc_device_register(&pdev->dev, "ds1216", rtc 157 drivers/rtc/rtc-ds1216.c if (IS_ERR(priv->rtc)) rtc 158 drivers/rtc/rtc-ds1216.c return PTR_ERR(priv->rtc); rtc 20 drivers/rtc/rtc-ds1286.c struct rtc_device *rtc; rtc 325 drivers/rtc/rtc-ds1286.c struct rtc_device *rtc; rtc 340 drivers/rtc/rtc-ds1286.c rtc = devm_rtc_device_register(&pdev->dev, "ds1286", &ds1286_ops, rtc 342 drivers/rtc/rtc-ds1286.c if (IS_ERR(rtc)) rtc 343 drivers/rtc/rtc-ds1286.c return PTR_ERR(rtc); rtc 344 drivers/rtc/rtc-ds1286.c priv->rtc = rtc; rtc 108 drivers/rtc/rtc-ds1302.c struct rtc_device *rtc; rtc 179 drivers/rtc/rtc-ds1302.c rtc = devm_rtc_device_register(&spi->dev, "ds1302", rtc 181 drivers/rtc/rtc-ds1302.c if (IS_ERR(rtc)) { rtc 182 drivers/rtc/rtc-ds1302.c status = PTR_ERR(rtc); rtc 86 drivers/rtc/rtc-ds1305.c struct rtc_device *rtc; rtc 442 drivers/rtc/rtc-ds1305.c struct mutex *lock = &ds1305->rtc->ops_lock; rtc 471 drivers/rtc/rtc-ds1305.c rtc_update_irq(ds1305->rtc, 1, RTC_AF | RTC_IRQF); rtc 692 drivers/rtc/rtc-ds1305.c ds1305->rtc = devm_rtc_allocate_device(&spi->dev); rtc 693 drivers/rtc/rtc-ds1305.c if (IS_ERR(ds1305->rtc)) rtc 694 drivers/rtc/rtc-ds1305.c return PTR_ERR(ds1305->rtc); rtc 696 drivers/rtc/rtc-ds1305.c ds1305->rtc->ops = &ds1305_ops; rtc 699 drivers/rtc/rtc-ds1305.c ds1305->rtc->nvram_old_abi = true; rtc 700 drivers/rtc/rtc-ds1305.c status = rtc_register_device(ds1305->rtc); rtc 704 drivers/rtc/rtc-ds1305.c rtc_nvmem_register(ds1305->rtc, &ds1305_nvmem_cfg); rtc 715 drivers/rtc/rtc-ds1305.c 0, dev_name(&ds1305->rtc->dev), ds1305); rtc 163 drivers/rtc/rtc-ds1307.c struct rtc_device *rtc; rtc 514 drivers/rtc/rtc-ds1307.c struct mutex *lock = &ds1307->rtc->ops_lock; rtc 535 drivers/rtc/rtc-ds1307.c rtc_update_irq(ds1307->rtc, 1, RTC_AF | RTC_IRQF); rtc 656 drivers/rtc/rtc-ds1307.c struct mutex *lock = &ds1307->rtc->ops_lock; rtc 678 drivers/rtc/rtc-ds1307.c rtc_update_irq(ds1307->rtc, 1, RTC_AF | RTC_IRQF); rtc 1087 drivers/rtc/rtc-ds1307.c struct mutex *lock = &ds1307->rtc->ops_lock; rtc 1104 drivers/rtc/rtc-ds1307.c rtc_update_irq(ds1307->rtc, 1, RTC_AF | RTC_IRQF); rtc 1175 drivers/rtc/rtc-ds1307.c err = rtc_add_group(ds1307->rtc, &rtc_freq_test_attr_group); rtc 1337 drivers/rtc/rtc-ds1307.c struct mutex *lock = &ds1307->rtc->ops_lock; rtc 1447 drivers/rtc/rtc-ds1307.c struct mutex *lock = &ds1307->rtc->ops_lock; rtc 1807 drivers/rtc/rtc-ds1307.c ds1307->rtc = devm_rtc_allocate_device(ds1307->dev); rtc 1808 drivers/rtc/rtc-ds1307.c if (IS_ERR(ds1307->rtc)) rtc 1809 drivers/rtc/rtc-ds1307.c return PTR_ERR(ds1307->rtc); rtc 1815 drivers/rtc/rtc-ds1307.c ds1307->rtc->uie_unsupported = 1; rtc 1833 drivers/rtc/rtc-ds1307.c ds1307->rtc->ops = chip->rtc_ops ?: &ds13xx_rtc_ops; rtc 1838 drivers/rtc/rtc-ds1307.c err = rtc_register_device(ds1307->rtc); rtc 1853 drivers/rtc/rtc-ds1307.c ds1307->rtc->nvram_old_abi = true; rtc 1854 drivers/rtc/rtc-ds1307.c rtc_nvmem_register(ds1307->rtc, &nvmem_cfg); rtc 79 drivers/rtc/rtc-ds1343.c struct rtc_device *rtc; rtc 446 drivers/rtc/rtc-ds1343.c rtc_update_irq(priv->rtc, 1, RTC_AF | RTC_IRQF); rtc 517 drivers/rtc/rtc-ds1343.c priv->rtc = devm_rtc_allocate_device(&spi->dev); rtc 518 drivers/rtc/rtc-ds1343.c if (IS_ERR(priv->rtc)) rtc 519 drivers/rtc/rtc-ds1343.c return PTR_ERR(priv->rtc); rtc 521 drivers/rtc/rtc-ds1343.c priv->rtc->nvram_old_abi = true; rtc 522 drivers/rtc/rtc-ds1343.c priv->rtc->ops = &ds1343_rtc_ops; rtc 524 drivers/rtc/rtc-ds1343.c res = rtc_register_device(priv->rtc); rtc 529 drivers/rtc/rtc-ds1343.c rtc_nvmem_register(priv->rtc, &nvmem_cfg); rtc 101 drivers/rtc/rtc-ds1347.c struct rtc_device *rtc; rtc 151 drivers/rtc/rtc-ds1347.c rtc = devm_rtc_device_register(&spi->dev, "ds1347", rtc 154 drivers/rtc/rtc-ds1347.c if (IS_ERR(rtc)) rtc 155 drivers/rtc/rtc-ds1347.c return PTR_ERR(rtc); rtc 72 drivers/rtc/rtc-ds1374.c struct rtc_device *rtc; rtc 318 drivers/rtc/rtc-ds1374.c rtc_update_irq(ds1374->rtc, 1, RTC_AF | RTC_IRQF); rtc 644 drivers/rtc/rtc-ds1374.c ds1374->rtc = devm_rtc_device_register(&client->dev, client->name, rtc 646 drivers/rtc/rtc-ds1374.c if (IS_ERR(ds1374->rtc)) { rtc 648 drivers/rtc/rtc-ds1374.c return PTR_ERR(ds1374->rtc); rtc 49 drivers/rtc/rtc-ds1390.c struct rtc_device *rtc; rtc 206 drivers/rtc/rtc-ds1390.c chip->rtc = devm_rtc_device_register(&spi->dev, "ds1390", rtc 208 drivers/rtc/rtc-ds1390.c if (IS_ERR(chip->rtc)) { rtc 210 drivers/rtc/rtc-ds1390.c res = PTR_ERR(chip->rtc); rtc 85 drivers/rtc/rtc-ds1511.c struct rtc_device *rtc; rtc 363 drivers/rtc/rtc-ds1511.c rtc_update_irq(pdata->rtc, 1, events); rtc 465 drivers/rtc/rtc-ds1511.c pdata->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 466 drivers/rtc/rtc-ds1511.c if (IS_ERR(pdata->rtc)) rtc 467 drivers/rtc/rtc-ds1511.c return PTR_ERR(pdata->rtc); rtc 469 drivers/rtc/rtc-ds1511.c pdata->rtc->ops = &ds1511_rtc_ops; rtc 471 drivers/rtc/rtc-ds1511.c pdata->rtc->nvram_old_abi = true; rtc 473 drivers/rtc/rtc-ds1511.c ret = rtc_register_device(pdata->rtc); rtc 477 drivers/rtc/rtc-ds1511.c rtc_nvmem_register(pdata->rtc, &ds1511_nvmem_cfg); rtc 59 drivers/rtc/rtc-ds1553.c struct rtc_device *rtc; rtc 196 drivers/rtc/rtc-ds1553.c rtc_update_irq(pdata->rtc, 1, events); rtc 294 drivers/rtc/rtc-ds1553.c pdata->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 295 drivers/rtc/rtc-ds1553.c if (IS_ERR(pdata->rtc)) rtc 296 drivers/rtc/rtc-ds1553.c return PTR_ERR(pdata->rtc); rtc 298 drivers/rtc/rtc-ds1553.c pdata->rtc->ops = &ds1553_rtc_ops; rtc 299 drivers/rtc/rtc-ds1553.c pdata->rtc->nvram_old_abi = true; rtc 301 drivers/rtc/rtc-ds1553.c ret = rtc_register_device(pdata->rtc); rtc 315 drivers/rtc/rtc-ds1553.c if (rtc_nvmem_register(pdata->rtc, &nvmem_cfg)) rtc 113 drivers/rtc/rtc-ds1672.c struct rtc_device *rtc; rtc 120 drivers/rtc/rtc-ds1672.c rtc = devm_rtc_allocate_device(&client->dev); rtc 121 drivers/rtc/rtc-ds1672.c if (IS_ERR(rtc)) rtc 122 drivers/rtc/rtc-ds1672.c return PTR_ERR(rtc); rtc 124 drivers/rtc/rtc-ds1672.c rtc->ops = &ds1672_rtc_ops; rtc 125 drivers/rtc/rtc-ds1672.c rtc->range_max = U32_MAX; rtc 127 drivers/rtc/rtc-ds1672.c err = rtc_register_device(rtc); rtc 131 drivers/rtc/rtc-ds1672.c i2c_set_clientdata(client, rtc); rtc 42 drivers/rtc/rtc-ds1685.c ds1685_read(struct ds1685_priv *rtc, int reg) rtc 44 drivers/rtc/rtc-ds1685.c return readb((u8 __iomem *)rtc->regs + rtc 45 drivers/rtc/rtc-ds1685.c (reg * rtc->regstep)); rtc 55 drivers/rtc/rtc-ds1685.c ds1685_write(struct ds1685_priv *rtc, int reg, u8 value) rtc 57 drivers/rtc/rtc-ds1685.c writeb(value, ((u8 __iomem *)rtc->regs + rtc 58 drivers/rtc/rtc-ds1685.c (reg * rtc->regstep))); rtc 76 drivers/rtc/rtc-ds1685.c ds1685_rtc_bcd2bin(struct ds1685_priv *rtc, u8 val, u8 bcd_mask, u8 bin_mask) rtc 78 drivers/rtc/rtc-ds1685.c if (rtc->bcd_mode) rtc 94 drivers/rtc/rtc-ds1685.c ds1685_rtc_bin2bcd(struct ds1685_priv *rtc, u8 val, u8 bin_mask, u8 bcd_mask) rtc 96 drivers/rtc/rtc-ds1685.c if (rtc->bcd_mode) rtc 110 drivers/rtc/rtc-ds1685.c ds1685_rtc_check_mday(struct ds1685_priv *rtc, u8 mday) rtc 112 drivers/rtc/rtc-ds1685.c if (rtc->bcd_mode) { rtc 127 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank0(struct ds1685_priv *rtc) rtc 129 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_A, rtc 130 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_CTRL_A) & ~(RTC_CTRL_A_DV0))); rtc 138 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank1(struct ds1685_priv *rtc) rtc 140 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_A, rtc 141 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_CTRL_A) | RTC_CTRL_A_DV0)); rtc 158 drivers/rtc/rtc-ds1685.c ds1685_rtc_begin_data_access(struct ds1685_priv *rtc) rtc 161 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, rtc 162 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_CTRL_B) | RTC_CTRL_B_SET)); rtc 165 drivers/rtc/rtc-ds1685.c while (rtc->read(rtc, RTC_EXT_CTRL_4A) & RTC_CTRL_4A_INCR) rtc 169 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank1(rtc); rtc 181 drivers/rtc/rtc-ds1685.c ds1685_rtc_end_data_access(struct ds1685_priv *rtc) rtc 184 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank1(rtc); rtc 187 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, rtc 188 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_CTRL_B) & ~(RTC_CTRL_B_SET))); rtc 206 drivers/rtc/rtc-ds1685.c ds1685_rtc_get_ssn(struct ds1685_priv *rtc, u8 *ssn) rtc 208 drivers/rtc/rtc-ds1685.c ssn[0] = rtc->read(rtc, RTC_BANK1_SSN_MODEL); rtc 209 drivers/rtc/rtc-ds1685.c ssn[1] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_1); rtc 210 drivers/rtc/rtc-ds1685.c ssn[2] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_2); rtc 211 drivers/rtc/rtc-ds1685.c ssn[3] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_3); rtc 212 drivers/rtc/rtc-ds1685.c ssn[4] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_4); rtc 213 drivers/rtc/rtc-ds1685.c ssn[5] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_5); rtc 214 drivers/rtc/rtc-ds1685.c ssn[6] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_6); rtc 215 drivers/rtc/rtc-ds1685.c ssn[7] = rtc->read(rtc, RTC_BANK1_SSN_CRC); rtc 231 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = dev_get_drvdata(dev); rtc 236 drivers/rtc/rtc-ds1685.c ds1685_rtc_begin_data_access(rtc); rtc 237 drivers/rtc/rtc-ds1685.c seconds = rtc->read(rtc, RTC_SECS); rtc 238 drivers/rtc/rtc-ds1685.c minutes = rtc->read(rtc, RTC_MINS); rtc 239 drivers/rtc/rtc-ds1685.c hours = rtc->read(rtc, RTC_HRS); rtc 240 drivers/rtc/rtc-ds1685.c wday = rtc->read(rtc, RTC_WDAY); rtc 241 drivers/rtc/rtc-ds1685.c mday = rtc->read(rtc, RTC_MDAY); rtc 242 drivers/rtc/rtc-ds1685.c month = rtc->read(rtc, RTC_MONTH); rtc 243 drivers/rtc/rtc-ds1685.c years = rtc->read(rtc, RTC_YEAR); rtc 244 drivers/rtc/rtc-ds1685.c century = rtc->read(rtc, RTC_CENTURY); rtc 245 drivers/rtc/rtc-ds1685.c ctrlb = rtc->read(rtc, RTC_CTRL_B); rtc 246 drivers/rtc/rtc-ds1685.c ds1685_rtc_end_data_access(rtc); rtc 249 drivers/rtc/rtc-ds1685.c years = ds1685_rtc_bcd2bin(rtc, years, RTC_YEAR_BCD_MASK, rtc 251 drivers/rtc/rtc-ds1685.c century = ds1685_rtc_bcd2bin(rtc, century, RTC_CENTURY_MASK, rtc 253 drivers/rtc/rtc-ds1685.c tm->tm_sec = ds1685_rtc_bcd2bin(rtc, seconds, RTC_SECS_BCD_MASK, rtc 255 drivers/rtc/rtc-ds1685.c tm->tm_min = ds1685_rtc_bcd2bin(rtc, minutes, RTC_MINS_BCD_MASK, rtc 257 drivers/rtc/rtc-ds1685.c tm->tm_hour = ds1685_rtc_bcd2bin(rtc, hours, RTC_HRS_24_BCD_MASK, rtc 259 drivers/rtc/rtc-ds1685.c tm->tm_wday = (ds1685_rtc_bcd2bin(rtc, wday, RTC_WDAY_MASK, rtc 261 drivers/rtc/rtc-ds1685.c tm->tm_mday = ds1685_rtc_bcd2bin(rtc, mday, RTC_MDAY_BCD_MASK, rtc 263 drivers/rtc/rtc-ds1685.c tm->tm_mon = (ds1685_rtc_bcd2bin(rtc, month, RTC_MONTH_BCD_MASK, rtc 280 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = dev_get_drvdata(dev); rtc 284 drivers/rtc/rtc-ds1685.c seconds = ds1685_rtc_bin2bcd(rtc, tm->tm_sec, RTC_SECS_BIN_MASK, rtc 286 drivers/rtc/rtc-ds1685.c minutes = ds1685_rtc_bin2bcd(rtc, tm->tm_min, RTC_MINS_BIN_MASK, rtc 288 drivers/rtc/rtc-ds1685.c hours = ds1685_rtc_bin2bcd(rtc, tm->tm_hour, RTC_HRS_24_BIN_MASK, rtc 290 drivers/rtc/rtc-ds1685.c wday = ds1685_rtc_bin2bcd(rtc, (tm->tm_wday + 1), RTC_WDAY_MASK, rtc 292 drivers/rtc/rtc-ds1685.c mday = ds1685_rtc_bin2bcd(rtc, tm->tm_mday, RTC_MDAY_BIN_MASK, rtc 294 drivers/rtc/rtc-ds1685.c month = ds1685_rtc_bin2bcd(rtc, (tm->tm_mon + 1), RTC_MONTH_BIN_MASK, rtc 296 drivers/rtc/rtc-ds1685.c years = ds1685_rtc_bin2bcd(rtc, (tm->tm_year % 100), rtc 298 drivers/rtc/rtc-ds1685.c century = ds1685_rtc_bin2bcd(rtc, ((tm->tm_year + 1900) / 100), rtc 321 drivers/rtc/rtc-ds1685.c ds1685_rtc_begin_data_access(rtc); rtc 322 drivers/rtc/rtc-ds1685.c ctrlb = rtc->read(rtc, RTC_CTRL_B); rtc 323 drivers/rtc/rtc-ds1685.c if (rtc->bcd_mode) rtc 327 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, ctrlb); rtc 328 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_SECS, seconds); rtc 329 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_MINS, minutes); rtc 330 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_HRS, hours); rtc 331 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_WDAY, wday); rtc 332 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_MDAY, mday); rtc 333 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_MONTH, month); rtc 334 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_YEAR, years); rtc 335 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CENTURY, century); rtc 336 drivers/rtc/rtc-ds1685.c ds1685_rtc_end_data_access(rtc); rtc 356 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = dev_get_drvdata(dev); rtc 361 drivers/rtc/rtc-ds1685.c ds1685_rtc_begin_data_access(rtc); rtc 362 drivers/rtc/rtc-ds1685.c seconds = rtc->read(rtc, RTC_SECS_ALARM); rtc 363 drivers/rtc/rtc-ds1685.c minutes = rtc->read(rtc, RTC_MINS_ALARM); rtc 364 drivers/rtc/rtc-ds1685.c hours = rtc->read(rtc, RTC_HRS_ALARM); rtc 365 drivers/rtc/rtc-ds1685.c mday = rtc->read(rtc, RTC_MDAY_ALARM); rtc 366 drivers/rtc/rtc-ds1685.c ctrlb = rtc->read(rtc, RTC_CTRL_B); rtc 367 drivers/rtc/rtc-ds1685.c ctrlc = rtc->read(rtc, RTC_CTRL_C); rtc 368 drivers/rtc/rtc-ds1685.c ds1685_rtc_end_data_access(rtc); rtc 371 drivers/rtc/rtc-ds1685.c ret = ds1685_rtc_check_mday(rtc, mday); rtc 383 drivers/rtc/rtc-ds1685.c alrm->time.tm_sec = ds1685_rtc_bcd2bin(rtc, seconds, rtc 388 drivers/rtc/rtc-ds1685.c alrm->time.tm_min = ds1685_rtc_bcd2bin(rtc, minutes, rtc 393 drivers/rtc/rtc-ds1685.c alrm->time.tm_hour = ds1685_rtc_bcd2bin(rtc, hours, rtc 398 drivers/rtc/rtc-ds1685.c alrm->time.tm_mday = ds1685_rtc_bcd2bin(rtc, mday, RTC_MDAY_BCD_MASK, rtc 414 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = dev_get_drvdata(dev); rtc 419 drivers/rtc/rtc-ds1685.c seconds = ds1685_rtc_bin2bcd(rtc, alrm->time.tm_sec, rtc 422 drivers/rtc/rtc-ds1685.c minutes = ds1685_rtc_bin2bcd(rtc, alrm->time.tm_min, rtc 425 drivers/rtc/rtc-ds1685.c hours = ds1685_rtc_bin2bcd(rtc, alrm->time.tm_hour, rtc 428 drivers/rtc/rtc-ds1685.c mday = ds1685_rtc_bin2bcd(rtc, alrm->time.tm_mday, rtc 433 drivers/rtc/rtc-ds1685.c ret = ds1685_rtc_check_mday(rtc, mday); rtc 461 drivers/rtc/rtc-ds1685.c ds1685_rtc_begin_data_access(rtc); rtc 462 drivers/rtc/rtc-ds1685.c ctrlb = rtc->read(rtc, RTC_CTRL_B); rtc 463 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, (ctrlb & ~(RTC_CTRL_B_AIE))); rtc 466 drivers/rtc/rtc-ds1685.c rtc->read(rtc, RTC_CTRL_C); rtc 472 drivers/rtc/rtc-ds1685.c ctrlb = rtc->read(rtc, RTC_CTRL_B); rtc 473 drivers/rtc/rtc-ds1685.c if (rtc->bcd_mode) rtc 477 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, ctrlb); rtc 478 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_SECS_ALARM, seconds); rtc 479 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_MINS_ALARM, minutes); rtc 480 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_HRS_ALARM, hours); rtc 481 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_MDAY_ALARM, mday); rtc 485 drivers/rtc/rtc-ds1685.c ctrlb = rtc->read(rtc, RTC_CTRL_B); rtc 487 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, ctrlb); rtc 491 drivers/rtc/rtc-ds1685.c ds1685_rtc_end_data_access(rtc); rtc 509 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = dev_get_drvdata(dev); rtc 513 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, (rtc->read(rtc, RTC_CTRL_B) | rtc 516 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, (rtc->read(rtc, RTC_CTRL_B) & rtc 520 drivers/rtc/rtc-ds1685.c rtc->read(rtc, RTC_CTRL_C); rtc 536 drivers/rtc/rtc-ds1685.c ds1685_rtc_extended_irq(struct ds1685_priv *rtc, struct platform_device *pdev) rtc 540 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank1(rtc); rtc 541 drivers/rtc/rtc-ds1685.c ctrl4a = rtc->read(rtc, RTC_EXT_CTRL_4A); rtc 542 drivers/rtc/rtc-ds1685.c ctrl4b = rtc->read(rtc, RTC_EXT_CTRL_4B); rtc 551 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4B, rtc 552 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4B) & rtc 556 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4A, rtc 566 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4B, rtc 567 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4B) | rtc 571 drivers/rtc/rtc-ds1685.c if (rtc->prepare_poweroff != NULL) rtc 572 drivers/rtc/rtc-ds1685.c rtc->prepare_poweroff(); rtc 584 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4A, rtc 588 drivers/rtc/rtc-ds1685.c if (rtc->wake_alarm != NULL) rtc 589 drivers/rtc/rtc-ds1685.c rtc->wake_alarm(); rtc 606 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4A, rtc 611 drivers/rtc/rtc-ds1685.c if (rtc->post_ram_clear != NULL) rtc 612 drivers/rtc/rtc-ds1685.c rtc->post_ram_clear(); rtc 617 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank0(rtc); rtc 629 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = platform_get_drvdata(pdev); rtc 636 drivers/rtc/rtc-ds1685.c if (unlikely(!rtc)) rtc 639 drivers/rtc/rtc-ds1685.c rtc_mutex = &rtc->dev->ops_lock; rtc 643 drivers/rtc/rtc-ds1685.c ctrlb = rtc->read(rtc, RTC_CTRL_B); rtc 644 drivers/rtc/rtc-ds1685.c ctrlc = rtc->read(rtc, RTC_CTRL_C); rtc 681 drivers/rtc/rtc-ds1685.c ds1685_rtc_extended_irq(rtc, pdev); rtc 684 drivers/rtc/rtc-ds1685.c rtc_update_irq(rtc->dev, num_irqs, events); rtc 725 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = dev_get_drvdata(dev); rtc 730 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank1(rtc); rtc 731 drivers/rtc/rtc-ds1685.c ds1685_rtc_get_ssn(rtc, ssn); rtc 732 drivers/rtc/rtc-ds1685.c ctrla = rtc->read(rtc, RTC_CTRL_A); rtc 733 drivers/rtc/rtc-ds1685.c ctrlb = rtc->read(rtc, RTC_CTRL_B); rtc 734 drivers/rtc/rtc-ds1685.c ctrlc = rtc->read(rtc, RTC_CTRL_C); rtc 735 drivers/rtc/rtc-ds1685.c ctrld = rtc->read(rtc, RTC_CTRL_D); rtc 736 drivers/rtc/rtc-ds1685.c ctrl4a = rtc->read(rtc, RTC_EXT_CTRL_4A); rtc 737 drivers/rtc/rtc-ds1685.c ctrl4b = rtc->read(rtc, RTC_EXT_CTRL_4B); rtc 738 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank0(rtc); rtc 815 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = priv; rtc 816 drivers/rtc/rtc-ds1685.c struct mutex *rtc_mutex = &rtc->dev->ops_lock; rtc 825 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank0(rtc); rtc 831 drivers/rtc/rtc-ds1685.c *buf++ = rtc->read(rtc, (NVRAM_TIME_BASE + pos++)); rtc 833 drivers/rtc/rtc-ds1685.c *buf++ = rtc->read(rtc, (NVRAM_BANK0_BASE + pos++)); rtc 838 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank1(rtc); rtc 842 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4A, rtc 843 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4A) | rtc 848 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_BANK1_RAM_ADDR_LSB, rtc 858 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_BANK1_RAM_ADDR, rtc 861 drivers/rtc/rtc-ds1685.c *buf++ = rtc->read(rtc, RTC_BANK1_RAM_DATA_PORT); rtc 867 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4A, rtc 868 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4A) & rtc 871 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank0(rtc); rtc 882 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = priv; rtc 883 drivers/rtc/rtc-ds1685.c struct mutex *rtc_mutex = &rtc->dev->ops_lock; rtc 892 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank0(rtc); rtc 898 drivers/rtc/rtc-ds1685.c rtc->write(rtc, (NVRAM_TIME_BASE + pos++), rtc 901 drivers/rtc/rtc-ds1685.c rtc->write(rtc, (NVRAM_BANK0_BASE), *buf++); rtc 905 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank1(rtc); rtc 909 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4A, rtc 910 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4A) | rtc 915 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_BANK1_RAM_ADDR_LSB, rtc 925 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_BANK1_RAM_ADDR, rtc 928 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_BANK1_RAM_DATA_PORT, *buf++); rtc 934 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4A, rtc 935 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4A) & rtc 938 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank0(rtc); rtc 959 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = dev_get_drvdata(dev->parent); rtc 962 drivers/rtc/rtc-ds1685.c ctrld = rtc->read(rtc, RTC_CTRL_D); rtc 979 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = dev_get_drvdata(dev->parent); rtc 982 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank1(rtc); rtc 983 drivers/rtc/rtc-ds1685.c ctrl4a = rtc->read(rtc, RTC_EXT_CTRL_4A); rtc 984 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank0(rtc); rtc 1001 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = dev_get_drvdata(dev->parent); rtc 1004 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank1(rtc); rtc 1005 drivers/rtc/rtc-ds1685.c ds1685_rtc_get_ssn(rtc, ssn); rtc 1006 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank0(rtc); rtc 1044 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc; rtc 1062 drivers/rtc/rtc-ds1685.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 1063 drivers/rtc/rtc-ds1685.c if (!rtc) rtc 1077 drivers/rtc/rtc-ds1685.c rtc->size = resource_size(res); rtc 1081 drivers/rtc/rtc-ds1685.c if (!devm_request_mem_region(&pdev->dev, res->start, rtc->size, rtc 1089 drivers/rtc/rtc-ds1685.c rtc->baseaddr = res->start; rtc 1090 drivers/rtc/rtc-ds1685.c rtc->regs = devm_ioremap(&pdev->dev, res->start, rtc->size); rtc 1091 drivers/rtc/rtc-ds1685.c if (!rtc->regs) rtc 1094 drivers/rtc/rtc-ds1685.c rtc->alloc_io_resources = pdata->alloc_io_resources; rtc 1098 drivers/rtc/rtc-ds1685.c rtc->regstep = pdata->regstep; rtc 1100 drivers/rtc/rtc-ds1685.c rtc->regstep = 1; rtc 1104 drivers/rtc/rtc-ds1685.c rtc->read = pdata->plat_read; rtc 1107 drivers/rtc/rtc-ds1685.c rtc->read = ds1685_read; rtc 1113 drivers/rtc/rtc-ds1685.c rtc->write = pdata->plat_write; rtc 1116 drivers/rtc/rtc-ds1685.c rtc->write = ds1685_write; rtc 1122 drivers/rtc/rtc-ds1685.c rtc->prepare_poweroff = pdata->plat_prepare_poweroff; rtc 1126 drivers/rtc/rtc-ds1685.c rtc->wake_alarm = pdata->plat_wake_alarm; rtc 1130 drivers/rtc/rtc-ds1685.c rtc->post_ram_clear = pdata->plat_post_ram_clear; rtc 1133 drivers/rtc/rtc-ds1685.c platform_set_drvdata(pdev, rtc); rtc 1136 drivers/rtc/rtc-ds1685.c ctrla = rtc->read(rtc, RTC_CTRL_A); rtc 1151 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_A, ctrla); rtc 1154 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4B, rtc 1155 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4B) | RTC_CTRL_4B_E32K)); rtc 1158 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, rtc 1159 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_CTRL_B) | RTC_CTRL_B_SET)); rtc 1162 drivers/rtc/rtc-ds1685.c while (rtc->read(rtc, RTC_EXT_CTRL_4A) & RTC_CTRL_4A_INCR) rtc 1169 drivers/rtc/rtc-ds1685.c ctrlb = rtc->read(rtc, RTC_CTRL_B); rtc 1174 drivers/rtc/rtc-ds1685.c rtc->bcd_mode = pdata->bcd_mode; rtc 1187 drivers/rtc/rtc-ds1685.c hours = rtc->read(rtc, RTC_HRS); rtc 1189 drivers/rtc/rtc-ds1685.c hours = ds1685_rtc_bcd2bin(rtc, hours, RTC_HRS_12_BCD_MASK, rtc 1197 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, ctrlb); rtc 1200 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_HRS, rtc 1201 drivers/rtc/rtc-ds1685.c ds1685_rtc_bin2bcd(rtc, hours, rtc 1206 drivers/rtc/rtc-ds1685.c hours = rtc->read(rtc, RTC_HRS_ALARM); rtc 1208 drivers/rtc/rtc-ds1685.c hours = ds1685_rtc_bcd2bin(rtc, hours, RTC_HRS_12_BCD_MASK, rtc 1213 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_HRS_ALARM, rtc 1214 drivers/rtc/rtc-ds1685.c ds1685_rtc_bin2bcd(rtc, hours, rtc 1219 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, ctrlb); rtc 1223 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, rtc 1224 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_CTRL_B) & ~(RTC_CTRL_B_SET))); rtc 1227 drivers/rtc/rtc-ds1685.c if (!(rtc->read(rtc, RTC_CTRL_D) & RTC_CTRL_D_VRT)) rtc 1232 drivers/rtc/rtc-ds1685.c if (!(rtc->read(rtc, RTC_EXT_CTRL_4A) & RTC_CTRL_4A_VRT2)) rtc 1237 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, rtc 1238 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_CTRL_B) & ~(RTC_CTRL_B_PAU_MASK))); rtc 1241 drivers/rtc/rtc-ds1685.c rtc->read(rtc, RTC_CTRL_C); rtc 1244 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4B, rtc 1245 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4B) & ~(RTC_CTRL_4B_RWK_MASK))); rtc 1248 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4A, rtc 1249 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4A) & ~(RTC_CTRL_4A_RWK_MASK))); rtc 1255 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4B, rtc 1256 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4B) | RTC_CTRL_4B_KSE)); rtc 1274 drivers/rtc/rtc-ds1685.c rtc->uie_unsupported = pdata->uie_unsupported; rtc 1276 drivers/rtc/rtc-ds1685.c rtc->dev = rtc_dev; rtc 1291 drivers/rtc/rtc-ds1685.c rtc->irq_num = ret; rtc 1294 drivers/rtc/rtc-ds1685.c ret = devm_request_threaded_irq(&pdev->dev, rtc->irq_num, rtc 1303 drivers/rtc/rtc-ds1685.c rtc->irq_num = 0; rtc 1306 drivers/rtc/rtc-ds1685.c rtc->no_irq = pdata->no_irq; rtc 1309 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank0(rtc); rtc 1316 drivers/rtc/rtc-ds1685.c nvmem_cfg.priv = rtc; rtc 1331 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc = platform_get_drvdata(pdev); rtc 1334 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_B, rtc 1335 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_CTRL_B) & rtc 1339 drivers/rtc/rtc-ds1685.c rtc->read(rtc, RTC_CTRL_C); rtc 1342 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4B, rtc 1343 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4B) & rtc 1347 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4A, rtc 1348 drivers/rtc/rtc-ds1685.c (rtc->read(rtc, RTC_EXT_CTRL_4A) & rtc 1379 drivers/rtc/rtc-ds1685.c struct ds1685_priv *rtc; rtc 1388 drivers/rtc/rtc-ds1685.c rtc = platform_get_drvdata(pdev); rtc 1396 drivers/rtc/rtc-ds1685.c if (!rtc->no_irq) rtc 1397 drivers/rtc/rtc-ds1685.c disable_irq_nosync(rtc->irq_num); rtc 1400 drivers/rtc/rtc-ds1685.c ctrla = rtc->read(rtc, RTC_CTRL_A); rtc 1403 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_CTRL_A, ctrla); rtc 1410 drivers/rtc/rtc-ds1685.c ds1685_rtc_switch_to_bank1(rtc); rtc 1411 drivers/rtc/rtc-ds1685.c ctrl4a = rtc->read(rtc, RTC_EXT_CTRL_4A); rtc 1415 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4A, ctrl4a); rtc 1423 drivers/rtc/rtc-ds1685.c ctrl4b = rtc->read(rtc, RTC_EXT_CTRL_4B); rtc 1426 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4B, ctrl4b); rtc 1432 drivers/rtc/rtc-ds1685.c rtc->write(rtc, RTC_EXT_CTRL_4A, rtc 144 drivers/rtc/rtc-ds1742.c struct rtc_device *rtc; rtc 188 drivers/rtc/rtc-ds1742.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 189 drivers/rtc/rtc-ds1742.c if (IS_ERR(rtc)) rtc 190 drivers/rtc/rtc-ds1742.c return PTR_ERR(rtc); rtc 192 drivers/rtc/rtc-ds1742.c rtc->ops = &ds1742_rtc_ops; rtc 193 drivers/rtc/rtc-ds1742.c rtc->nvram_old_abi = true; rtc 195 drivers/rtc/rtc-ds1742.c ret = rtc_register_device(rtc); rtc 199 drivers/rtc/rtc-ds1742.c if (rtc_nvmem_register(rtc, &nvmem_cfg)) rtc 37 drivers/rtc/rtc-ds2404.c struct rtc_device *rtc; rtc 216 drivers/rtc/rtc-ds2404.c chip->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 217 drivers/rtc/rtc-ds2404.c if (IS_ERR(chip->rtc)) rtc 218 drivers/rtc/rtc-ds2404.c return PTR_ERR(chip->rtc); rtc 234 drivers/rtc/rtc-ds2404.c chip->rtc->ops = &ds2404_rtc_ops; rtc 235 drivers/rtc/rtc-ds2404.c chip->rtc->range_max = U32_MAX; rtc 237 drivers/rtc/rtc-ds2404.c retval = rtc_register_device(chip->rtc); rtc 56 drivers/rtc/rtc-ds3232.c struct rtc_device *rtc; rtc 409 drivers/rtc/rtc-ds3232.c struct mutex *lock = &ds3232->rtc->ops_lock; rtc 446 drivers/rtc/rtc-ds3232.c rtc_update_irq(ds3232->rtc, 1, RTC_AF | RTC_IRQF); rtc 516 drivers/rtc/rtc-ds3232.c ds3232->rtc = devm_rtc_device_register(dev, name, &ds3232_rtc_ops, rtc 518 drivers/rtc/rtc-ds3232.c if (IS_ERR(ds3232->rtc)) rtc 519 drivers/rtc/rtc-ds3232.c return PTR_ERR(ds3232->rtc); rtc 521 drivers/rtc/rtc-ds3232.c ret = rtc_nvmem_register(ds3232->rtc, &nvmem_cfg); rtc 256 drivers/rtc/rtc-efi.c struct rtc_device *rtc; rtc 264 drivers/rtc/rtc-efi.c rtc = devm_rtc_device_register(&dev->dev, "rtc-efi", &efi_rtc_ops, rtc 266 drivers/rtc/rtc-efi.c if (IS_ERR(rtc)) rtc 267 drivers/rtc/rtc-efi.c return PTR_ERR(rtc); rtc 269 drivers/rtc/rtc-efi.c rtc->uie_unsupported = 1; rtc 270 drivers/rtc/rtc-efi.c platform_set_drvdata(dev, rtc); rtc 117 drivers/rtc/rtc-em3027.c struct rtc_device *rtc; rtc 122 drivers/rtc/rtc-em3027.c rtc = devm_rtc_device_register(&client->dev, em3027_driver.driver.name, rtc 124 drivers/rtc/rtc-em3027.c if (IS_ERR(rtc)) rtc 125 drivers/rtc/rtc-em3027.c return PTR_ERR(rtc); rtc 127 drivers/rtc/rtc-em3027.c i2c_set_clientdata(client, rtc); rtc 30 drivers/rtc/rtc-ep93xx.c struct rtc_device *rtc; rtc 139 drivers/rtc/rtc-ep93xx.c ep93xx_rtc->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 140 drivers/rtc/rtc-ep93xx.c if (IS_ERR(ep93xx_rtc->rtc)) rtc 141 drivers/rtc/rtc-ep93xx.c return PTR_ERR(ep93xx_rtc->rtc); rtc 143 drivers/rtc/rtc-ep93xx.c ep93xx_rtc->rtc->ops = &ep93xx_rtc_ops; rtc 144 drivers/rtc/rtc-ep93xx.c ep93xx_rtc->rtc->range_max = U32_MAX; rtc 146 drivers/rtc/rtc-ep93xx.c err = rtc_add_group(ep93xx_rtc->rtc, &ep93xx_rtc_sysfs_files); rtc 150 drivers/rtc/rtc-ep93xx.c return rtc_register_device(ep93xx_rtc->rtc); rtc 51 drivers/rtc/rtc-fm3130.c struct rtc_device *rtc; rtc 504 drivers/rtc/rtc-fm3130.c fm3130->rtc = devm_rtc_device_register(&client->dev, client->name, rtc 506 drivers/rtc/rtc-fm3130.c if (IS_ERR(fm3130->rtc)) { rtc 507 drivers/rtc/rtc-fm3130.c err = PTR_ERR(fm3130->rtc); rtc 62 drivers/rtc/rtc-fsl-ftm-alarm.c static inline void ftm_counter_enable(struct ftm_rtc *rtc) rtc 67 drivers/rtc/rtc-fsl-ftm-alarm.c val = rtc_readl(rtc, FTM_SC); rtc 70 drivers/rtc/rtc-fsl-ftm-alarm.c rtc_writel(rtc, FTM_SC, val); rtc 73 drivers/rtc/rtc-fsl-ftm-alarm.c static inline void ftm_counter_disable(struct ftm_rtc *rtc) rtc 78 drivers/rtc/rtc-fsl-ftm-alarm.c val = rtc_readl(rtc, FTM_SC); rtc 80 drivers/rtc/rtc-fsl-ftm-alarm.c rtc_writel(rtc, FTM_SC, val); rtc 83 drivers/rtc/rtc-fsl-ftm-alarm.c static inline void ftm_irq_acknowledge(struct ftm_rtc *rtc) rtc 108 drivers/rtc/rtc-fsl-ftm-alarm.c while ((FTM_SC_TOF & rtc_readl(rtc, FTM_SC)) && timeout--) rtc 109 drivers/rtc/rtc-fsl-ftm-alarm.c rtc_writel(rtc, FTM_SC, rtc_readl(rtc, FTM_SC) & (~FTM_SC_TOF)); rtc 112 drivers/rtc/rtc-fsl-ftm-alarm.c static inline void ftm_irq_enable(struct ftm_rtc *rtc) rtc 116 drivers/rtc/rtc-fsl-ftm-alarm.c val = rtc_readl(rtc, FTM_SC); rtc 118 drivers/rtc/rtc-fsl-ftm-alarm.c rtc_writel(rtc, FTM_SC, val); rtc 121 drivers/rtc/rtc-fsl-ftm-alarm.c static inline void ftm_irq_disable(struct ftm_rtc *rtc) rtc 125 drivers/rtc/rtc-fsl-ftm-alarm.c val = rtc_readl(rtc, FTM_SC); rtc 127 drivers/rtc/rtc-fsl-ftm-alarm.c rtc_writel(rtc, FTM_SC, val); rtc 130 drivers/rtc/rtc-fsl-ftm-alarm.c static inline void ftm_reset_counter(struct ftm_rtc *rtc) rtc 137 drivers/rtc/rtc-fsl-ftm-alarm.c rtc_writel(rtc, FTM_CNT, 0x00); rtc 140 drivers/rtc/rtc-fsl-ftm-alarm.c static void ftm_clean_alarm(struct ftm_rtc *rtc) rtc 142 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_counter_disable(rtc); rtc 144 drivers/rtc/rtc-fsl-ftm-alarm.c rtc_writel(rtc, FTM_CNTIN, 0x00); rtc 145 drivers/rtc/rtc-fsl-ftm-alarm.c rtc_writel(rtc, FTM_MOD, ~0U); rtc 147 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_reset_counter(rtc); rtc 152 drivers/rtc/rtc-fsl-ftm-alarm.c struct ftm_rtc *rtc = dev; rtc 154 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_irq_acknowledge(rtc); rtc 155 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_irq_disable(rtc); rtc 156 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_clean_alarm(rtc); rtc 164 drivers/rtc/rtc-fsl-ftm-alarm.c struct ftm_rtc *rtc = dev_get_drvdata(dev); rtc 167 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_irq_enable(rtc); rtc 169 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_irq_disable(rtc); rtc 211 drivers/rtc/rtc-fsl-ftm-alarm.c struct ftm_rtc *rtc = dev_get_drvdata(dev); rtc 217 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_clean_alarm(rtc); rtc 218 drivers/rtc/rtc-fsl-ftm-alarm.c cycle = (alm_time - now) * rtc->alarm_freq; rtc 224 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_irq_disable(rtc); rtc 232 drivers/rtc/rtc-fsl-ftm-alarm.c rtc_writel(rtc, FTM_MOD, cycle - 1); rtc 234 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_counter_enable(rtc); rtc 235 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_irq_enable(rtc); rtc 254 drivers/rtc/rtc-fsl-ftm-alarm.c struct ftm_rtc *rtc; rtc 256 drivers/rtc/rtc-fsl-ftm-alarm.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 257 drivers/rtc/rtc-fsl-ftm-alarm.c if (unlikely(!rtc)) { rtc 262 drivers/rtc/rtc-fsl-ftm-alarm.c platform_set_drvdata(pdev, rtc); rtc 264 drivers/rtc/rtc-fsl-ftm-alarm.c rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev); rtc 265 drivers/rtc/rtc-fsl-ftm-alarm.c if (IS_ERR(rtc->rtc_dev)) rtc 266 drivers/rtc/rtc-fsl-ftm-alarm.c return PTR_ERR(rtc->rtc_dev); rtc 274 drivers/rtc/rtc-fsl-ftm-alarm.c rtc->base = devm_ioremap_resource(&pdev->dev, r); rtc 275 drivers/rtc/rtc-fsl-ftm-alarm.c if (IS_ERR(rtc->base)) { rtc 277 drivers/rtc/rtc-fsl-ftm-alarm.c return PTR_ERR(rtc->base); rtc 287 drivers/rtc/rtc-fsl-ftm-alarm.c IRQF_NO_SUSPEND, dev_name(&pdev->dev), rtc); rtc 293 drivers/rtc/rtc-fsl-ftm-alarm.c rtc->big_endian = of_property_read_bool(np, "big-endian"); rtc 294 drivers/rtc/rtc-fsl-ftm-alarm.c rtc->alarm_freq = (u32)FIXED_FREQ_CLK / (u32)MAX_FREQ_DIV; rtc 295 drivers/rtc/rtc-fsl-ftm-alarm.c rtc->rtc_dev->ops = &ftm_rtc_ops; rtc 299 drivers/rtc/rtc-fsl-ftm-alarm.c ret = rtc_register_device(rtc->rtc_dev); rtc 66 drivers/rtc/rtc-ftrtc010.c struct ftrtc010_rtc *rtc = dev_get_drvdata(dev); rtc 71 drivers/rtc/rtc-ftrtc010.c sec = readl(rtc->rtc_base + FTRTC010_RTC_SECOND); rtc 72 drivers/rtc/rtc-ftrtc010.c min = readl(rtc->rtc_base + FTRTC010_RTC_MINUTE); rtc 73 drivers/rtc/rtc-ftrtc010.c hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); rtc 74 drivers/rtc/rtc-ftrtc010.c days = readl(rtc->rtc_base + FTRTC010_RTC_DAYS); rtc 75 drivers/rtc/rtc-ftrtc010.c offset = readl(rtc->rtc_base + FTRTC010_RTC_RECORD); rtc 86 drivers/rtc/rtc-ftrtc010.c struct ftrtc010_rtc *rtc = dev_get_drvdata(dev); rtc 92 drivers/rtc/rtc-ftrtc010.c sec = readl(rtc->rtc_base + FTRTC010_RTC_SECOND); rtc 93 drivers/rtc/rtc-ftrtc010.c min = readl(rtc->rtc_base + FTRTC010_RTC_MINUTE); rtc 94 drivers/rtc/rtc-ftrtc010.c hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); rtc 95 drivers/rtc/rtc-ftrtc010.c day = readl(rtc->rtc_base + FTRTC010_RTC_DAYS); rtc 99 drivers/rtc/rtc-ftrtc010.c writel(offset, rtc->rtc_base + FTRTC010_RTC_RECORD); rtc 100 drivers/rtc/rtc-ftrtc010.c writel(0x01, rtc->rtc_base + FTRTC010_RTC_CR); rtc 113 drivers/rtc/rtc-ftrtc010.c struct ftrtc010_rtc *rtc; rtc 118 drivers/rtc/rtc-ftrtc010.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 119 drivers/rtc/rtc-ftrtc010.c if (unlikely(!rtc)) rtc 121 drivers/rtc/rtc-ftrtc010.c platform_set_drvdata(pdev, rtc); rtc 123 drivers/rtc/rtc-ftrtc010.c rtc->pclk = devm_clk_get(dev, "PCLK"); rtc 124 drivers/rtc/rtc-ftrtc010.c if (IS_ERR(rtc->pclk)) { rtc 127 drivers/rtc/rtc-ftrtc010.c ret = clk_prepare_enable(rtc->pclk); rtc 133 drivers/rtc/rtc-ftrtc010.c rtc->extclk = devm_clk_get(dev, "EXTCLK"); rtc 134 drivers/rtc/rtc-ftrtc010.c if (IS_ERR(rtc->extclk)) { rtc 137 drivers/rtc/rtc-ftrtc010.c ret = clk_prepare_enable(rtc->extclk); rtc 148 drivers/rtc/rtc-ftrtc010.c rtc->rtc_irq = res->start; rtc 154 drivers/rtc/rtc-ftrtc010.c rtc->rtc_base = devm_ioremap(dev, res->start, rtc 156 drivers/rtc/rtc-ftrtc010.c if (!rtc->rtc_base) rtc 159 drivers/rtc/rtc-ftrtc010.c rtc->rtc_dev = devm_rtc_allocate_device(dev); rtc 160 drivers/rtc/rtc-ftrtc010.c if (IS_ERR(rtc->rtc_dev)) rtc 161 drivers/rtc/rtc-ftrtc010.c return PTR_ERR(rtc->rtc_dev); rtc 163 drivers/rtc/rtc-ftrtc010.c rtc->rtc_dev->ops = &ftrtc010_rtc_ops; rtc 165 drivers/rtc/rtc-ftrtc010.c sec = readl(rtc->rtc_base + FTRTC010_RTC_SECOND); rtc 166 drivers/rtc/rtc-ftrtc010.c min = readl(rtc->rtc_base + FTRTC010_RTC_MINUTE); rtc 167 drivers/rtc/rtc-ftrtc010.c hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); rtc 168 drivers/rtc/rtc-ftrtc010.c days = readl(rtc->rtc_base + FTRTC010_RTC_DAYS); rtc 170 drivers/rtc/rtc-ftrtc010.c rtc->rtc_dev->range_min = (u64)days * 86400 + hour * 3600 + rtc 172 drivers/rtc/rtc-ftrtc010.c rtc->rtc_dev->range_max = U32_MAX + rtc->rtc_dev->range_min; rtc 174 drivers/rtc/rtc-ftrtc010.c ret = devm_request_irq(dev, rtc->rtc_irq, ftrtc010_rtc_interrupt, rtc 179 drivers/rtc/rtc-ftrtc010.c return rtc_register_device(rtc->rtc_dev); rtc 184 drivers/rtc/rtc-ftrtc010.c struct ftrtc010_rtc *rtc = platform_get_drvdata(pdev); rtc 186 drivers/rtc/rtc-ftrtc010.c if (!IS_ERR(rtc->extclk)) rtc 187 drivers/rtc/rtc-ftrtc010.c clk_disable_unprepare(rtc->extclk); rtc 188 drivers/rtc/rtc-ftrtc010.c if (!IS_ERR(rtc->pclk)) rtc 189 drivers/rtc/rtc-ftrtc010.c clk_disable_unprepare(rtc->pclk); rtc 15 drivers/rtc/rtc-generic.c struct rtc_device *rtc; rtc 18 drivers/rtc/rtc-generic.c rtc = devm_rtc_device_register(&dev->dev, "rtc-generic", rtc 20 drivers/rtc/rtc-generic.c if (IS_ERR(rtc)) rtc 21 drivers/rtc/rtc-generic.c return PTR_ERR(rtc); rtc 23 drivers/rtc/rtc-generic.c platform_set_drvdata(dev, rtc); rtc 29 drivers/rtc/rtc-goldfish.c struct rtc_device *rtc; rtc 114 drivers/rtc/rtc-goldfish.c rtc_update_irq(rtcdrv->rtc, 1, RTC_IRQF | RTC_AF); rtc 189 drivers/rtc/rtc-goldfish.c rtcdrv->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 190 drivers/rtc/rtc-goldfish.c if (IS_ERR(rtcdrv->rtc)) rtc 191 drivers/rtc/rtc-goldfish.c return PTR_ERR(rtcdrv->rtc); rtc 193 drivers/rtc/rtc-goldfish.c rtcdrv->rtc->ops = &goldfish_rtc_ops; rtc 194 drivers/rtc/rtc-goldfish.c rtcdrv->rtc->range_max = U64_MAX / NSEC_PER_SEC; rtc 202 drivers/rtc/rtc-goldfish.c return rtc_register_device(rtcdrv->rtc); rtc 31 drivers/rtc/rtc-hid-sensor-time.c struct rtc_device *rtc; rtc 276 drivers/rtc/rtc-hid-sensor-time.c time_state->rtc = devm_rtc_device_register(&pdev->dev, rtc 280 drivers/rtc/rtc-hid-sensor-time.c if (IS_ERR(time_state->rtc)) { rtc 282 drivers/rtc/rtc-hid-sensor-time.c ret = PTR_ERR(time_state->rtc); rtc 283 drivers/rtc/rtc-hid-sensor-time.c time_state->rtc = NULL; rtc 80 drivers/rtc/rtc-hym8563.c struct rtc_device *rtc; rtc 435 drivers/rtc/rtc-hym8563.c struct mutex *lock = &hym8563->rtc->ops_lock; rtc 563 drivers/rtc/rtc-hym8563.c hym8563->rtc = devm_rtc_device_register(&client->dev, client->name, rtc 565 drivers/rtc/rtc-hym8563.c if (IS_ERR(hym8563->rtc)) rtc 566 drivers/rtc/rtc-hym8563.c return PTR_ERR(hym8563->rtc); rtc 569 drivers/rtc/rtc-hym8563.c hym8563->rtc->uie_unsupported = 1; rtc 110 drivers/rtc/rtc-imxdi.c struct rtc_device *rtc; rtc 735 drivers/rtc/rtc-imxdi.c rtc_update_irq(imxdi->rtc, 1, RTC_AF | RTC_IRQF); rtc 776 drivers/rtc/rtc-imxdi.c imxdi->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 777 drivers/rtc/rtc-imxdi.c if (IS_ERR(imxdi->rtc)) rtc 778 drivers/rtc/rtc-imxdi.c return PTR_ERR(imxdi->rtc); rtc 814 drivers/rtc/rtc-imxdi.c imxdi->rtc->ops = &dryice_rtc_ops; rtc 815 drivers/rtc/rtc-imxdi.c imxdi->rtc->range_max = U32_MAX; rtc 817 drivers/rtc/rtc-imxdi.c rc = rtc_register_device(imxdi->rtc); rtc 44 drivers/rtc/rtc-isl12022.c struct rtc_device *rtc; rtc 250 drivers/rtc/rtc-isl12022.c isl12022->rtc = devm_rtc_device_register(&client->dev, rtc 253 drivers/rtc/rtc-isl12022.c return PTR_ERR_OR_ZERO(isl12022->rtc); rtc 39 drivers/rtc/rtc-isl12026.c struct rtc_device *rtc; rtc 301 drivers/rtc/rtc-isl12026.c ret = mutex_lock_interruptible(&priv->rtc->ops_lock); rtc 311 drivers/rtc/rtc-isl12026.c mutex_unlock(&priv->rtc->ops_lock); rtc 342 drivers/rtc/rtc-isl12026.c ret = mutex_lock_interruptible(&priv->rtc->ops_lock); rtc 374 drivers/rtc/rtc-isl12026.c mutex_unlock(&priv->rtc->ops_lock); rtc 461 drivers/rtc/rtc-isl12026.c priv->rtc = devm_rtc_allocate_device(&client->dev); rtc 462 drivers/rtc/rtc-isl12026.c ret = PTR_ERR_OR_ZERO(priv->rtc); rtc 466 drivers/rtc/rtc-isl12026.c priv->rtc->ops = &isl12026_rtc_ops; rtc 468 drivers/rtc/rtc-isl12026.c ret = rtc_nvmem_register(priv->rtc, &nvm_cfg); rtc 472 drivers/rtc/rtc-isl12026.c return rtc_register_device(priv->rtc); rtc 114 drivers/rtc/rtc-isl1208.c struct rtc_device *rtc; rtc 619 drivers/rtc/rtc-isl1208.c rtc_update_irq(isl1208->rtc, 1, RTC_IRQF | RTC_AF); rtc 640 drivers/rtc/rtc-isl1208.c sysfs_notify(&isl1208->rtc->dev.kobj, NULL, rtc 745 drivers/rtc/rtc-isl1208.c struct i2c_client *client = to_i2c_client(isl1208->rtc->dev.parent); rtc 760 drivers/rtc/rtc-isl1208.c struct i2c_client *client = to_i2c_client(isl1208->rtc->dev.parent); rtc 829 drivers/rtc/rtc-isl1208.c isl1208->rtc = devm_rtc_allocate_device(&client->dev); rtc 830 drivers/rtc/rtc-isl1208.c if (IS_ERR(isl1208->rtc)) rtc 831 drivers/rtc/rtc-isl1208.c return PTR_ERR(isl1208->rtc); rtc 833 drivers/rtc/rtc-isl1208.c isl1208->rtc->ops = &isl1208_rtc_ops; rtc 874 drivers/rtc/rtc-isl1208.c rc = rtc_add_group(isl1208->rtc, &isl1219_rtc_sysfs_files); rtc 879 drivers/rtc/rtc-isl1208.c rc = rtc_add_group(isl1208->rtc, &isl1208_rtc_sysfs_files); rtc 893 drivers/rtc/rtc-isl1208.c rc = rtc_nvmem_register(isl1208->rtc, &isl1208->nvmem_config); rtc 897 drivers/rtc/rtc-isl1208.c return rtc_register_device(isl1208->rtc); rtc 56 drivers/rtc/rtc-jz4740.c struct rtc_device *rtc; rtc 69 drivers/rtc/rtc-jz4740.c static inline uint32_t jz4740_rtc_reg_read(struct jz4740_rtc *rtc, size_t reg) rtc 71 drivers/rtc/rtc-jz4740.c return readl(rtc->base + reg); rtc 74 drivers/rtc/rtc-jz4740.c static int jz4740_rtc_wait_write_ready(struct jz4740_rtc *rtc) rtc 80 drivers/rtc/rtc-jz4740.c ctrl = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_CTRL); rtc 86 drivers/rtc/rtc-jz4740.c static inline int jz4780_rtc_enable_write(struct jz4740_rtc *rtc) rtc 91 drivers/rtc/rtc-jz4740.c ret = jz4740_rtc_wait_write_ready(rtc); rtc 95 drivers/rtc/rtc-jz4740.c writel(JZ_RTC_WENR_MAGIC, rtc->base + JZ_REG_RTC_WENR); rtc 98 drivers/rtc/rtc-jz4740.c ctrl = readl(rtc->base + JZ_REG_RTC_WENR); rtc 104 drivers/rtc/rtc-jz4740.c static inline int jz4740_rtc_reg_write(struct jz4740_rtc *rtc, size_t reg, rtc 109 drivers/rtc/rtc-jz4740.c if (rtc->type >= ID_JZ4780) rtc 110 drivers/rtc/rtc-jz4740.c ret = jz4780_rtc_enable_write(rtc); rtc 112 drivers/rtc/rtc-jz4740.c ret = jz4740_rtc_wait_write_ready(rtc); rtc 114 drivers/rtc/rtc-jz4740.c writel(val, rtc->base + reg); rtc 119 drivers/rtc/rtc-jz4740.c static int jz4740_rtc_ctrl_set_bits(struct jz4740_rtc *rtc, uint32_t mask, rtc 126 drivers/rtc/rtc-jz4740.c spin_lock_irqsave(&rtc->lock, flags); rtc 128 drivers/rtc/rtc-jz4740.c ctrl = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_CTRL); rtc 138 drivers/rtc/rtc-jz4740.c ret = jz4740_rtc_reg_write(rtc, JZ_REG_RTC_CTRL, ctrl); rtc 140 drivers/rtc/rtc-jz4740.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 147 drivers/rtc/rtc-jz4740.c struct jz4740_rtc *rtc = dev_get_drvdata(dev); rtc 151 drivers/rtc/rtc-jz4740.c if (jz4740_rtc_reg_read(rtc, JZ_REG_RTC_SCRATCHPAD) != 0x12345678) rtc 158 drivers/rtc/rtc-jz4740.c secs = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_SEC); rtc 159 drivers/rtc/rtc-jz4740.c secs2 = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_SEC); rtc 163 drivers/rtc/rtc-jz4740.c secs2 = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_SEC); rtc 176 drivers/rtc/rtc-jz4740.c struct jz4740_rtc *rtc = dev_get_drvdata(dev); rtc 179 drivers/rtc/rtc-jz4740.c ret = jz4740_rtc_reg_write(rtc, JZ_REG_RTC_SEC, rtc_tm_to_time64(time)); rtc 183 drivers/rtc/rtc-jz4740.c return jz4740_rtc_reg_write(rtc, JZ_REG_RTC_SCRATCHPAD, 0x12345678); rtc 188 drivers/rtc/rtc-jz4740.c struct jz4740_rtc *rtc = dev_get_drvdata(dev); rtc 192 drivers/rtc/rtc-jz4740.c secs = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_SEC_ALARM); rtc 194 drivers/rtc/rtc-jz4740.c ctrl = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_CTRL); rtc 207 drivers/rtc/rtc-jz4740.c struct jz4740_rtc *rtc = dev_get_drvdata(dev); rtc 210 drivers/rtc/rtc-jz4740.c ret = jz4740_rtc_reg_write(rtc, JZ_REG_RTC_SEC_ALARM, secs); rtc 212 drivers/rtc/rtc-jz4740.c ret = jz4740_rtc_ctrl_set_bits(rtc, rtc 220 drivers/rtc/rtc-jz4740.c struct jz4740_rtc *rtc = dev_get_drvdata(dev); rtc 221 drivers/rtc/rtc-jz4740.c return jz4740_rtc_ctrl_set_bits(rtc, JZ_RTC_CTRL_AF_IRQ, enable); rtc 234 drivers/rtc/rtc-jz4740.c struct jz4740_rtc *rtc = data; rtc 238 drivers/rtc/rtc-jz4740.c ctrl = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_CTRL); rtc 246 drivers/rtc/rtc-jz4740.c rtc_update_irq(rtc->rtc, 1, events); rtc 248 drivers/rtc/rtc-jz4740.c jz4740_rtc_ctrl_set_bits(rtc, JZ_RTC_CTRL_1HZ | JZ_RTC_CTRL_AF, false); rtc 255 drivers/rtc/rtc-jz4740.c struct jz4740_rtc *rtc = dev_get_drvdata(dev); rtc 256 drivers/rtc/rtc-jz4740.c jz4740_rtc_reg_write(rtc, JZ_REG_RTC_HIBERNATE, 1); rtc 261 drivers/rtc/rtc-jz4740.c struct jz4740_rtc *rtc = dev_get_drvdata(dev_for_power_off); rtc 266 drivers/rtc/rtc-jz4740.c clk_prepare_enable(rtc->clk); rtc 268 drivers/rtc/rtc-jz4740.c rtc_rate = clk_get_rate(rtc->clk); rtc 275 drivers/rtc/rtc-jz4740.c (rtc->min_wakeup_pin_assert_time * rtc_rate) / 1000; rtc 280 drivers/rtc/rtc-jz4740.c jz4740_rtc_reg_write(rtc, rtc 287 drivers/rtc/rtc-jz4740.c reset_counter_ticks = (rtc->reset_pin_assert_time * rtc_rate) / 1000; rtc 292 drivers/rtc/rtc-jz4740.c jz4740_rtc_reg_write(rtc, rtc 309 drivers/rtc/rtc-jz4740.c struct jz4740_rtc *rtc; rtc 316 drivers/rtc/rtc-jz4740.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 317 drivers/rtc/rtc-jz4740.c if (!rtc) rtc 321 drivers/rtc/rtc-jz4740.c rtc->type = (enum jz4740_rtc_type)of_id->data; rtc 323 drivers/rtc/rtc-jz4740.c rtc->type = id->driver_data; rtc 325 drivers/rtc/rtc-jz4740.c rtc->irq = platform_get_irq(pdev, 0); rtc 326 drivers/rtc/rtc-jz4740.c if (rtc->irq < 0) rtc 330 drivers/rtc/rtc-jz4740.c rtc->base = devm_ioremap_resource(&pdev->dev, mem); rtc 331 drivers/rtc/rtc-jz4740.c if (IS_ERR(rtc->base)) rtc 332 drivers/rtc/rtc-jz4740.c return PTR_ERR(rtc->base); rtc 334 drivers/rtc/rtc-jz4740.c rtc->clk = devm_clk_get(&pdev->dev, "rtc"); rtc 335 drivers/rtc/rtc-jz4740.c if (IS_ERR(rtc->clk)) { rtc 337 drivers/rtc/rtc-jz4740.c return PTR_ERR(rtc->clk); rtc 340 drivers/rtc/rtc-jz4740.c spin_lock_init(&rtc->lock); rtc 342 drivers/rtc/rtc-jz4740.c platform_set_drvdata(pdev, rtc); rtc 346 drivers/rtc/rtc-jz4740.c ret = dev_pm_set_wake_irq(&pdev->dev, rtc->irq); rtc 352 drivers/rtc/rtc-jz4740.c rtc->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 353 drivers/rtc/rtc-jz4740.c if (IS_ERR(rtc->rtc)) { rtc 354 drivers/rtc/rtc-jz4740.c ret = PTR_ERR(rtc->rtc); rtc 359 drivers/rtc/rtc-jz4740.c rtc->rtc->ops = &jz4740_rtc_ops; rtc 360 drivers/rtc/rtc-jz4740.c rtc->rtc->range_max = U32_MAX; rtc 362 drivers/rtc/rtc-jz4740.c ret = rtc_register_device(rtc->rtc); rtc 366 drivers/rtc/rtc-jz4740.c ret = devm_request_irq(&pdev->dev, rtc->irq, jz4740_rtc_irq, 0, rtc 367 drivers/rtc/rtc-jz4740.c pdev->name, rtc); rtc 376 drivers/rtc/rtc-jz4740.c rtc->reset_pin_assert_time = 60; rtc 378 drivers/rtc/rtc-jz4740.c &rtc->reset_pin_assert_time); rtc 381 drivers/rtc/rtc-jz4740.c rtc->min_wakeup_pin_assert_time = 100; rtc 384 drivers/rtc/rtc-jz4740.c &rtc->min_wakeup_pin_assert_time); rtc 111 drivers/rtc/rtc-lp8788.c struct lp8788_rtc *rtc = dev_get_drvdata(dev); rtc 112 drivers/rtc/rtc-lp8788.c struct lp8788 *lp = rtc->lp; rtc 135 drivers/rtc/rtc-lp8788.c struct lp8788_rtc *rtc = dev_get_drvdata(dev); rtc 136 drivers/rtc/rtc-lp8788.c struct lp8788 *lp = rtc->lp; rtc 165 drivers/rtc/rtc-lp8788.c struct lp8788_rtc *rtc = dev_get_drvdata(dev); rtc 166 drivers/rtc/rtc-lp8788.c struct lp8788 *lp = rtc->lp; rtc 171 drivers/rtc/rtc-lp8788.c addr = addr_alarm_sec[rtc->alarm]; rtc 190 drivers/rtc/rtc-lp8788.c struct lp8788_rtc *rtc = dev_get_drvdata(dev); rtc 191 drivers/rtc/rtc-lp8788.c struct lp8788 *lp = rtc->lp; rtc 211 drivers/rtc/rtc-lp8788.c addr = addr_alarm_sec[rtc->alarm] + i; rtc 218 drivers/rtc/rtc-lp8788.c addr = addr_alarm_en[rtc->alarm]; rtc 226 drivers/rtc/rtc-lp8788.c struct lp8788_rtc *rtc = dev_get_drvdata(dev); rtc 227 drivers/rtc/rtc-lp8788.c struct lp8788 *lp = rtc->lp; rtc 230 drivers/rtc/rtc-lp8788.c if (!rtc->irq) rtc 233 drivers/rtc/rtc-lp8788.c mask = mask_alarm_en[rtc->alarm]; rtc 234 drivers/rtc/rtc-lp8788.c shift = shift_alarm_en[rtc->alarm]; rtc 249 drivers/rtc/rtc-lp8788.c struct lp8788_rtc *rtc = ptr; rtc 251 drivers/rtc/rtc-lp8788.c rtc_update_irq(rtc->rdev, 1, ALARM_IRQ_FLAG); rtc 256 drivers/rtc/rtc-lp8788.c struct lp8788_rtc *rtc) rtc 259 drivers/rtc/rtc-lp8788.c struct lp8788 *lp = rtc->lp; rtc 263 drivers/rtc/rtc-lp8788.c rtc->irq = 0; rtc 270 drivers/rtc/rtc-lp8788.c if (rtc->alarm == LP8788_ALARM_1) rtc 275 drivers/rtc/rtc-lp8788.c rtc->irq = irq_create_mapping(irqdm, irq); rtc 277 drivers/rtc/rtc-lp8788.c return devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL, rtc 279 drivers/rtc/rtc-lp8788.c 0, LP8788_ALM_IRQ, rtc); rtc 285 drivers/rtc/rtc-lp8788.c struct lp8788_rtc *rtc; rtc 288 drivers/rtc/rtc-lp8788.c rtc = devm_kzalloc(dev, sizeof(struct lp8788_rtc), GFP_KERNEL); rtc 289 drivers/rtc/rtc-lp8788.c if (!rtc) rtc 292 drivers/rtc/rtc-lp8788.c rtc->lp = lp; rtc 293 drivers/rtc/rtc-lp8788.c rtc->alarm = lp->pdata ? lp->pdata->alarm_sel : DEFAULT_ALARM_SEL; rtc 294 drivers/rtc/rtc-lp8788.c platform_set_drvdata(pdev, rtc); rtc 298 drivers/rtc/rtc-lp8788.c rtc->rdev = devm_rtc_device_register(dev, "lp8788_rtc", rtc 300 drivers/rtc/rtc-lp8788.c if (IS_ERR(rtc->rdev)) { rtc 302 drivers/rtc/rtc-lp8788.c return PTR_ERR(rtc->rdev); rtc 305 drivers/rtc/rtc-lp8788.c if (lp8788_alarm_irq_register(pdev, rtc)) rtc 64 drivers/rtc/rtc-lpc24xx.c struct rtc_device *rtc; rtc 71 drivers/rtc/rtc-lpc24xx.c struct lpc24xx_rtc *rtc = dev_get_drvdata(dev); rtc 74 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_CCR, LPC178X_CCALEN); rtc 76 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_SEC, tm->tm_sec); rtc 77 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_MIN, tm->tm_min); rtc 78 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_HOUR, tm->tm_hour); rtc 79 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_DOW, tm->tm_wday); rtc 80 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_DOM, tm->tm_mday); rtc 81 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_DOY, tm->tm_yday); rtc 82 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_MONTH, tm->tm_mon); rtc 83 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_YEAR, tm->tm_year); rtc 85 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_CCR, LPC24XX_CLKEN | LPC178X_CCALEN); rtc 92 drivers/rtc/rtc-lpc24xx.c struct lpc24xx_rtc *rtc = dev_get_drvdata(dev); rtc 95 drivers/rtc/rtc-lpc24xx.c ct0 = rtc_readl(rtc, LPC24XX_CTIME0); rtc 96 drivers/rtc/rtc-lpc24xx.c ct1 = rtc_readl(rtc, LPC24XX_CTIME1); rtc 97 drivers/rtc/rtc-lpc24xx.c ct2 = rtc_readl(rtc, LPC24XX_CTIME2); rtc 113 drivers/rtc/rtc-lpc24xx.c struct lpc24xx_rtc *rtc = dev_get_drvdata(dev); rtc 116 drivers/rtc/rtc-lpc24xx.c tm->tm_sec = rtc_readl(rtc, LPC24XX_ALSEC); rtc 117 drivers/rtc/rtc-lpc24xx.c tm->tm_min = rtc_readl(rtc, LPC24XX_ALMIN); rtc 118 drivers/rtc/rtc-lpc24xx.c tm->tm_hour = rtc_readl(rtc, LPC24XX_ALHOUR); rtc 119 drivers/rtc/rtc-lpc24xx.c tm->tm_mday = rtc_readl(rtc, LPC24XX_ALDOM); rtc 120 drivers/rtc/rtc-lpc24xx.c tm->tm_wday = rtc_readl(rtc, LPC24XX_ALDOW); rtc 121 drivers/rtc/rtc-lpc24xx.c tm->tm_yday = rtc_readl(rtc, LPC24XX_ALDOY); rtc 122 drivers/rtc/rtc-lpc24xx.c tm->tm_mon = rtc_readl(rtc, LPC24XX_ALMON); rtc 123 drivers/rtc/rtc-lpc24xx.c tm->tm_year = rtc_readl(rtc, LPC24XX_ALYEAR); rtc 125 drivers/rtc/rtc-lpc24xx.c wkalrm->enabled = rtc_readl(rtc, LPC24XX_AMR) == 0; rtc 126 drivers/rtc/rtc-lpc24xx.c wkalrm->pending = !!(rtc_readl(rtc, LPC24XX_ILR) & LPC24XX_RTCCIF); rtc 133 drivers/rtc/rtc-lpc24xx.c struct lpc24xx_rtc *rtc = dev_get_drvdata(dev); rtc 137 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_AMR, LPC24XX_ALARM_DISABLE); rtc 139 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALSEC, tm->tm_sec); rtc 140 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALMIN, tm->tm_min); rtc 141 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALHOUR, tm->tm_hour); rtc 142 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALDOM, tm->tm_mday); rtc 143 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALDOW, tm->tm_wday); rtc 144 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALDOY, tm->tm_yday); rtc 145 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALMON, tm->tm_mon); rtc 146 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALYEAR, tm->tm_year); rtc 149 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_AMR, 0); rtc 156 drivers/rtc/rtc-lpc24xx.c struct lpc24xx_rtc *rtc = dev_get_drvdata(dev); rtc 159 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_AMR, 0); rtc 161 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_AMR, LPC24XX_ALARM_DISABLE); rtc 169 drivers/rtc/rtc-lpc24xx.c struct lpc24xx_rtc *rtc = data; rtc 173 drivers/rtc/rtc-lpc24xx.c rtc_iir = rtc_readl(rtc, LPC24XX_ILR); rtc 176 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_AMR, LPC24XX_ALARM_DISABLE); rtc 180 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ILR, rtc_iir); rtc 181 drivers/rtc/rtc-lpc24xx.c rtc_update_irq(rtc->rtc, 1, events); rtc 196 drivers/rtc/rtc-lpc24xx.c struct lpc24xx_rtc *rtc; rtc 200 drivers/rtc/rtc-lpc24xx.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 201 drivers/rtc/rtc-lpc24xx.c if (!rtc) rtc 205 drivers/rtc/rtc-lpc24xx.c rtc->rtc_base = devm_ioremap_resource(&pdev->dev, res); rtc 206 drivers/rtc/rtc-lpc24xx.c if (IS_ERR(rtc->rtc_base)) rtc 207 drivers/rtc/rtc-lpc24xx.c return PTR_ERR(rtc->rtc_base); rtc 215 drivers/rtc/rtc-lpc24xx.c rtc->clk_rtc = devm_clk_get(&pdev->dev, "rtc"); rtc 216 drivers/rtc/rtc-lpc24xx.c if (IS_ERR(rtc->clk_rtc)) { rtc 218 drivers/rtc/rtc-lpc24xx.c return PTR_ERR(rtc->clk_rtc); rtc 221 drivers/rtc/rtc-lpc24xx.c rtc->clk_reg = devm_clk_get(&pdev->dev, "reg"); rtc 222 drivers/rtc/rtc-lpc24xx.c if (IS_ERR(rtc->clk_reg)) { rtc 224 drivers/rtc/rtc-lpc24xx.c return PTR_ERR(rtc->clk_reg); rtc 227 drivers/rtc/rtc-lpc24xx.c ret = clk_prepare_enable(rtc->clk_rtc); rtc 233 drivers/rtc/rtc-lpc24xx.c ret = clk_prepare_enable(rtc->clk_reg); rtc 239 drivers/rtc/rtc-lpc24xx.c platform_set_drvdata(pdev, rtc); rtc 242 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ILR, LPC24XX_RTCCIF | LPC24XX_RTCALF); rtc 245 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_CCR, LPC24XX_CLKEN | LPC178X_CCALEN); rtc 248 drivers/rtc/rtc-lpc24xx.c pdev->name, rtc); rtc 254 drivers/rtc/rtc-lpc24xx.c rtc->rtc = devm_rtc_device_register(&pdev->dev, "lpc24xx-rtc", rtc 256 drivers/rtc/rtc-lpc24xx.c if (IS_ERR(rtc->rtc)) { rtc 258 drivers/rtc/rtc-lpc24xx.c ret = PTR_ERR(rtc->rtc); rtc 265 drivers/rtc/rtc-lpc24xx.c clk_disable_unprepare(rtc->clk_reg); rtc 267 drivers/rtc/rtc-lpc24xx.c clk_disable_unprepare(rtc->clk_rtc); rtc 273 drivers/rtc/rtc-lpc24xx.c struct lpc24xx_rtc *rtc = platform_get_drvdata(pdev); rtc 276 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_AMR, LPC24XX_ALARM_DISABLE); rtc 277 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_CIIR, 0); rtc 279 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_CCR, LPC178X_CCALEN); rtc 281 drivers/rtc/rtc-lpc24xx.c clk_disable_unprepare(rtc->clk_rtc); rtc 282 drivers/rtc/rtc-lpc24xx.c clk_disable_unprepare(rtc->clk_reg); rtc 51 drivers/rtc/rtc-lpc32xx.c struct rtc_device *rtc; rtc 58 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); rtc 60 drivers/rtc/rtc-lpc32xx.c elapsed_sec = rtc_readl(rtc, LPC32XX_RTC_UCOUNT); rtc 68 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); rtc 72 drivers/rtc/rtc-lpc32xx.c spin_lock_irq(&rtc->lock); rtc 75 drivers/rtc/rtc-lpc32xx.c tmp = rtc_readl(rtc, LPC32XX_RTC_CTRL); rtc 76 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_CTRL, tmp | LPC32XX_RTC_CTRL_CNTR_DIS); rtc 77 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_UCOUNT, secs); rtc 78 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_DCOUNT, 0xFFFFFFFF - secs); rtc 79 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_CTRL, tmp &= ~LPC32XX_RTC_CTRL_CNTR_DIS); rtc 81 drivers/rtc/rtc-lpc32xx.c spin_unlock_irq(&rtc->lock); rtc 89 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); rtc 91 drivers/rtc/rtc-lpc32xx.c rtc_time64_to_tm(rtc_readl(rtc, LPC32XX_RTC_MATCH0), &wkalrm->time); rtc 92 drivers/rtc/rtc-lpc32xx.c wkalrm->enabled = rtc->alarm_enabled; rtc 93 drivers/rtc/rtc-lpc32xx.c wkalrm->pending = !!(rtc_readl(rtc, LPC32XX_RTC_INTSTAT) & rtc 102 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); rtc 108 drivers/rtc/rtc-lpc32xx.c spin_lock_irq(&rtc->lock); rtc 111 drivers/rtc/rtc-lpc32xx.c tmp = rtc_readl(rtc, LPC32XX_RTC_CTRL); rtc 112 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_CTRL, tmp & ~LPC32XX_RTC_CTRL_MATCH0); rtc 114 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_MATCH0, alarmsecs); rtc 116 drivers/rtc/rtc-lpc32xx.c rtc->alarm_enabled = wkalrm->enabled; rtc 118 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_INTSTAT, rtc 120 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_CTRL, tmp | rtc 124 drivers/rtc/rtc-lpc32xx.c spin_unlock_irq(&rtc->lock); rtc 132 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); rtc 135 drivers/rtc/rtc-lpc32xx.c spin_lock_irq(&rtc->lock); rtc 136 drivers/rtc/rtc-lpc32xx.c tmp = rtc_readl(rtc, LPC32XX_RTC_CTRL); rtc 139 drivers/rtc/rtc-lpc32xx.c rtc->alarm_enabled = 1; rtc 142 drivers/rtc/rtc-lpc32xx.c rtc->alarm_enabled = 0; rtc 146 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_CTRL, tmp); rtc 147 drivers/rtc/rtc-lpc32xx.c spin_unlock_irq(&rtc->lock); rtc 154 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc = dev; rtc 156 drivers/rtc/rtc-lpc32xx.c spin_lock(&rtc->lock); rtc 159 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_CTRL, rtc 160 drivers/rtc/rtc-lpc32xx.c rtc_readl(rtc, LPC32XX_RTC_CTRL) & rtc 162 drivers/rtc/rtc-lpc32xx.c rtc->alarm_enabled = 0; rtc 168 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_MATCH0, 0xFFFFFFFF); rtc 169 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_INTSTAT, LPC32XX_RTC_INTSTAT_MATCH0); rtc 171 drivers/rtc/rtc-lpc32xx.c spin_unlock(&rtc->lock); rtc 173 drivers/rtc/rtc-lpc32xx.c rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF); rtc 189 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc; rtc 193 drivers/rtc/rtc-lpc32xx.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 194 drivers/rtc/rtc-lpc32xx.c if (unlikely(!rtc)) rtc 198 drivers/rtc/rtc-lpc32xx.c rtc->rtc_base = devm_ioremap_resource(&pdev->dev, res); rtc 199 drivers/rtc/rtc-lpc32xx.c if (IS_ERR(rtc->rtc_base)) rtc 200 drivers/rtc/rtc-lpc32xx.c return PTR_ERR(rtc->rtc_base); rtc 202 drivers/rtc/rtc-lpc32xx.c spin_lock_init(&rtc->lock); rtc 209 drivers/rtc/rtc-lpc32xx.c tmp = rtc_readl(rtc, LPC32XX_RTC_CTRL); rtc 210 drivers/rtc/rtc-lpc32xx.c if (rtc_readl(rtc, LPC32XX_RTC_KEY) != LPC32XX_RTC_KEY_ONSW_LOADVAL) { rtc 218 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_CTRL, tmp); rtc 221 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_MATCH0, 0xFFFFFFFF); rtc 222 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_INTSTAT, rtc 228 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_KEY, rtc 231 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_CTRL, rtc 235 drivers/rtc/rtc-lpc32xx.c platform_set_drvdata(pdev, rtc); rtc 237 drivers/rtc/rtc-lpc32xx.c rtc->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 238 drivers/rtc/rtc-lpc32xx.c if (IS_ERR(rtc->rtc)) rtc 239 drivers/rtc/rtc-lpc32xx.c return PTR_ERR(rtc->rtc); rtc 241 drivers/rtc/rtc-lpc32xx.c rtc->rtc->ops = &lpc32xx_rtc_ops; rtc 242 drivers/rtc/rtc-lpc32xx.c rtc->rtc->range_max = U32_MAX; rtc 244 drivers/rtc/rtc-lpc32xx.c err = rtc_register_device(rtc->rtc); rtc 252 drivers/rtc/rtc-lpc32xx.c rtc->irq = platform_get_irq(pdev, 0); rtc 253 drivers/rtc/rtc-lpc32xx.c if (rtc->irq < 0) { rtc 256 drivers/rtc/rtc-lpc32xx.c if (devm_request_irq(&pdev->dev, rtc->irq, rtc 258 drivers/rtc/rtc-lpc32xx.c 0, pdev->name, rtc) < 0) { rtc 260 drivers/rtc/rtc-lpc32xx.c rtc->irq = -1; rtc 271 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc = platform_get_drvdata(pdev); rtc 273 drivers/rtc/rtc-lpc32xx.c if (rtc->irq >= 0) rtc 282 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); rtc 284 drivers/rtc/rtc-lpc32xx.c if (rtc->irq >= 0) { rtc 286 drivers/rtc/rtc-lpc32xx.c enable_irq_wake(rtc->irq); rtc 288 drivers/rtc/rtc-lpc32xx.c disable_irq_wake(rtc->irq); rtc 296 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); rtc 298 drivers/rtc/rtc-lpc32xx.c if (rtc->irq >= 0 && device_may_wakeup(dev)) rtc 299 drivers/rtc/rtc-lpc32xx.c disable_irq_wake(rtc->irq); rtc 307 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); rtc 309 drivers/rtc/rtc-lpc32xx.c spin_lock_irq(&rtc->lock); rtc 311 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_CTRL, rtc 312 drivers/rtc/rtc-lpc32xx.c rtc_readl(rtc, LPC32XX_RTC_CTRL) & rtc 315 drivers/rtc/rtc-lpc32xx.c spin_unlock_irq(&rtc->lock); rtc 322 drivers/rtc/rtc-lpc32xx.c struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); rtc 324 drivers/rtc/rtc-lpc32xx.c if (rtc->alarm_enabled) { rtc 325 drivers/rtc/rtc-lpc32xx.c spin_lock_irq(&rtc->lock); rtc 327 drivers/rtc/rtc-lpc32xx.c rtc_writel(rtc, LPC32XX_RTC_CTRL, rtc 328 drivers/rtc/rtc-lpc32xx.c rtc_readl(rtc, LPC32XX_RTC_CTRL) | rtc 331 drivers/rtc/rtc-lpc32xx.c spin_unlock_irq(&rtc->lock); rtc 149 drivers/rtc/rtc-m41t80.c struct rtc_device *rtc; rtc 161 drivers/rtc/rtc-m41t80.c struct mutex *lock = &m41t80->rtc->ops_lock; rtc 186 drivers/rtc/rtc-m41t80.c rtc_update_irq(m41t80->rtc, 1, events); rtc 900 drivers/rtc/rtc-m41t80.c m41t80_data->rtc = devm_rtc_allocate_device(&client->dev); rtc 901 drivers/rtc/rtc-m41t80.c if (IS_ERR(m41t80_data->rtc)) rtc 902 drivers/rtc/rtc-m41t80.c return PTR_ERR(m41t80_data->rtc); rtc 927 drivers/rtc/rtc-m41t80.c m41t80_data->rtc->ops = &m41t80_rtc_ops; rtc 931 drivers/rtc/rtc-m41t80.c m41t80_data->rtc->uie_unsupported = 1; rtc 981 drivers/rtc/rtc-m41t80.c rc = rtc_register_device(m41t80_data->rtc); rtc 172 drivers/rtc/rtc-m41t93.c struct rtc_device *rtc; rtc 184 drivers/rtc/rtc-m41t93.c rtc = devm_rtc_device_register(&spi->dev, m41t93_driver.driver.name, rtc 186 drivers/rtc/rtc-m41t93.c if (IS_ERR(rtc)) rtc 187 drivers/rtc/rtc-m41t93.c return PTR_ERR(rtc); rtc 189 drivers/rtc/rtc-m41t93.c spi_set_drvdata(spi, rtc); rtc 111 drivers/rtc/rtc-m41t94.c struct rtc_device *rtc; rtc 123 drivers/rtc/rtc-m41t94.c rtc = devm_rtc_device_register(&spi->dev, m41t94_driver.driver.name, rtc 125 drivers/rtc/rtc-m41t94.c if (IS_ERR(rtc)) rtc 126 drivers/rtc/rtc-m41t94.c return PTR_ERR(rtc); rtc 128 drivers/rtc/rtc-m41t94.c spi_set_drvdata(spi, rtc); rtc 37 drivers/rtc/rtc-m48t35.c struct rtc_device *rtc; rtc 170 drivers/rtc/rtc-m48t35.c priv->rtc = devm_rtc_device_register(&pdev->dev, "m48t35", rtc 172 drivers/rtc/rtc-m48t35.c return PTR_ERR_OR_ZERO(priv->rtc); rtc 37 drivers/rtc/rtc-m48t59.c struct rtc_device *rtc; rtc 300 drivers/rtc/rtc-m48t59.c rtc_update_irq(m48t59->rtc, 1, (RTC_AF | RTC_IRQF)); rtc 462 drivers/rtc/rtc-m48t59.c m48t59->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 463 drivers/rtc/rtc-m48t59.c if (IS_ERR(m48t59->rtc)) rtc 464 drivers/rtc/rtc-m48t59.c return PTR_ERR(m48t59->rtc); rtc 466 drivers/rtc/rtc-m48t59.c m48t59->rtc->nvram_old_abi = true; rtc 467 drivers/rtc/rtc-m48t59.c m48t59->rtc->ops = ops; rtc 470 drivers/rtc/rtc-m48t59.c ret = rtc_nvmem_register(m48t59->rtc, &nvmem_cfg); rtc 474 drivers/rtc/rtc-m48t59.c ret = rtc_register_device(m48t59->rtc); rtc 43 drivers/rtc/rtc-m48t86.c struct rtc_device *rtc; rtc 259 drivers/rtc/rtc-m48t86.c info->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 260 drivers/rtc/rtc-m48t86.c if (IS_ERR(info->rtc)) rtc 261 drivers/rtc/rtc-m48t86.c return PTR_ERR(info->rtc); rtc 263 drivers/rtc/rtc-m48t86.c info->rtc->ops = &m48t86_rtc_ops; rtc 264 drivers/rtc/rtc-m48t86.c info->rtc->nvram_old_abi = true; rtc 266 drivers/rtc/rtc-m48t86.c err = rtc_register_device(info->rtc); rtc 270 drivers/rtc/rtc-m48t86.c rtc_nvmem_register(info->rtc, &m48t86_nvmem_cfg); rtc 205 drivers/rtc/rtc-max6900.c struct rtc_device *rtc; rtc 210 drivers/rtc/rtc-max6900.c rtc = devm_rtc_device_register(&client->dev, max6900_driver.driver.name, rtc 212 drivers/rtc/rtc-max6900.c if (IS_ERR(rtc)) rtc 213 drivers/rtc/rtc-max6900.c return PTR_ERR(rtc); rtc 215 drivers/rtc/rtc-max6900.c i2c_set_clientdata(client, rtc); rtc 121 drivers/rtc/rtc-max6902.c struct rtc_device *rtc; rtc 133 drivers/rtc/rtc-max6902.c rtc = devm_rtc_device_register(&spi->dev, "max6902", rtc 135 drivers/rtc/rtc-max6902.c if (IS_ERR(rtc)) rtc 136 drivers/rtc/rtc-max6902.c return PTR_ERR(rtc); rtc 138 drivers/rtc/rtc-max6902.c spi_set_drvdata(spi, rtc); rtc 109 drivers/rtc/rtc-max6916.c struct rtc_device *rtc; rtc 140 drivers/rtc/rtc-max6916.c rtc = devm_rtc_device_register(&spi->dev, "max6916", rtc 142 drivers/rtc/rtc-max6916.c if (IS_ERR(rtc)) rtc 143 drivers/rtc/rtc-max6916.c return PTR_ERR(rtc); rtc 145 drivers/rtc/rtc-max6916.c spi_set_drvdata(spi, rtc); rtc 85 drivers/rtc/rtc-max77686.c struct i2c_client *rtc; rtc 693 drivers/rtc/rtc-max77686.c info->rtc = devm_i2c_new_dummy_device(info->dev, parent_i2c->adapter, rtc 695 drivers/rtc/rtc-max77686.c if (IS_ERR(info->rtc)) { rtc 697 drivers/rtc/rtc-max77686.c return PTR_ERR(info->rtc); rtc 700 drivers/rtc/rtc-max77686.c info->rtc_regmap = devm_regmap_init_i2c(info->rtc, rtc 49 drivers/rtc/rtc-max8907.c struct max8907_rtc *rtc = data; rtc 51 drivers/rtc/rtc-max8907.c regmap_write(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0); rtc 53 drivers/rtc/rtc-max8907.c rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF); rtc 96 drivers/rtc/rtc-max8907.c struct max8907_rtc *rtc = dev_get_drvdata(dev); rtc 100 drivers/rtc/rtc-max8907.c ret = regmap_bulk_read(rtc->regmap, MAX8907_REG_RTC_SEC, regs, rtc 112 drivers/rtc/rtc-max8907.c struct max8907_rtc *rtc = dev_get_drvdata(dev); rtc 117 drivers/rtc/rtc-max8907.c return regmap_bulk_write(rtc->regmap, MAX8907_REG_RTC_SEC, regs, rtc 123 drivers/rtc/rtc-max8907.c struct max8907_rtc *rtc = dev_get_drvdata(dev); rtc 128 drivers/rtc/rtc-max8907.c ret = regmap_bulk_read(rtc->regmap, MAX8907_REG_ALARM0_SEC, regs, rtc 135 drivers/rtc/rtc-max8907.c ret = regmap_read(rtc->regmap, MAX8907_REG_ALARM0_CNTL, &val); rtc 146 drivers/rtc/rtc-max8907.c struct max8907_rtc *rtc = dev_get_drvdata(dev); rtc 153 drivers/rtc/rtc-max8907.c ret = regmap_write(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0); rtc 157 drivers/rtc/rtc-max8907.c ret = regmap_bulk_write(rtc->regmap, MAX8907_REG_ALARM0_SEC, regs, rtc 163 drivers/rtc/rtc-max8907.c ret = regmap_write(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0x77); rtc 178 drivers/rtc/rtc-max8907.c struct max8907_rtc *rtc; rtc 181 drivers/rtc/rtc-max8907.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 182 drivers/rtc/rtc-max8907.c if (!rtc) rtc 184 drivers/rtc/rtc-max8907.c platform_set_drvdata(pdev, rtc); rtc 186 drivers/rtc/rtc-max8907.c rtc->max8907 = max8907; rtc 187 drivers/rtc/rtc-max8907.c rtc->regmap = max8907->regmap_rtc; rtc 189 drivers/rtc/rtc-max8907.c rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, "max8907-rtc", rtc 191 drivers/rtc/rtc-max8907.c if (IS_ERR(rtc->rtc_dev)) { rtc 192 drivers/rtc/rtc-max8907.c ret = PTR_ERR(rtc->rtc_dev); rtc 197 drivers/rtc/rtc-max8907.c rtc->irq = regmap_irq_get_virq(max8907->irqc_rtc, rtc 199 drivers/rtc/rtc-max8907.c if (rtc->irq < 0) rtc 200 drivers/rtc/rtc-max8907.c return rtc->irq; rtc 202 drivers/rtc/rtc-max8907.c ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL, rtc 204 drivers/rtc/rtc-max8907.c IRQF_ONESHOT, "max8907-alarm0", rtc); rtc 207 drivers/rtc/rtc-max8907.c rtc->irq, ret); rtc 67 drivers/rtc/rtc-max8925.c struct i2c_client *rtc; rtc 77 drivers/rtc/rtc-max8925.c max8925_set_bits(info->rtc, MAX8925_ALARM0_CNTL, 0x7f, 0); rtc 157 drivers/rtc/rtc-max8925.c ret = max8925_bulk_read(info->rtc, MAX8925_RTC_SEC, TIME_NUM, buf); rtc 174 drivers/rtc/rtc-max8925.c ret = max8925_bulk_write(info->rtc, MAX8925_RTC_SEC, TIME_NUM, buf); rtc 185 drivers/rtc/rtc-max8925.c ret = max8925_bulk_read(info->rtc, MAX8925_ALARM0_SEC, TIME_NUM, buf); rtc 191 drivers/rtc/rtc-max8925.c ret = max8925_reg_read(info->rtc, MAX8925_RTC_IRQ_MASK); rtc 197 drivers/rtc/rtc-max8925.c ret = max8925_reg_read(info->rtc, MAX8925_ALARM0_CNTL); rtc 205 drivers/rtc/rtc-max8925.c ret = max8925_reg_read(info->rtc, MAX8925_RTC_STATUS); rtc 226 drivers/rtc/rtc-max8925.c ret = max8925_bulk_write(info->rtc, MAX8925_ALARM0_SEC, TIME_NUM, buf); rtc 231 drivers/rtc/rtc-max8925.c ret = max8925_reg_write(info->rtc, MAX8925_ALARM0_CNTL, 0x77); rtc 233 drivers/rtc/rtc-max8925.c ret = max8925_reg_write(info->rtc, MAX8925_ALARM0_CNTL, 0x0); rtc 256 drivers/rtc/rtc-max8925.c info->rtc = chip->rtc; rtc 67 drivers/rtc/rtc-max8997.c struct i2c_client *rtc; rtc 117 drivers/rtc/rtc-max8997.c ret = max8997_write_reg(info->rtc, MAX8997_RTC_UPDATE1, rtc 139 drivers/rtc/rtc-max8997.c ret = max8997_bulk_read(info->rtc, MAX8997_RTC_SEC, RTC_NR_TIME, data); rtc 165 drivers/rtc/rtc-max8997.c ret = max8997_bulk_write(info->rtc, MAX8997_RTC_SEC, RTC_NR_TIME, data); rtc 187 drivers/rtc/rtc-max8997.c ret = max8997_bulk_read(info->rtc, MAX8997_RTC_ALARM1_SEC, RTC_NR_TIME, rtc 229 drivers/rtc/rtc-max8997.c ret = max8997_bulk_read(info->rtc, MAX8997_RTC_ALARM1_SEC, RTC_NR_TIME, rtc 240 drivers/rtc/rtc-max8997.c ret = max8997_bulk_write(info->rtc, MAX8997_RTC_ALARM1_SEC, RTC_NR_TIME, rtc 261 drivers/rtc/rtc-max8997.c ret = max8997_bulk_read(info->rtc, MAX8997_RTC_ALARM1_SEC, RTC_NR_TIME, rtc 280 drivers/rtc/rtc-max8997.c ret = max8997_bulk_write(info->rtc, MAX8997_RTC_ALARM1_SEC, RTC_NR_TIME, rtc 312 drivers/rtc/rtc-max8997.c ret = max8997_bulk_write(info->rtc, MAX8997_RTC_ALARM1_SEC, RTC_NR_TIME, rtc 384 drivers/rtc/rtc-max8997.c ret = max8997_update_reg(info->rtc, MAX8997_RTC_WTSR_SMPL, val, mask); rtc 412 drivers/rtc/rtc-max8997.c ret = max8997_update_reg(info->rtc, MAX8997_RTC_WTSR_SMPL, val, mask); rtc 422 drivers/rtc/rtc-max8997.c max8997_read_reg(info->rtc, MAX8997_RTC_WTSR_SMPL, &val); rtc 437 drivers/rtc/rtc-max8997.c ret = max8997_bulk_write(info->rtc, MAX8997_RTC_CTRLMASK, 2, data); rtc 462 drivers/rtc/rtc-max8997.c info->rtc = max8997->rtc; rtc 69 drivers/rtc/rtc-max8998.c struct i2c_client *rtc; rtc 111 drivers/rtc/rtc-max8998.c ret = max8998_bulk_read(info->rtc, MAX8998_RTC_SEC, 8, data); rtc 128 drivers/rtc/rtc-max8998.c ret = max8998_bulk_write(info->rtc, MAX8998_RTC_SEC, 8, data); rtc 143 drivers/rtc/rtc-max8998.c ret = max8998_bulk_read(info->rtc, MAX8998_ALARM0_SEC, 8, data); rtc 149 drivers/rtc/rtc-max8998.c ret = max8998_read_reg(info->rtc, MAX8998_ALARM0_CONF, &val); rtc 155 drivers/rtc/rtc-max8998.c ret = max8998_read_reg(info->rtc, MAX8998_RTC_STATUS, &val); rtc 169 drivers/rtc/rtc-max8998.c int ret = max8998_write_reg(info->rtc, MAX8998_ALARM0_CONF, 0); rtc 186 drivers/rtc/rtc-max8998.c ret = max8998_write_reg(info->rtc, MAX8998_ALARM0_CONF, alarm0_conf); rtc 206 drivers/rtc/rtc-max8998.c ret = max8998_bulk_write(info->rtc, MAX8998_ALARM0_SEC, 8, data); rtc 261 drivers/rtc/rtc-max8998.c info->rtc = max8998->rtc; rtc 27 drivers/rtc/rtc-mc13xxx.c struct rtc_device *rtc; rtc 244 drivers/rtc/rtc-mc13xxx.c rtc_update_irq(priv->rtc, 1, RTC_IRQF | RTC_AF); rtc 285 drivers/rtc/rtc-mc13xxx.c priv->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 286 drivers/rtc/rtc-mc13xxx.c if (IS_ERR(priv->rtc)) rtc 287 drivers/rtc/rtc-mc13xxx.c return PTR_ERR(priv->rtc); rtc 290 drivers/rtc/rtc-mc13xxx.c priv->rtc->ops = &mc13xxx_rtc_ops; rtc 292 drivers/rtc/rtc-mc13xxx.c priv->rtc->range_max = (timeu64_t)(1 << 15) * SEC_PER_DAY - 1; rtc 310 drivers/rtc/rtc-mc13xxx.c ret = rtc_register_device(priv->rtc); rtc 352 drivers/rtc/rtc-mcp795.c struct rtc_device *rtc = spi_get_drvdata(spi); rtc 353 drivers/rtc/rtc-mcp795.c struct mutex *lock = &rtc->ops_lock; rtc 366 drivers/rtc/rtc-mcp795.c rtc_update_irq(rtc, 1, RTC_AF | RTC_IRQF); rtc 383 drivers/rtc/rtc-mcp795.c struct rtc_device *rtc; rtc 399 drivers/rtc/rtc-mcp795.c rtc = devm_rtc_device_register(&spi->dev, "rtc-mcp795", rtc 401 drivers/rtc/rtc-mcp795.c if (IS_ERR(rtc)) rtc 402 drivers/rtc/rtc-mcp795.c return PTR_ERR(rtc); rtc 404 drivers/rtc/rtc-mcp795.c spi_set_drvdata(spi, rtc); rtc 416 drivers/rtc/rtc-mcp795.c dev_name(&rtc->dev), spi); rtc 16 drivers/rtc/rtc-meson-vrtc.c struct rtc_device *rtc; rtc 82 drivers/rtc/rtc-meson-vrtc.c vrtc->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 83 drivers/rtc/rtc-meson-vrtc.c if (IS_ERR(vrtc->rtc)) rtc 84 drivers/rtc/rtc-meson-vrtc.c return PTR_ERR(vrtc->rtc); rtc 86 drivers/rtc/rtc-meson-vrtc.c vrtc->rtc->ops = &meson_vrtc_ops; rtc 87 drivers/rtc/rtc-meson-vrtc.c ret = rtc_register_device(vrtc->rtc); rtc 62 drivers/rtc/rtc-meson.c struct rtc_device *rtc; /* rtc device we created */ rtc 81 drivers/rtc/rtc-meson.c static void meson_rtc_sclk_pulse(struct meson_rtc *rtc) rtc 84 drivers/rtc/rtc-meson.c regmap_update_bits(rtc->peripheral, RTC_ADDR0, RTC_ADDR0_LINE_SCLK, 0); rtc 86 drivers/rtc/rtc-meson.c regmap_update_bits(rtc->peripheral, RTC_ADDR0, RTC_ADDR0_LINE_SCLK, rtc 90 drivers/rtc/rtc-meson.c static void meson_rtc_send_bit(struct meson_rtc *rtc, unsigned int bit) rtc 92 drivers/rtc/rtc-meson.c regmap_update_bits(rtc->peripheral, RTC_ADDR0, RTC_ADDR0_LINE_SDI, rtc 94 drivers/rtc/rtc-meson.c meson_rtc_sclk_pulse(rtc); rtc 97 drivers/rtc/rtc-meson.c static void meson_rtc_send_bits(struct meson_rtc *rtc, u32 data, rtc 103 drivers/rtc/rtc-meson.c meson_rtc_send_bit(rtc, data & bit); rtc 108 drivers/rtc/rtc-meson.c static void meson_rtc_set_dir(struct meson_rtc *rtc, u32 mode) rtc 110 drivers/rtc/rtc-meson.c regmap_update_bits(rtc->peripheral, RTC_ADDR0, RTC_ADDR0_LINE_SEN, 0); rtc 111 drivers/rtc/rtc-meson.c regmap_update_bits(rtc->peripheral, RTC_ADDR0, RTC_ADDR0_LINE_SDI, 0); rtc 112 drivers/rtc/rtc-meson.c meson_rtc_send_bit(rtc, mode); rtc 113 drivers/rtc/rtc-meson.c regmap_update_bits(rtc->peripheral, RTC_ADDR0, RTC_ADDR0_LINE_SDI, 0); rtc 116 drivers/rtc/rtc-meson.c static u32 meson_rtc_get_data(struct meson_rtc *rtc) rtc 122 drivers/rtc/rtc-meson.c meson_rtc_sclk_pulse(rtc); rtc 125 drivers/rtc/rtc-meson.c regmap_read(rtc->peripheral, RTC_ADDR1, &tmp); rtc 132 drivers/rtc/rtc-meson.c static int meson_rtc_get_bus(struct meson_rtc *rtc) rtc 139 drivers/rtc/rtc-meson.c regmap_update_bits(rtc->peripheral, RTC_ADDR0, val, 0); rtc 143 drivers/rtc/rtc-meson.c if (!regmap_read_poll_timeout(rtc->peripheral, RTC_ADDR1, val, rtc 148 drivers/rtc/rtc-meson.c dev_warn(rtc->dev, "failed to get bus, resetting RTC\n"); rtc 150 drivers/rtc/rtc-meson.c ret = reset_control_reset(rtc->reset); rtc 155 drivers/rtc/rtc-meson.c dev_err(rtc->dev, "bus is not ready\n"); rtc 162 drivers/rtc/rtc-meson.c struct meson_rtc *rtc = context; rtc 165 drivers/rtc/rtc-meson.c ret = meson_rtc_get_bus(rtc); rtc 169 drivers/rtc/rtc-meson.c regmap_update_bits(rtc->peripheral, RTC_ADDR0, RTC_ADDR0_LINE_SEN, rtc 171 drivers/rtc/rtc-meson.c meson_rtc_send_bits(rtc, reg, RTC_ADDR_BITS); rtc 172 drivers/rtc/rtc-meson.c meson_rtc_set_dir(rtc, 0); rtc 173 drivers/rtc/rtc-meson.c *data = meson_rtc_get_data(rtc); rtc 181 drivers/rtc/rtc-meson.c struct meson_rtc *rtc = context; rtc 184 drivers/rtc/rtc-meson.c ret = meson_rtc_get_bus(rtc); rtc 188 drivers/rtc/rtc-meson.c regmap_update_bits(rtc->peripheral, RTC_ADDR0, RTC_ADDR0_LINE_SEN, rtc 190 drivers/rtc/rtc-meson.c meson_rtc_send_bits(rtc, data, RTC_DATA_BITS); rtc 191 drivers/rtc/rtc-meson.c meson_rtc_send_bits(rtc, reg, RTC_ADDR_BITS); rtc 192 drivers/rtc/rtc-meson.c meson_rtc_set_dir(rtc, 1); rtc 211 drivers/rtc/rtc-meson.c static int meson_rtc_write_static(struct meson_rtc *rtc, u32 data) rtc 215 drivers/rtc/rtc-meson.c regmap_write(rtc->peripheral, RTC_REG4, rtc 220 drivers/rtc/rtc-meson.c regmap_update_bits(rtc->peripheral, RTC_ADDR0, rtc 224 drivers/rtc/rtc-meson.c return regmap_read_poll_timeout(rtc->peripheral, RTC_REG4, tmp, rtc 233 drivers/rtc/rtc-meson.c struct meson_rtc *rtc = dev_get_drvdata(dev); rtc 237 drivers/rtc/rtc-meson.c ret = regmap_read(rtc->serial, RTC_COUNTER, &time); rtc 246 drivers/rtc/rtc-meson.c struct meson_rtc *rtc = dev_get_drvdata(dev); rtc 248 drivers/rtc/rtc-meson.c return regmap_write(rtc->serial, RTC_COUNTER, rtc_tm_to_time64(tm)); rtc 261 drivers/rtc/rtc-meson.c struct meson_rtc *rtc = context; rtc 267 drivers/rtc/rtc-meson.c return regmap_bulk_read(rtc->serial, read_offset, buf, read_size); rtc 273 drivers/rtc/rtc-meson.c struct meson_rtc *rtc = context; rtc 279 drivers/rtc/rtc-meson.c return regmap_bulk_write(rtc->serial, write_offset, buf, write_size); rtc 294 drivers/rtc/rtc-meson.c struct meson_rtc *rtc; rtc 300 drivers/rtc/rtc-meson.c rtc = devm_kzalloc(dev, sizeof(struct meson_rtc), GFP_KERNEL); rtc 301 drivers/rtc/rtc-meson.c if (!rtc) rtc 304 drivers/rtc/rtc-meson.c rtc->rtc = devm_rtc_allocate_device(dev); rtc 305 drivers/rtc/rtc-meson.c if (IS_ERR(rtc->rtc)) rtc 306 drivers/rtc/rtc-meson.c return PTR_ERR(rtc->rtc); rtc 308 drivers/rtc/rtc-meson.c platform_set_drvdata(pdev, rtc); rtc 310 drivers/rtc/rtc-meson.c rtc->dev = dev; rtc 312 drivers/rtc/rtc-meson.c rtc->rtc->ops = &meson_rtc_ops; rtc 313 drivers/rtc/rtc-meson.c rtc->rtc->range_max = U32_MAX; rtc 320 drivers/rtc/rtc-meson.c rtc->peripheral = devm_regmap_init_mmio(dev, base, rtc 322 drivers/rtc/rtc-meson.c if (IS_ERR(rtc->peripheral)) { rtc 324 drivers/rtc/rtc-meson.c return PTR_ERR(rtc->peripheral); rtc 327 drivers/rtc/rtc-meson.c rtc->reset = devm_reset_control_get(dev, NULL); rtc 328 drivers/rtc/rtc-meson.c if (IS_ERR(rtc->reset)) { rtc 330 drivers/rtc/rtc-meson.c return PTR_ERR(rtc->reset); rtc 333 drivers/rtc/rtc-meson.c rtc->vdd = devm_regulator_get(dev, "vdd"); rtc 334 drivers/rtc/rtc-meson.c if (IS_ERR(rtc->vdd)) { rtc 336 drivers/rtc/rtc-meson.c return PTR_ERR(rtc->vdd); rtc 339 drivers/rtc/rtc-meson.c ret = regulator_enable(rtc->vdd); rtc 345 drivers/rtc/rtc-meson.c ret = meson_rtc_write_static(rtc, MESON_STATIC_DEFAULT); rtc 351 drivers/rtc/rtc-meson.c rtc->serial = devm_regmap_init(dev, &meson_rtc_serial_bus, rtc, rtc 353 drivers/rtc/rtc-meson.c if (IS_ERR(rtc->serial)) { rtc 355 drivers/rtc/rtc-meson.c ret = PTR_ERR(rtc->serial); rtc 363 drivers/rtc/rtc-meson.c ret = regmap_read(rtc->serial, RTC_COUNTER, &tm); rtc 369 drivers/rtc/rtc-meson.c meson_rtc_nvmem_config.priv = rtc; rtc 370 drivers/rtc/rtc-meson.c ret = rtc_nvmem_register(rtc->rtc, &meson_rtc_nvmem_config); rtc 374 drivers/rtc/rtc-meson.c ret = rtc_register_device(rtc->rtc); rtc 381 drivers/rtc/rtc-meson.c regulator_disable(rtc->vdd); rtc 59 drivers/rtc/rtc-moxart.c struct rtc_device *rtc; rtc 300 drivers/rtc/rtc-moxart.c moxart_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 303 drivers/rtc/rtc-moxart.c if (IS_ERR(moxart_rtc->rtc)) { rtc 305 drivers/rtc/rtc-moxart.c return PTR_ERR(moxart_rtc->rtc); rtc 80 drivers/rtc/rtc-mpc5121.c struct rtc_device *rtc; rtc 105 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); rtc 106 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_regs __iomem *regs = rtc->regs; rtc 127 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); rtc 128 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_regs __iomem *regs = rtc->regs; rtc 151 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); rtc 152 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_regs __iomem *regs = rtc->regs; rtc 178 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); rtc 179 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_regs __iomem *regs = rtc->regs; rtc 200 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); rtc 201 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_regs __iomem *regs = rtc->regs; rtc 203 drivers/rtc/rtc-mpc5121.c *alarm = rtc->wkalarm; rtc 212 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); rtc 213 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_regs __iomem *regs = rtc->regs; rtc 238 drivers/rtc/rtc-mpc5121.c rtc->wkalarm = *alarm; rtc 244 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_data *rtc = dev_get_drvdata((struct device *)dev); rtc 245 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_regs __iomem *regs = rtc->regs; rtc 252 drivers/rtc/rtc-mpc5121.c rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF); rtc 261 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_data *rtc = dev_get_drvdata((struct device *)dev); rtc 262 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_regs __iomem *regs = rtc->regs; rtc 268 drivers/rtc/rtc-mpc5121.c rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_UF); rtc 278 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); rtc 279 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_regs __iomem *regs = rtc->regs; rtc 288 drivers/rtc/rtc-mpc5121.c rtc->wkalarm.enabled = val; rtc 311 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_data *rtc; rtc 314 drivers/rtc/rtc-mpc5121.c rtc = devm_kzalloc(&op->dev, sizeof(*rtc), GFP_KERNEL); rtc 315 drivers/rtc/rtc-mpc5121.c if (!rtc) rtc 318 drivers/rtc/rtc-mpc5121.c rtc->regs = of_iomap(op->dev.of_node, 0); rtc 319 drivers/rtc/rtc-mpc5121.c if (!rtc->regs) { rtc 326 drivers/rtc/rtc-mpc5121.c platform_set_drvdata(op, rtc); rtc 328 drivers/rtc/rtc-mpc5121.c rtc->irq = irq_of_parse_and_map(op->dev.of_node, 1); rtc 329 drivers/rtc/rtc-mpc5121.c err = request_irq(rtc->irq, mpc5121_rtc_handler, 0, rtc 333 drivers/rtc/rtc-mpc5121.c __func__, rtc->irq); rtc 337 drivers/rtc/rtc-mpc5121.c rtc->irq_periodic = irq_of_parse_and_map(op->dev.of_node, 0); rtc 338 drivers/rtc/rtc-mpc5121.c err = request_irq(rtc->irq_periodic, mpc5121_rtc_handler_upd, rtc 342 drivers/rtc/rtc-mpc5121.c __func__, rtc->irq_periodic); rtc 348 drivers/rtc/rtc-mpc5121.c ka = in_be32(&rtc->regs->keep_alive); rtc 352 drivers/rtc/rtc-mpc5121.c out_be32(&rtc->regs->keep_alive, ka); rtc 355 drivers/rtc/rtc-mpc5121.c rtc->rtc = devm_rtc_device_register(&op->dev, "mpc5121-rtc", rtc 358 drivers/rtc/rtc-mpc5121.c rtc->rtc = devm_rtc_device_register(&op->dev, "mpc5200-rtc", rtc 362 drivers/rtc/rtc-mpc5121.c if (IS_ERR(rtc->rtc)) { rtc 363 drivers/rtc/rtc-mpc5121.c err = PTR_ERR(rtc->rtc); rtc 366 drivers/rtc/rtc-mpc5121.c rtc->rtc->uie_unsupported = 1; rtc 371 drivers/rtc/rtc-mpc5121.c free_irq(rtc->irq_periodic, &op->dev); rtc 373 drivers/rtc/rtc-mpc5121.c irq_dispose_mapping(rtc->irq_periodic); rtc 374 drivers/rtc/rtc-mpc5121.c free_irq(rtc->irq, &op->dev); rtc 376 drivers/rtc/rtc-mpc5121.c irq_dispose_mapping(rtc->irq); rtc 377 drivers/rtc/rtc-mpc5121.c iounmap(rtc->regs); rtc 384 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_data *rtc = platform_get_drvdata(op); rtc 385 drivers/rtc/rtc-mpc5121.c struct mpc5121_rtc_regs __iomem *regs = rtc->regs; rtc 391 drivers/rtc/rtc-mpc5121.c iounmap(rtc->regs); rtc 392 drivers/rtc/rtc-mpc5121.c free_irq(rtc->irq, &op->dev); rtc 393 drivers/rtc/rtc-mpc5121.c free_irq(rtc->irq_periodic, &op->dev); rtc 394 drivers/rtc/rtc-mpc5121.c irq_dispose_mapping(rtc->irq); rtc 395 drivers/rtc/rtc-mpc5121.c irq_dispose_mapping(rtc->irq_periodic); rtc 41 drivers/rtc/rtc-mrst.c struct rtc_device *rtc; rtc 173 drivers/rtc/rtc-mrst.c rtc_update_irq(mrst->rtc, 1, rtc_intr); rtc 337 drivers/rtc/rtc-mrst.c mrst_rtc.rtc = devm_rtc_allocate_device(dev); rtc 338 drivers/rtc/rtc-mrst.c if (IS_ERR(mrst_rtc.rtc)) rtc 339 drivers/rtc/rtc-mrst.c return PTR_ERR(mrst_rtc.rtc); rtc 341 drivers/rtc/rtc-mrst.c mrst_rtc.rtc->ops = &mrst_rtc_ops; rtc 343 drivers/rtc/rtc-mrst.c rename_region(iomem, dev_name(&mrst_rtc.rtc->dev)); rtc 355 drivers/rtc/rtc-mrst.c 0, dev_name(&mrst_rtc.rtc->dev), rtc 356 drivers/rtc/rtc-mrst.c mrst_rtc.rtc); rtc 364 drivers/rtc/rtc-mrst.c retval = rtc_register_device(mrst_rtc.rtc); rtc 390 drivers/rtc/rtc-mrst.c mrst->rtc = NULL; rtc 422 drivers/rtc/rtc-mrst.c dev_dbg(&mrst_rtc.rtc->dev, "suspend%s, ctrl %02x\n", rtc 460 drivers/rtc/rtc-mrst.c rtc_update_irq(mrst->rtc, 1, mask); rtc 466 drivers/rtc/rtc-mrst.c dev_dbg(&mrst_rtc.rtc->dev, "resume, ctrl %02x\n", tmp); rtc 76 drivers/rtc/rtc-msm6242.c struct rtc_device *rtc; rtc 205 drivers/rtc/rtc-msm6242.c struct rtc_device *rtc; rtc 220 drivers/rtc/rtc-msm6242.c rtc = devm_rtc_device_register(&pdev->dev, "rtc-msm6242", rtc 222 drivers/rtc/rtc-msm6242.c if (IS_ERR(rtc)) rtc 223 drivers/rtc/rtc-msm6242.c return PTR_ERR(rtc); rtc 225 drivers/rtc/rtc-msm6242.c priv->rtc = rtc; rtc 75 drivers/rtc/rtc-mt6397.c static int mtk_rtc_write_trigger(struct mt6397_rtc *rtc) rtc 81 drivers/rtc/rtc-mt6397.c ret = regmap_write(rtc->regmap, rtc->addr_base + RTC_WRTGR, 1); rtc 86 drivers/rtc/rtc-mt6397.c ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_BBPU, rtc 104 drivers/rtc/rtc-mt6397.c struct mt6397_rtc *rtc = data; rtc 108 drivers/rtc/rtc-mt6397.c ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_IRQ_STA, &irqsta); rtc 110 drivers/rtc/rtc-mt6397.c rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF); rtc 112 drivers/rtc/rtc-mt6397.c mutex_lock(&rtc->lock); rtc 113 drivers/rtc/rtc-mt6397.c if (regmap_write(rtc->regmap, rtc->addr_base + RTC_IRQ_EN, rtc 115 drivers/rtc/rtc-mt6397.c mtk_rtc_write_trigger(rtc); rtc 116 drivers/rtc/rtc-mt6397.c mutex_unlock(&rtc->lock); rtc 124 drivers/rtc/rtc-mt6397.c static int __mtk_rtc_read_time(struct mt6397_rtc *rtc, rtc 130 drivers/rtc/rtc-mt6397.c mutex_lock(&rtc->lock); rtc 131 drivers/rtc/rtc-mt6397.c ret = regmap_bulk_read(rtc->regmap, rtc->addr_base + RTC_TC_SEC, rtc 143 drivers/rtc/rtc-mt6397.c ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_TC_SEC, sec); rtc 145 drivers/rtc/rtc-mt6397.c mutex_unlock(&rtc->lock); rtc 152 drivers/rtc/rtc-mt6397.c struct mt6397_rtc *rtc = dev_get_drvdata(dev); rtc 156 drivers/rtc/rtc-mt6397.c ret = __mtk_rtc_read_time(rtc, tm, &sec); rtc 183 drivers/rtc/rtc-mt6397.c struct mt6397_rtc *rtc = dev_get_drvdata(dev); rtc 197 drivers/rtc/rtc-mt6397.c mutex_lock(&rtc->lock); rtc 198 drivers/rtc/rtc-mt6397.c ret = regmap_bulk_write(rtc->regmap, rtc->addr_base + RTC_TC_SEC, rtc 204 drivers/rtc/rtc-mt6397.c ret = mtk_rtc_write_trigger(rtc); rtc 207 drivers/rtc/rtc-mt6397.c mutex_unlock(&rtc->lock); rtc 214 drivers/rtc/rtc-mt6397.c struct mt6397_rtc *rtc = dev_get_drvdata(dev); rtc 219 drivers/rtc/rtc-mt6397.c mutex_lock(&rtc->lock); rtc 220 drivers/rtc/rtc-mt6397.c ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_IRQ_EN, &irqen); rtc 223 drivers/rtc/rtc-mt6397.c ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_PDN2, &pdn2); rtc 227 drivers/rtc/rtc-mt6397.c ret = regmap_bulk_read(rtc->regmap, rtc->addr_base + RTC_AL_SEC, rtc 234 drivers/rtc/rtc-mt6397.c mutex_unlock(&rtc->lock); rtc 248 drivers/rtc/rtc-mt6397.c mutex_unlock(&rtc->lock); rtc 255 drivers/rtc/rtc-mt6397.c struct mt6397_rtc *rtc = dev_get_drvdata(dev); rtc 262 drivers/rtc/rtc-mt6397.c mutex_lock(&rtc->lock); rtc 263 drivers/rtc/rtc-mt6397.c ret = regmap_bulk_read(rtc->regmap, rtc->addr_base + RTC_AL_SEC, rtc 282 drivers/rtc/rtc-mt6397.c ret = regmap_bulk_write(rtc->regmap, rtc 283 drivers/rtc/rtc-mt6397.c rtc->addr_base + RTC_AL_SEC, rtc 287 drivers/rtc/rtc-mt6397.c ret = regmap_write(rtc->regmap, rtc->addr_base + RTC_AL_MASK, rtc 291 drivers/rtc/rtc-mt6397.c ret = regmap_update_bits(rtc->regmap, rtc 292 drivers/rtc/rtc-mt6397.c rtc->addr_base + RTC_IRQ_EN, rtc 298 drivers/rtc/rtc-mt6397.c ret = regmap_update_bits(rtc->regmap, rtc 299 drivers/rtc/rtc-mt6397.c rtc->addr_base + RTC_IRQ_EN, rtc 309 drivers/rtc/rtc-mt6397.c ret = mtk_rtc_write_trigger(rtc); rtc 311 drivers/rtc/rtc-mt6397.c mutex_unlock(&rtc->lock); rtc 326 drivers/rtc/rtc-mt6397.c struct mt6397_rtc *rtc; rtc 329 drivers/rtc/rtc-mt6397.c rtc = devm_kzalloc(&pdev->dev, sizeof(struct mt6397_rtc), GFP_KERNEL); rtc 330 drivers/rtc/rtc-mt6397.c if (!rtc) rtc 334 drivers/rtc/rtc-mt6397.c rtc->addr_base = res->start; rtc 336 drivers/rtc/rtc-mt6397.c rtc->irq = platform_get_irq(pdev, 0); rtc 337 drivers/rtc/rtc-mt6397.c if (rtc->irq < 0) rtc 338 drivers/rtc/rtc-mt6397.c return rtc->irq; rtc 340 drivers/rtc/rtc-mt6397.c rtc->regmap = mt6397_chip->regmap; rtc 341 drivers/rtc/rtc-mt6397.c rtc->dev = &pdev->dev; rtc 342 drivers/rtc/rtc-mt6397.c mutex_init(&rtc->lock); rtc 344 drivers/rtc/rtc-mt6397.c platform_set_drvdata(pdev, rtc); rtc 346 drivers/rtc/rtc-mt6397.c rtc->rtc_dev = devm_rtc_allocate_device(rtc->dev); rtc 347 drivers/rtc/rtc-mt6397.c if (IS_ERR(rtc->rtc_dev)) rtc 348 drivers/rtc/rtc-mt6397.c return PTR_ERR(rtc->rtc_dev); rtc 350 drivers/rtc/rtc-mt6397.c ret = request_threaded_irq(rtc->irq, NULL, rtc 353 drivers/rtc/rtc-mt6397.c "mt6397-rtc", rtc); rtc 356 drivers/rtc/rtc-mt6397.c rtc->irq, ret); rtc 362 drivers/rtc/rtc-mt6397.c rtc->rtc_dev->ops = &mtk_rtc_ops; rtc 364 drivers/rtc/rtc-mt6397.c ret = rtc_register_device(rtc->rtc_dev); rtc 371 drivers/rtc/rtc-mt6397.c free_irq(rtc->irq, rtc); rtc 377 drivers/rtc/rtc-mt6397.c struct mt6397_rtc *rtc = platform_get_drvdata(pdev); rtc 379 drivers/rtc/rtc-mt6397.c free_irq(rtc->irq, rtc); rtc 387 drivers/rtc/rtc-mt6397.c struct mt6397_rtc *rtc = dev_get_drvdata(dev); rtc 390 drivers/rtc/rtc-mt6397.c enable_irq_wake(rtc->irq); rtc 397 drivers/rtc/rtc-mt6397.c struct mt6397_rtc *rtc = dev_get_drvdata(dev); rtc 400 drivers/rtc/rtc-mt6397.c disable_irq_wake(rtc->irq); rtc 102 drivers/rtc/rtc-mt7622.c struct rtc_device *rtc; rtc 108 drivers/rtc/rtc-mt7622.c static void mtk_w32(struct mtk_rtc *rtc, u32 reg, u32 val) rtc 110 drivers/rtc/rtc-mt7622.c writel_relaxed(val, rtc->base + reg); rtc 113 drivers/rtc/rtc-mt7622.c static u32 mtk_r32(struct mtk_rtc *rtc, u32 reg) rtc 115 drivers/rtc/rtc-mt7622.c return readl_relaxed(rtc->base + reg); rtc 118 drivers/rtc/rtc-mt7622.c static void mtk_rmw(struct mtk_rtc *rtc, u32 reg, u32 mask, u32 set) rtc 122 drivers/rtc/rtc-mt7622.c val = mtk_r32(rtc, reg); rtc 125 drivers/rtc/rtc-mt7622.c mtk_w32(rtc, reg, val); rtc 128 drivers/rtc/rtc-mt7622.c static void mtk_set(struct mtk_rtc *rtc, u32 reg, u32 val) rtc 130 drivers/rtc/rtc-mt7622.c mtk_rmw(rtc, reg, 0, val); rtc 133 drivers/rtc/rtc-mt7622.c static void mtk_clr(struct mtk_rtc *rtc, u32 reg, u32 val) rtc 135 drivers/rtc/rtc-mt7622.c mtk_rmw(rtc, reg, val, 0); rtc 210 drivers/rtc/rtc-mt7622.c rtc_update_irq(hw->rtc, 1, RTC_IRQF | RTC_AF); rtc 347 drivers/rtc/rtc-mt7622.c hw->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 349 drivers/rtc/rtc-mt7622.c if (IS_ERR(hw->rtc)) { rtc 350 drivers/rtc/rtc-mt7622.c ret = PTR_ERR(hw->rtc); rtc 40 drivers/rtc/rtc-mv.c struct rtc_device *rtc; rtc 196 drivers/rtc/rtc-mv.c rtc_update_irq(pdata->rtc, 1, RTC_IRQF | RTC_AF); rtc 257 drivers/rtc/rtc-mv.c pdata->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 258 drivers/rtc/rtc-mv.c if (IS_ERR(pdata->rtc)) { rtc 259 drivers/rtc/rtc-mv.c ret = PTR_ERR(pdata->rtc); rtc 275 drivers/rtc/rtc-mv.c pdata->rtc->ops = &mv_rtc_alarm_ops; rtc 277 drivers/rtc/rtc-mv.c pdata->rtc->ops = &mv_rtc_ops; rtc 280 drivers/rtc/rtc-mv.c pdata->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 281 drivers/rtc/rtc-mv.c pdata->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 283 drivers/rtc/rtc-mv.c ret = rtc_register_device(pdata->rtc); rtc 64 drivers/rtc/rtc-mxc.c struct rtc_device *rtc; rtc 189 drivers/rtc/rtc-mxc.c spin_lock_irqsave(&pdata->rtc->irq_lock, flags); rtc 198 drivers/rtc/rtc-mxc.c spin_unlock_irqrestore(&pdata->rtc->irq_lock, flags); rtc 211 drivers/rtc/rtc-mxc.c spin_lock_irqsave(&pdata->rtc->irq_lock, flags); rtc 226 drivers/rtc/rtc-mxc.c rtc_update_irq(pdata->rtc, 1, events); rtc 227 drivers/rtc/rtc-mxc.c spin_unlock_irqrestore(&pdata->rtc->irq_lock, flags); rtc 312 drivers/rtc/rtc-mxc.c struct rtc_device *rtc; rtc 333 drivers/rtc/rtc-mxc.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 334 drivers/rtc/rtc-mxc.c if (IS_ERR(rtc)) rtc 335 drivers/rtc/rtc-mxc.c return PTR_ERR(rtc); rtc 337 drivers/rtc/rtc-mxc.c pdata->rtc = rtc; rtc 338 drivers/rtc/rtc-mxc.c rtc->ops = &mxc_rtc_ops; rtc 343 drivers/rtc/rtc-mxc.c rtc->range_max = (1 << 9) * 86400 - 1; rtc 350 drivers/rtc/rtc-mxc.c rtc->start_secs = mktime64(tm.tm_year, 1, 1, 0, 0, 0); rtc 351 drivers/rtc/rtc-mxc.c rtc->set_start_time = true; rtc 354 drivers/rtc/rtc-mxc.c rtc->range_max = (1 << 16) * 86400ULL - 1; rtc 419 drivers/rtc/rtc-mxc.c ret = rtc_register_device(rtc); rtc 40 drivers/rtc/rtc-mxc_v2.c struct rtc_device *rtc; rtc 93 drivers/rtc/rtc-mxc_v2.c rtc_update_irq(pdata->rtc, 1, RTC_AF | RTC_IRQF); rtc 339 drivers/rtc/rtc-mxc_v2.c pdata->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 340 drivers/rtc/rtc-mxc_v2.c if (IS_ERR(pdata->rtc)) rtc 341 drivers/rtc/rtc-mxc_v2.c return PTR_ERR(pdata->rtc); rtc 343 drivers/rtc/rtc-mxc_v2.c pdata->rtc->ops = &mxc_rtc_ops; rtc 344 drivers/rtc/rtc-mxc_v2.c pdata->rtc->range_max = U32_MAX; rtc 357 drivers/rtc/rtc-mxc_v2.c ret = rtc_register_device(pdata->rtc); rtc 137 drivers/rtc/rtc-omap.c void (*lock)(struct omap_rtc *rtc); rtc 138 drivers/rtc/rtc-omap.c void (*unlock)(struct omap_rtc *rtc); rtc 142 drivers/rtc/rtc-omap.c struct rtc_device *rtc; rtc 155 drivers/rtc/rtc-omap.c static inline u8 rtc_read(struct omap_rtc *rtc, unsigned int reg) rtc 157 drivers/rtc/rtc-omap.c return readb(rtc->base + reg); rtc 160 drivers/rtc/rtc-omap.c static inline u32 rtc_readl(struct omap_rtc *rtc, unsigned int reg) rtc 162 drivers/rtc/rtc-omap.c return readl(rtc->base + reg); rtc 165 drivers/rtc/rtc-omap.c static inline void rtc_write(struct omap_rtc *rtc, unsigned int reg, u8 val) rtc 167 drivers/rtc/rtc-omap.c writeb(val, rtc->base + reg); rtc 170 drivers/rtc/rtc-omap.c static inline void rtc_writel(struct omap_rtc *rtc, unsigned int reg, u32 val) rtc 172 drivers/rtc/rtc-omap.c writel(val, rtc->base + reg); rtc 175 drivers/rtc/rtc-omap.c static void am3352_rtc_unlock(struct omap_rtc *rtc) rtc 177 drivers/rtc/rtc-omap.c rtc_writel(rtc, OMAP_RTC_KICK0_REG, KICK0_VALUE); rtc 178 drivers/rtc/rtc-omap.c rtc_writel(rtc, OMAP_RTC_KICK1_REG, KICK1_VALUE); rtc 181 drivers/rtc/rtc-omap.c static void am3352_rtc_lock(struct omap_rtc *rtc) rtc 183 drivers/rtc/rtc-omap.c rtc_writel(rtc, OMAP_RTC_KICK0_REG, 0); rtc 184 drivers/rtc/rtc-omap.c rtc_writel(rtc, OMAP_RTC_KICK1_REG, 0); rtc 187 drivers/rtc/rtc-omap.c static void default_rtc_unlock(struct omap_rtc *rtc) rtc 191 drivers/rtc/rtc-omap.c static void default_rtc_lock(struct omap_rtc *rtc) rtc 200 drivers/rtc/rtc-omap.c static void rtc_wait_not_busy(struct omap_rtc *rtc) rtc 207 drivers/rtc/rtc-omap.c status = rtc_read(rtc, OMAP_RTC_STATUS_REG); rtc 217 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = dev_id; rtc 221 drivers/rtc/rtc-omap.c irq_data = rtc_read(rtc, OMAP_RTC_STATUS_REG); rtc 225 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 226 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_STATUS_REG, OMAP_RTC_STATUS_ALARM); rtc 227 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 235 drivers/rtc/rtc-omap.c rtc_update_irq(rtc->rtc, 1, events); rtc 242 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = dev_get_drvdata(dev); rtc 246 drivers/rtc/rtc-omap.c rtc_wait_not_busy(rtc); rtc 247 drivers/rtc/rtc-omap.c reg = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG); rtc 248 drivers/rtc/rtc-omap.c if (rtc->type->has_irqwakeen) rtc 249 drivers/rtc/rtc-omap.c irqwake_reg = rtc_read(rtc, OMAP_RTC_IRQWAKEEN); rtc 258 drivers/rtc/rtc-omap.c rtc_wait_not_busy(rtc); rtc 259 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 260 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, reg); rtc 261 drivers/rtc/rtc-omap.c if (rtc->type->has_irqwakeen) rtc 262 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_IRQWAKEEN, irqwake_reg); rtc 263 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 292 drivers/rtc/rtc-omap.c static void omap_rtc_read_time_raw(struct omap_rtc *rtc, struct rtc_time *tm) rtc 294 drivers/rtc/rtc-omap.c tm->tm_sec = rtc_read(rtc, OMAP_RTC_SECONDS_REG); rtc 295 drivers/rtc/rtc-omap.c tm->tm_min = rtc_read(rtc, OMAP_RTC_MINUTES_REG); rtc 296 drivers/rtc/rtc-omap.c tm->tm_hour = rtc_read(rtc, OMAP_RTC_HOURS_REG); rtc 297 drivers/rtc/rtc-omap.c tm->tm_mday = rtc_read(rtc, OMAP_RTC_DAYS_REG); rtc 298 drivers/rtc/rtc-omap.c tm->tm_mon = rtc_read(rtc, OMAP_RTC_MONTHS_REG); rtc 299 drivers/rtc/rtc-omap.c tm->tm_year = rtc_read(rtc, OMAP_RTC_YEARS_REG); rtc 304 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = dev_get_drvdata(dev); rtc 308 drivers/rtc/rtc-omap.c rtc_wait_not_busy(rtc); rtc 309 drivers/rtc/rtc-omap.c omap_rtc_read_time_raw(rtc, tm); rtc 319 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = dev_get_drvdata(dev); rtc 324 drivers/rtc/rtc-omap.c rtc_wait_not_busy(rtc); rtc 326 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 327 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_YEARS_REG, tm->tm_year); rtc 328 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_MONTHS_REG, tm->tm_mon); rtc 329 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_DAYS_REG, tm->tm_mday); rtc 330 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_HOURS_REG, tm->tm_hour); rtc 331 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_MINUTES_REG, tm->tm_min); rtc 332 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_SECONDS_REG, tm->tm_sec); rtc 333 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 342 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = dev_get_drvdata(dev); rtc 346 drivers/rtc/rtc-omap.c rtc_wait_not_busy(rtc); rtc 348 drivers/rtc/rtc-omap.c alm->time.tm_sec = rtc_read(rtc, OMAP_RTC_ALARM_SECONDS_REG); rtc 349 drivers/rtc/rtc-omap.c alm->time.tm_min = rtc_read(rtc, OMAP_RTC_ALARM_MINUTES_REG); rtc 350 drivers/rtc/rtc-omap.c alm->time.tm_hour = rtc_read(rtc, OMAP_RTC_ALARM_HOURS_REG); rtc 351 drivers/rtc/rtc-omap.c alm->time.tm_mday = rtc_read(rtc, OMAP_RTC_ALARM_DAYS_REG); rtc 352 drivers/rtc/rtc-omap.c alm->time.tm_mon = rtc_read(rtc, OMAP_RTC_ALARM_MONTHS_REG); rtc 353 drivers/rtc/rtc-omap.c alm->time.tm_year = rtc_read(rtc, OMAP_RTC_ALARM_YEARS_REG); rtc 359 drivers/rtc/rtc-omap.c interrupts = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG); rtc 367 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = dev_get_drvdata(dev); rtc 373 drivers/rtc/rtc-omap.c rtc_wait_not_busy(rtc); rtc 375 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 376 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM_YEARS_REG, alm->time.tm_year); rtc 377 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM_MONTHS_REG, alm->time.tm_mon); rtc 378 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM_DAYS_REG, alm->time.tm_mday); rtc 379 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM_HOURS_REG, alm->time.tm_hour); rtc 380 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM_MINUTES_REG, alm->time.tm_min); rtc 381 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM_SECONDS_REG, alm->time.tm_sec); rtc 383 drivers/rtc/rtc-omap.c reg = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG); rtc 384 drivers/rtc/rtc-omap.c if (rtc->type->has_irqwakeen) rtc 385 drivers/rtc/rtc-omap.c irqwake_reg = rtc_read(rtc, OMAP_RTC_IRQWAKEEN); rtc 394 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, reg); rtc 395 drivers/rtc/rtc-omap.c if (rtc->type->has_irqwakeen) rtc 396 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_IRQWAKEEN, irqwake_reg); rtc 397 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 413 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = omap_rtc_power_off_rtc; rtc 419 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 421 drivers/rtc/rtc-omap.c val = rtc_readl(rtc, OMAP_RTC_PMIC_REG); rtc 422 drivers/rtc/rtc-omap.c rtc_writel(rtc, OMAP_RTC_PMIC_REG, val | OMAP_RTC_PMIC_POWER_EN_EN); rtc 426 drivers/rtc/rtc-omap.c rtc_writel(rtc, OMAP_RTC_STATUS_REG, OMAP_RTC_STATUS_ALARM2); rtc 429 drivers/rtc/rtc-omap.c omap_rtc_read_time_raw(rtc, &tm); rtc 437 drivers/rtc/rtc-omap.c rtc_wait_not_busy(rtc); rtc 439 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_SECONDS_REG, tm.tm_sec); rtc 440 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_MINUTES_REG, tm.tm_min); rtc 441 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_HOURS_REG, tm.tm_hour); rtc 442 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_DAYS_REG, tm.tm_mday); rtc 443 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_MONTHS_REG, tm.tm_mon); rtc 444 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_YEARS_REG, tm.tm_year); rtc 451 drivers/rtc/rtc-omap.c val = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG); rtc 452 drivers/rtc/rtc-omap.c rtc_writel(rtc, OMAP_RTC_INTERRUPTS_REG, rtc 456 drivers/rtc/rtc-omap.c if (rtc_read(rtc, OMAP_RTC_SECONDS_REG) != seconds) { rtc 457 drivers/rtc/rtc-omap.c val = rtc_read(rtc, OMAP_RTC_STATUS_REG); rtc 462 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 484 drivers/rtc/rtc-omap.c struct rtc_device *rtc = omap_rtc_power_off_rtc->rtc; rtc 487 drivers/rtc/rtc-omap.c omap_rtc_power_off_program(rtc->dev.parent); rtc 601 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = pinctrl_dev_get_drvdata(pctldev); rtc 606 drivers/rtc/rtc-omap.c val = rtc_readl(rtc, OMAP_RTC_PMIC_REG); rtc 630 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = pinctrl_dev_get_drvdata(pctldev); rtc 636 drivers/rtc/rtc-omap.c val = rtc_readl(rtc, OMAP_RTC_PMIC_REG); rtc 656 drivers/rtc/rtc-omap.c dev_err(&rtc->rtc->dev, "Property %u not supported\n", rtc 662 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 663 drivers/rtc/rtc-omap.c rtc_writel(rtc, OMAP_RTC_PMIC_REG, val); rtc 664 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 691 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = priv; rtc 696 drivers/rtc/rtc-omap.c val[i] = rtc_readl(rtc, rtc 705 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = priv; rtc 709 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 711 drivers/rtc/rtc-omap.c rtc_writel(rtc, rtc 713 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 729 drivers/rtc/rtc-omap.c struct omap_rtc *rtc; rtc 736 drivers/rtc/rtc-omap.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 737 drivers/rtc/rtc-omap.c if (!rtc) rtc 742 drivers/rtc/rtc-omap.c rtc->type = of_id->data; rtc 743 drivers/rtc/rtc-omap.c rtc->is_pmic_controller = rtc->type->has_pmic_mode && rtc 747 drivers/rtc/rtc-omap.c rtc->type = (void *)id_entry->driver_data; rtc 750 drivers/rtc/rtc-omap.c rtc->irq_timer = platform_get_irq(pdev, 0); rtc 751 drivers/rtc/rtc-omap.c if (rtc->irq_timer <= 0) rtc 754 drivers/rtc/rtc-omap.c rtc->irq_alarm = platform_get_irq(pdev, 1); rtc 755 drivers/rtc/rtc-omap.c if (rtc->irq_alarm <= 0) rtc 758 drivers/rtc/rtc-omap.c rtc->clk = devm_clk_get(&pdev->dev, "ext-clk"); rtc 759 drivers/rtc/rtc-omap.c if (!IS_ERR(rtc->clk)) rtc 760 drivers/rtc/rtc-omap.c rtc->has_ext_clk = true; rtc 762 drivers/rtc/rtc-omap.c rtc->clk = devm_clk_get(&pdev->dev, "int-clk"); rtc 764 drivers/rtc/rtc-omap.c if (!IS_ERR(rtc->clk)) rtc 765 drivers/rtc/rtc-omap.c clk_prepare_enable(rtc->clk); rtc 768 drivers/rtc/rtc-omap.c rtc->base = devm_ioremap_resource(&pdev->dev, res); rtc 769 drivers/rtc/rtc-omap.c if (IS_ERR(rtc->base)) { rtc 770 drivers/rtc/rtc-omap.c clk_disable_unprepare(rtc->clk); rtc 771 drivers/rtc/rtc-omap.c return PTR_ERR(rtc->base); rtc 774 drivers/rtc/rtc-omap.c platform_set_drvdata(pdev, rtc); rtc 780 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 787 drivers/rtc/rtc-omap.c rtc_writel(rtc, OMAP_RTC_INTERRUPTS_REG, 0); rtc 790 drivers/rtc/rtc-omap.c if (rtc->type->has_32kclk_en) { rtc 791 drivers/rtc/rtc-omap.c reg = rtc_read(rtc, OMAP_RTC_OSC_REG); rtc 792 drivers/rtc/rtc-omap.c rtc_writel(rtc, OMAP_RTC_OSC_REG, rtc 797 drivers/rtc/rtc-omap.c reg = rtc_read(rtc, OMAP_RTC_STATUS_REG); rtc 801 drivers/rtc/rtc-omap.c if (rtc->type->has_pmic_mode) rtc 804 drivers/rtc/rtc-omap.c if (rtc->type->has_power_up_reset) { rtc 811 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_STATUS_REG, reg & mask); rtc 814 drivers/rtc/rtc-omap.c reg = rtc_read(rtc, OMAP_RTC_CTRL_REG); rtc 841 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_CTRL_REG, new_ctrl); rtc 847 drivers/rtc/rtc-omap.c if (rtc->has_ext_clk) { rtc 848 drivers/rtc/rtc-omap.c reg = rtc_read(rtc, OMAP_RTC_OSC_REG); rtc 851 drivers/rtc/rtc-omap.c rtc_writel(rtc, OMAP_RTC_OSC_REG, reg); rtc 854 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 858 drivers/rtc/rtc-omap.c rtc->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 859 drivers/rtc/rtc-omap.c if (IS_ERR(rtc->rtc)) { rtc 860 drivers/rtc/rtc-omap.c ret = PTR_ERR(rtc->rtc); rtc 864 drivers/rtc/rtc-omap.c rtc->rtc->ops = &omap_rtc_ops; rtc 865 drivers/rtc/rtc-omap.c rtc->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 866 drivers/rtc/rtc-omap.c rtc->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 867 drivers/rtc/rtc-omap.c omap_rtc_nvmem_config.priv = rtc; rtc 870 drivers/rtc/rtc-omap.c ret = devm_request_irq(&pdev->dev, rtc->irq_timer, rtc_irq, 0, rtc 871 drivers/rtc/rtc-omap.c dev_name(&rtc->rtc->dev), rtc); rtc 875 drivers/rtc/rtc-omap.c if (rtc->irq_timer != rtc->irq_alarm) { rtc 876 drivers/rtc/rtc-omap.c ret = devm_request_irq(&pdev->dev, rtc->irq_alarm, rtc_irq, 0, rtc 877 drivers/rtc/rtc-omap.c dev_name(&rtc->rtc->dev), rtc); rtc 885 drivers/rtc/rtc-omap.c rtc->pctldev = pinctrl_register(&rtc_pinctrl_desc, &pdev->dev, rtc); rtc 886 drivers/rtc/rtc-omap.c if (IS_ERR(rtc->pctldev)) { rtc 888 drivers/rtc/rtc-omap.c ret = PTR_ERR(rtc->pctldev); rtc 892 drivers/rtc/rtc-omap.c ret = rtc_register_device(rtc->rtc); rtc 896 drivers/rtc/rtc-omap.c rtc_nvmem_register(rtc->rtc, &omap_rtc_nvmem_config); rtc 898 drivers/rtc/rtc-omap.c if (rtc->is_pmic_controller) { rtc 900 drivers/rtc/rtc-omap.c omap_rtc_power_off_rtc = rtc; rtc 908 drivers/rtc/rtc-omap.c pinctrl_unregister(rtc->pctldev); rtc 910 drivers/rtc/rtc-omap.c clk_disable_unprepare(rtc->clk); rtc 912 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 921 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = platform_get_drvdata(pdev); rtc 925 drivers/rtc/rtc-omap.c omap_rtc_power_off_rtc == rtc) { rtc 932 drivers/rtc/rtc-omap.c if (!IS_ERR(rtc->clk)) rtc 933 drivers/rtc/rtc-omap.c clk_disable_unprepare(rtc->clk); rtc 935 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 937 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, 0); rtc 939 drivers/rtc/rtc-omap.c if (rtc->has_ext_clk) { rtc 940 drivers/rtc/rtc-omap.c reg = rtc_read(rtc, OMAP_RTC_OSC_REG); rtc 942 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_OSC_REG, reg); rtc 945 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 952 drivers/rtc/rtc-omap.c pinctrl_unregister(rtc->pctldev); rtc 959 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = dev_get_drvdata(dev); rtc 961 drivers/rtc/rtc-omap.c rtc->interrupts_reg = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG); rtc 963 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 970 drivers/rtc/rtc-omap.c enable_irq_wake(rtc->irq_alarm); rtc 972 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, 0); rtc 973 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 975 drivers/rtc/rtc-omap.c rtc->is_suspending = true; rtc 982 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = dev_get_drvdata(dev); rtc 984 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 986 drivers/rtc/rtc-omap.c disable_irq_wake(rtc->irq_alarm); rtc 988 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, rtc->interrupts_reg); rtc 989 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 991 drivers/rtc/rtc-omap.c rtc->is_suspending = false; rtc 998 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = dev_get_drvdata(dev); rtc 1000 drivers/rtc/rtc-omap.c if (rtc->is_suspending && !rtc->has_ext_clk) rtc 1013 drivers/rtc/rtc-omap.c struct omap_rtc *rtc = platform_get_drvdata(pdev); rtc 1020 drivers/rtc/rtc-omap.c rtc->type->unlock(rtc); rtc 1021 drivers/rtc/rtc-omap.c mask = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG); rtc 1023 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, mask); rtc 1024 drivers/rtc/rtc-omap.c rtc->type->lock(rtc); rtc 234 drivers/rtc/rtc-opal.c struct rtc_device *rtc; rtc 245 drivers/rtc/rtc-opal.c rtc = devm_rtc_device_register(&pdev->dev, DRVNAME, &opal_rtc_ops, rtc 247 drivers/rtc/rtc-opal.c if (IS_ERR(rtc)) rtc 248 drivers/rtc/rtc-opal.c return PTR_ERR(rtc); rtc 250 drivers/rtc/rtc-opal.c rtc->uie_unsupported = 1; rtc 40 drivers/rtc/rtc-palmas.c struct rtc_device *rtc; rtc 224 drivers/rtc/rtc-palmas.c rtc_update_irq(palmas_rtc->rtc, 1, RTC_IRQF | RTC_AF); rtc 304 drivers/rtc/rtc-palmas.c palmas_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 306 drivers/rtc/rtc-palmas.c if (IS_ERR(palmas_rtc->rtc)) { rtc 307 drivers/rtc/rtc-palmas.c ret = PTR_ERR(palmas_rtc->rtc); rtc 21 drivers/rtc/rtc-pcap.c struct rtc_device *rtc; rtc 36 drivers/rtc/rtc-pcap.c rtc_update_irq(pcap_rtc->rtc, 1, rtc_events); rtc 146 drivers/rtc/rtc-pcap.c pcap_rtc->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 147 drivers/rtc/rtc-pcap.c if (IS_ERR(pcap_rtc->rtc)) rtc 148 drivers/rtc/rtc-pcap.c return PTR_ERR(pcap_rtc->rtc); rtc 150 drivers/rtc/rtc-pcap.c pcap_rtc->rtc->ops = &pcap_rtc_ops; rtc 151 drivers/rtc/rtc-pcap.c pcap_rtc->rtc->range_max = (1 << 14) * 86400ULL - 1; rtc 166 drivers/rtc/rtc-pcap.c return rtc_register_device(pcap_rtc->rtc); rtc 108 drivers/rtc/rtc-pcf2123.c struct rtc_device *rtc; rtc 310 drivers/rtc/rtc-pcf2123.c struct mutex *lock = &pcf2123->rtc->ops_lock; rtc 324 drivers/rtc/rtc-pcf2123.c rtc_update_irq(pcf2123->rtc, 1, RTC_IRQF | RTC_AF); rtc 378 drivers/rtc/rtc-pcf2123.c struct rtc_device *rtc; rtc 409 drivers/rtc/rtc-pcf2123.c rtc = devm_rtc_allocate_device(&spi->dev); rtc 410 drivers/rtc/rtc-pcf2123.c if (IS_ERR(rtc)) rtc 411 drivers/rtc/rtc-pcf2123.c return PTR_ERR(rtc); rtc 413 drivers/rtc/rtc-pcf2123.c pcf2123->rtc = rtc; rtc 431 drivers/rtc/rtc-pcf2123.c rtc->uie_unsupported = 1; rtc 432 drivers/rtc/rtc-pcf2123.c rtc->ops = &pcf2123_rtc_ops; rtc 433 drivers/rtc/rtc-pcf2123.c rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 434 drivers/rtc/rtc-pcf2123.c rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 435 drivers/rtc/rtc-pcf2123.c rtc->set_start_time = true; rtc 437 drivers/rtc/rtc-pcf2123.c ret = rtc_register_device(rtc); rtc 83 drivers/rtc/rtc-pcf2127.c struct rtc_device *rtc; rtc 432 drivers/rtc/rtc-pcf2127.c pcf2127->rtc = devm_rtc_allocate_device(dev); rtc 433 drivers/rtc/rtc-pcf2127.c if (IS_ERR(pcf2127->rtc)) rtc 434 drivers/rtc/rtc-pcf2127.c return PTR_ERR(pcf2127->rtc); rtc 436 drivers/rtc/rtc-pcf2127.c pcf2127->rtc->ops = &pcf2127_rtc_ops; rtc 456 drivers/rtc/rtc-pcf2127.c ret = rtc_nvmem_register(pcf2127->rtc, &nvmem_cfg); rtc 529 drivers/rtc/rtc-pcf2127.c ret = rtc_add_group(pcf2127->rtc, &pcf2127_attr_group); rtc 536 drivers/rtc/rtc-pcf2127.c return rtc_register_device(pcf2127->rtc); rtc 62 drivers/rtc/rtc-pcf50633.c static void pcf2rtc_time(struct rtc_time *rtc, struct pcf50633_time *pcf) rtc 64 drivers/rtc/rtc-pcf50633.c rtc->tm_sec = bcd2bin(pcf->time[PCF50633_TI_SEC]); rtc 65 drivers/rtc/rtc-pcf50633.c rtc->tm_min = bcd2bin(pcf->time[PCF50633_TI_MIN]); rtc 66 drivers/rtc/rtc-pcf50633.c rtc->tm_hour = bcd2bin(pcf->time[PCF50633_TI_HOUR]); rtc 67 drivers/rtc/rtc-pcf50633.c rtc->tm_wday = bcd2bin(pcf->time[PCF50633_TI_WKDAY]); rtc 68 drivers/rtc/rtc-pcf50633.c rtc->tm_mday = bcd2bin(pcf->time[PCF50633_TI_DAY]); rtc 69 drivers/rtc/rtc-pcf50633.c rtc->tm_mon = bcd2bin(pcf->time[PCF50633_TI_MONTH]) - 1; rtc 70 drivers/rtc/rtc-pcf50633.c rtc->tm_year = bcd2bin(pcf->time[PCF50633_TI_YEAR]) + 100; rtc 73 drivers/rtc/rtc-pcf50633.c static void rtc2pcf_time(struct pcf50633_time *pcf, struct rtc_time *rtc) rtc 75 drivers/rtc/rtc-pcf50633.c pcf->time[PCF50633_TI_SEC] = bin2bcd(rtc->tm_sec); rtc 76 drivers/rtc/rtc-pcf50633.c pcf->time[PCF50633_TI_MIN] = bin2bcd(rtc->tm_min); rtc 77 drivers/rtc/rtc-pcf50633.c pcf->time[PCF50633_TI_HOUR] = bin2bcd(rtc->tm_hour); rtc 78 drivers/rtc/rtc-pcf50633.c pcf->time[PCF50633_TI_WKDAY] = bin2bcd(rtc->tm_wday); rtc 79 drivers/rtc/rtc-pcf50633.c pcf->time[PCF50633_TI_DAY] = bin2bcd(rtc->tm_mday); rtc 80 drivers/rtc/rtc-pcf50633.c pcf->time[PCF50633_TI_MONTH] = bin2bcd(rtc->tm_mon + 1); rtc 81 drivers/rtc/rtc-pcf50633.c pcf->time[PCF50633_TI_YEAR] = bin2bcd(rtc->tm_year % 100); rtc 87 drivers/rtc/rtc-pcf50633.c struct pcf50633_rtc *rtc = dev_get_drvdata(dev); rtc 91 drivers/rtc/rtc-pcf50633.c err = pcf50633_irq_unmask(rtc->pcf, PCF50633_IRQ_ALARM); rtc 93 drivers/rtc/rtc-pcf50633.c err = pcf50633_irq_mask(rtc->pcf, PCF50633_IRQ_ALARM); rtc 98 drivers/rtc/rtc-pcf50633.c rtc->alarm_enabled = enabled; rtc 105 drivers/rtc/rtc-pcf50633.c struct pcf50633_rtc *rtc; rtc 109 drivers/rtc/rtc-pcf50633.c rtc = dev_get_drvdata(dev); rtc 111 drivers/rtc/rtc-pcf50633.c ret = pcf50633_read_block(rtc->pcf, PCF50633_REG_RTCSC, rtc 136 drivers/rtc/rtc-pcf50633.c struct pcf50633_rtc *rtc; rtc 140 drivers/rtc/rtc-pcf50633.c rtc = dev_get_drvdata(dev); rtc 155 drivers/rtc/rtc-pcf50633.c alarm_masked = pcf50633_irq_mask_get(rtc->pcf, PCF50633_IRQ_ALARM); rtc 158 drivers/rtc/rtc-pcf50633.c pcf50633_irq_mask(rtc->pcf, PCF50633_IRQ_ALARM); rtc 161 drivers/rtc/rtc-pcf50633.c ret = pcf50633_write_block(rtc->pcf, PCF50633_REG_RTCSC, rtc 166 drivers/rtc/rtc-pcf50633.c pcf50633_irq_unmask(rtc->pcf, PCF50633_IRQ_ALARM); rtc 173 drivers/rtc/rtc-pcf50633.c struct pcf50633_rtc *rtc; rtc 177 drivers/rtc/rtc-pcf50633.c rtc = dev_get_drvdata(dev); rtc 179 drivers/rtc/rtc-pcf50633.c alrm->enabled = rtc->alarm_enabled; rtc 180 drivers/rtc/rtc-pcf50633.c alrm->pending = rtc->alarm_pending; rtc 182 drivers/rtc/rtc-pcf50633.c ret = pcf50633_read_block(rtc->pcf, PCF50633_REG_RTCSCA, rtc 196 drivers/rtc/rtc-pcf50633.c struct pcf50633_rtc *rtc; rtc 200 drivers/rtc/rtc-pcf50633.c rtc = dev_get_drvdata(dev); rtc 207 drivers/rtc/rtc-pcf50633.c alarm_masked = pcf50633_irq_mask_get(rtc->pcf, PCF50633_IRQ_ALARM); rtc 211 drivers/rtc/rtc-pcf50633.c pcf50633_irq_mask(rtc->pcf, PCF50633_IRQ_ALARM); rtc 214 drivers/rtc/rtc-pcf50633.c ret = pcf50633_write_block(rtc->pcf, PCF50633_REG_RTCSCA, rtc 217 drivers/rtc/rtc-pcf50633.c rtc->alarm_pending = 0; rtc 220 drivers/rtc/rtc-pcf50633.c pcf50633_irq_unmask(rtc->pcf, PCF50633_IRQ_ALARM); rtc 221 drivers/rtc/rtc-pcf50633.c rtc->alarm_enabled = alrm->enabled; rtc 236 drivers/rtc/rtc-pcf50633.c struct pcf50633_rtc *rtc = data; rtc 238 drivers/rtc/rtc-pcf50633.c rtc_update_irq(rtc->rtc_dev, 1, RTC_AF | RTC_IRQF); rtc 239 drivers/rtc/rtc-pcf50633.c rtc->alarm_pending = 1; rtc 244 drivers/rtc/rtc-pcf50633.c struct pcf50633_rtc *rtc; rtc 246 drivers/rtc/rtc-pcf50633.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 247 drivers/rtc/rtc-pcf50633.c if (!rtc) rtc 250 drivers/rtc/rtc-pcf50633.c rtc->pcf = dev_to_pcf50633(pdev->dev.parent); rtc 251 drivers/rtc/rtc-pcf50633.c platform_set_drvdata(pdev, rtc); rtc 252 drivers/rtc/rtc-pcf50633.c rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, "pcf50633-rtc", rtc 255 drivers/rtc/rtc-pcf50633.c if (IS_ERR(rtc->rtc_dev)) rtc 256 drivers/rtc/rtc-pcf50633.c return PTR_ERR(rtc->rtc_dev); rtc 258 drivers/rtc/rtc-pcf50633.c pcf50633_register_irq(rtc->pcf, PCF50633_IRQ_ALARM, rtc 259 drivers/rtc/rtc-pcf50633.c pcf50633_rtc_irq, rtc); rtc 265 drivers/rtc/rtc-pcf50633.c struct pcf50633_rtc *rtc; rtc 267 drivers/rtc/rtc-pcf50633.c rtc = platform_get_drvdata(pdev); rtc 268 drivers/rtc/rtc-pcf50633.c pcf50633_free_irq(rtc->pcf, PCF50633_IRQ_ALARM); rtc 62 drivers/rtc/rtc-pcf85063.c struct rtc_device *rtc; rtc 85 drivers/rtc/rtc-pcf85063.c dev_warn(&pcf85063->rtc->dev, "Power loss detected, invalid time\n"); rtc 224 drivers/rtc/rtc-pcf85063.c rtc_update_irq(pcf85063->rtc, 1, RTC_IRQF | RTC_AF); rtc 293 drivers/rtc/rtc-pcf85063.c dev_warn(&pcf85063->rtc->dev, "Voltage low, data loss detected.\n"); rtc 358 drivers/rtc/rtc-pcf85063.c dev_warn(&pcf85063->rtc->dev, "Unknown quartz-load-femtofarads value: %d. Assuming 7000", rtc 436 drivers/rtc/rtc-pcf85063.c pcf85063->rtc = devm_rtc_allocate_device(&client->dev); rtc 437 drivers/rtc/rtc-pcf85063.c if (IS_ERR(pcf85063->rtc)) rtc 438 drivers/rtc/rtc-pcf85063.c return PTR_ERR(pcf85063->rtc); rtc 446 drivers/rtc/rtc-pcf85063.c pcf85063->rtc->ops = &pcf85063_rtc_ops; rtc 447 drivers/rtc/rtc-pcf85063.c pcf85063->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 448 drivers/rtc/rtc-pcf85063.c pcf85063->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 449 drivers/rtc/rtc-pcf85063.c pcf85063->rtc->uie_unsupported = 1; rtc 457 drivers/rtc/rtc-pcf85063.c dev_warn(&pcf85063->rtc->dev, rtc 460 drivers/rtc/rtc-pcf85063.c pcf85063->rtc->ops = &pcf85063_rtc_ops_alarm; rtc 464 drivers/rtc/rtc-pcf85063.c dev_err(&pcf85063->rtc->dev, rtc 470 drivers/rtc/rtc-pcf85063.c rtc_nvmem_register(pcf85063->rtc, &nvmem_cfg); rtc 472 drivers/rtc/rtc-pcf85063.c return rtc_register_device(pcf85063->rtc); rtc 39 drivers/rtc/rtc-pcf8523.c struct rtc_device *rtc; rtc 367 drivers/rtc/rtc-pcf8523.c pcf->rtc = devm_rtc_device_register(&client->dev, DRIVER_NAME, rtc 369 drivers/rtc/rtc-pcf8523.c if (IS_ERR(pcf->rtc)) rtc 370 drivers/rtc/rtc-pcf8523.c return PTR_ERR(pcf->rtc); rtc 111 drivers/rtc/rtc-pcf85363.c struct rtc_device *rtc; rtc 277 drivers/rtc/rtc-pcf85363.c rtc_update_irq(pcf85363->rtc, 1, RTC_IRQF | RTC_AF); rtc 399 drivers/rtc/rtc-pcf85363.c pcf85363->rtc = devm_rtc_allocate_device(&client->dev); rtc 400 drivers/rtc/rtc-pcf85363.c if (IS_ERR(pcf85363->rtc)) rtc 401 drivers/rtc/rtc-pcf85363.c return PTR_ERR(pcf85363->rtc); rtc 403 drivers/rtc/rtc-pcf85363.c pcf85363->rtc->ops = &rtc_ops; rtc 404 drivers/rtc/rtc-pcf85363.c pcf85363->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 405 drivers/rtc/rtc-pcf85363.c pcf85363->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 418 drivers/rtc/rtc-pcf85363.c pcf85363->rtc->ops = &rtc_ops_alarm; rtc 421 drivers/rtc/rtc-pcf85363.c ret = rtc_register_device(pcf85363->rtc); rtc 425 drivers/rtc/rtc-pcf85363.c rtc_nvmem_register(pcf85363->rtc, &nvmem_cfg[i]); rtc 63 drivers/rtc/rtc-pcf8563.c struct rtc_device *rtc; rtc 187 drivers/rtc/rtc-pcf8563.c rtc_update_irq(pcf8563->rtc, 1, RTC_IRQF | RTC_AF); rtc 584 drivers/rtc/rtc-pcf8563.c pcf8563->rtc = devm_rtc_allocate_device(&client->dev); rtc 585 drivers/rtc/rtc-pcf8563.c if (IS_ERR(pcf8563->rtc)) rtc 586 drivers/rtc/rtc-pcf8563.c return PTR_ERR(pcf8563->rtc); rtc 588 drivers/rtc/rtc-pcf8563.c pcf8563->rtc->ops = &pcf8563_rtc_ops; rtc 590 drivers/rtc/rtc-pcf8563.c pcf8563->rtc->uie_unsupported = 1; rtc 591 drivers/rtc/rtc-pcf8563.c pcf8563->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 592 drivers/rtc/rtc-pcf8563.c pcf8563->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 593 drivers/rtc/rtc-pcf8563.c pcf8563->rtc->set_start_time = true; rtc 607 drivers/rtc/rtc-pcf8563.c err = rtc_register_device(pcf8563->rtc); rtc 28 drivers/rtc/rtc-pcf8583.c struct rtc_device *rtc; rtc 293 drivers/rtc/rtc-pcf8583.c pcf8583->rtc = devm_rtc_device_register(&client->dev, rtc 297 drivers/rtc/rtc-pcf8583.c return PTR_ERR_OR_ZERO(pcf8583->rtc); rtc 57 drivers/rtc/rtc-pic32.c struct rtc_device *rtc; rtc 90 drivers/rtc/rtc-pic32.c rtc_update_irq(pdata->rtc, 1, RTC_AF | RTC_IRQF); rtc 335 drivers/rtc/rtc-pic32.c pdata->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 336 drivers/rtc/rtc-pic32.c if (IS_ERR(pdata->rtc)) rtc 337 drivers/rtc/rtc-pic32.c return PTR_ERR(pdata->rtc); rtc 339 drivers/rtc/rtc-pic32.c pdata->rtc->ops = &pic32_rtcops; rtc 340 drivers/rtc/rtc-pic32.c pdata->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 341 drivers/rtc/rtc-pic32.c pdata->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 343 drivers/rtc/rtc-pic32.c ret = rtc_register_device(pdata->rtc); rtc 347 drivers/rtc/rtc-pic32.c pdata->rtc->max_user_freq = 128; rtc 24 drivers/rtc/rtc-pl030.c struct rtc_device *rtc; rtc 30 drivers/rtc/rtc-pl030.c struct pl030_rtc *rtc = dev_id; rtc 31 drivers/rtc/rtc-pl030.c writel(0, rtc->base + RTC_EOI); rtc 37 drivers/rtc/rtc-pl030.c struct pl030_rtc *rtc = dev_get_drvdata(dev); rtc 39 drivers/rtc/rtc-pl030.c rtc_time_to_tm(readl(rtc->base + RTC_MR), &alrm->time); rtc 45 drivers/rtc/rtc-pl030.c struct pl030_rtc *rtc = dev_get_drvdata(dev); rtc 56 drivers/rtc/rtc-pl030.c writel(time, rtc->base + RTC_MR); rtc 62 drivers/rtc/rtc-pl030.c struct pl030_rtc *rtc = dev_get_drvdata(dev); rtc 64 drivers/rtc/rtc-pl030.c rtc_time_to_tm(readl(rtc->base + RTC_DR), tm); rtc 79 drivers/rtc/rtc-pl030.c struct pl030_rtc *rtc = dev_get_drvdata(dev); rtc 85 drivers/rtc/rtc-pl030.c writel(time + 1, rtc->base + RTC_LR); rtc 99 drivers/rtc/rtc-pl030.c struct pl030_rtc *rtc; rtc 106 drivers/rtc/rtc-pl030.c rtc = devm_kzalloc(&dev->dev, sizeof(*rtc), GFP_KERNEL); rtc 107 drivers/rtc/rtc-pl030.c if (!rtc) { rtc 112 drivers/rtc/rtc-pl030.c rtc->rtc = devm_rtc_allocate_device(&dev->dev); rtc 113 drivers/rtc/rtc-pl030.c if (IS_ERR(rtc->rtc)) { rtc 114 drivers/rtc/rtc-pl030.c ret = PTR_ERR(rtc->rtc); rtc 118 drivers/rtc/rtc-pl030.c rtc->rtc->ops = &pl030_ops; rtc 119 drivers/rtc/rtc-pl030.c rtc->base = ioremap(dev->res.start, resource_size(&dev->res)); rtc 120 drivers/rtc/rtc-pl030.c if (!rtc->base) { rtc 125 drivers/rtc/rtc-pl030.c __raw_writel(0, rtc->base + RTC_CR); rtc 126 drivers/rtc/rtc-pl030.c __raw_writel(0, rtc->base + RTC_EOI); rtc 128 drivers/rtc/rtc-pl030.c amba_set_drvdata(dev, rtc); rtc 131 drivers/rtc/rtc-pl030.c "rtc-pl030", rtc); rtc 135 drivers/rtc/rtc-pl030.c ret = rtc_register_device(rtc->rtc); rtc 142 drivers/rtc/rtc-pl030.c free_irq(dev->irq[0], rtc); rtc 144 drivers/rtc/rtc-pl030.c iounmap(rtc->base); rtc 153 drivers/rtc/rtc-pl030.c struct pl030_rtc *rtc = amba_get_drvdata(dev); rtc 155 drivers/rtc/rtc-pl030.c writel(0, rtc->base + RTC_CR); rtc 157 drivers/rtc/rtc-pl030.c free_irq(dev->irq[0], rtc); rtc 158 drivers/rtc/rtc-pl030.c iounmap(rtc->base); rtc 87 drivers/rtc/rtc-pl031.c struct rtc_device *rtc; rtc 239 drivers/rtc/rtc-pl031.c rtc_update_irq(ldata->rtc, 1, events); rtc 381 drivers/rtc/rtc-pl031.c ldata->rtc = devm_rtc_allocate_device(&adev->dev); rtc 382 drivers/rtc/rtc-pl031.c if (IS_ERR(ldata->rtc)) rtc 383 drivers/rtc/rtc-pl031.c return PTR_ERR(ldata->rtc); rtc 385 drivers/rtc/rtc-pl031.c ldata->rtc->ops = ops; rtc 387 drivers/rtc/rtc-pl031.c ret = rtc_register_device(ldata->rtc); rtc 57 drivers/rtc/rtc-pm8xxx.c struct rtc_device *rtc; rtc 343 drivers/rtc/rtc-pm8xxx.c rtc_update_irq(rtc_dd->rtc, 1, RTC_IRQF | RTC_AF); rtc 489 drivers/rtc/rtc-pm8xxx.c rtc_dd->rtc = devm_rtc_device_register(&pdev->dev, "pm8xxx_rtc", rtc 491 drivers/rtc/rtc-pm8xxx.c if (IS_ERR(rtc_dd->rtc)) { rtc 493 drivers/rtc/rtc-pm8xxx.c __func__, PTR_ERR(rtc_dd->rtc)); rtc 494 drivers/rtc/rtc-pm8xxx.c return PTR_ERR(rtc_dd->rtc); rtc 48 drivers/rtc/rtc-ps3.c struct rtc_device *rtc; rtc 50 drivers/rtc/rtc-ps3.c rtc = devm_rtc_allocate_device(&dev->dev); rtc 51 drivers/rtc/rtc-ps3.c if (IS_ERR(rtc)) rtc 52 drivers/rtc/rtc-ps3.c return PTR_ERR(rtc); rtc 54 drivers/rtc/rtc-ps3.c rtc->ops = &ps3_rtc_ops; rtc 55 drivers/rtc/rtc-ps3.c rtc->range_max = U64_MAX; rtc 57 drivers/rtc/rtc-ps3.c platform_set_drvdata(dev, rtc); rtc 59 drivers/rtc/rtc-ps3.c return rtc_register_device(rtc); rtc 181 drivers/rtc/rtc-puv3.c struct rtc_device *rtc; rtc 199 drivers/rtc/rtc-puv3.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 200 drivers/rtc/rtc-puv3.c if (IS_ERR(rtc)) rtc 201 drivers/rtc/rtc-puv3.c return PTR_ERR(rtc); rtc 204 drivers/rtc/rtc-puv3.c 0, "pkunity-rtc alarm", rtc); rtc 211 drivers/rtc/rtc-puv3.c 0, "pkunity-rtc tick", rtc); rtc 236 drivers/rtc/rtc-puv3.c rtc->ops = &puv3_rtcops; rtc 237 drivers/rtc/rtc-puv3.c ret = rtc_register_device(rtc); rtc 245 drivers/rtc/rtc-puv3.c platform_set_drvdata(pdev, rtc); rtc 80 drivers/rtc/rtc-pxa.c struct rtc_device *rtc; rtc 159 drivers/rtc/rtc-pxa.c rtc_update_irq(pxa_rtc->rtc, 1, events); rtc 354 drivers/rtc/rtc-pxa.c pxa_rtc->rtc = devm_rtc_device_register(&pdev->dev, "pxa-rtc", rtc 356 drivers/rtc/rtc-pxa.c if (IS_ERR(pxa_rtc->rtc)) { rtc 357 drivers/rtc/rtc-pxa.c ret = PTR_ERR(pxa_rtc->rtc); rtc 321 drivers/rtc/rtc-r7301.c struct rtc_device *rtc = dev_id; rtc 322 drivers/rtc/rtc-r7301.c struct rtc7301_priv *priv = dev_get_drvdata(rtc->dev.parent); rtc 335 drivers/rtc/rtc-r7301.c rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF); rtc 360 drivers/rtc/rtc-r7301.c struct rtc_device *rtc; rtc 389 drivers/rtc/rtc-r7301.c rtc = devm_rtc_device_register(&dev->dev, DRV_NAME, &rtc7301_rtc_ops, rtc 391 drivers/rtc/rtc-r7301.c if (IS_ERR(rtc)) rtc 392 drivers/rtc/rtc-r7301.c return PTR_ERR(rtc); rtc 397 drivers/rtc/rtc-r7301.c dev_name(&dev->dev), rtc); rtc 121 drivers/rtc/rtc-r9701.c struct rtc_device *rtc; rtc 154 drivers/rtc/rtc-r9701.c rtc = devm_rtc_device_register(&spi->dev, "r9701", rtc 156 drivers/rtc/rtc-r9701.c if (IS_ERR(rtc)) rtc 157 drivers/rtc/rtc-r9701.c return PTR_ERR(rtc); rtc 159 drivers/rtc/rtc-r9701.c spi_set_drvdata(spi, rtc); rtc 21 drivers/rtc/rtc-rc5t583.c struct rtc_device *rtc; rtc 168 drivers/rtc/rtc-rc5t583.c static irqreturn_t rc5t583_rtc_interrupt(int irq, void *rtc) rtc 170 drivers/rtc/rtc-rc5t583.c struct device *dev = rtc; rtc 192 drivers/rtc/rtc-rc5t583.c rtc_update_irq(rc5t583_rtc->rtc, 1, events); rtc 250 drivers/rtc/rtc-rc5t583.c ricoh_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 252 drivers/rtc/rtc-rc5t583.c if (IS_ERR(ricoh_rtc->rtc)) { rtc 253 drivers/rtc/rtc-rc5t583.c ret = PTR_ERR(ricoh_rtc->rtc); rtc 269 drivers/rtc/rtc-rc5t583.c rc5t583_rtc_alarm_irq_enable(&rc5t583_rtc->rtc->dev, 0); rtc 55 drivers/rtc/rtc-rk808.c struct rtc_device *rtc; rtc 328 drivers/rtc/rtc-rk808.c rtc_update_irq(rk808_rtc->rtc, 1, RTC_IRQF | RTC_AF); rtc 430 drivers/rtc/rtc-rk808.c rk808_rtc->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 431 drivers/rtc/rtc-rk808.c if (IS_ERR(rk808_rtc->rtc)) rtc 432 drivers/rtc/rtc-rk808.c return PTR_ERR(rk808_rtc->rtc); rtc 434 drivers/rtc/rtc-rk808.c rk808_rtc->rtc->ops = &rk808_rtc_ops; rtc 450 drivers/rtc/rtc-rk808.c return rtc_register_device(rk808_rtc->rtc); rtc 66 drivers/rtc/rtc-rp5c01.c struct rtc_device *rtc; rtc 222 drivers/rtc/rtc-rp5c01.c struct rtc_device *rtc; rtc 249 drivers/rtc/rtc-rp5c01.c rtc = devm_rtc_allocate_device(&dev->dev); rtc 250 drivers/rtc/rtc-rp5c01.c if (IS_ERR(rtc)) rtc 251 drivers/rtc/rtc-rp5c01.c return PTR_ERR(rtc); rtc 253 drivers/rtc/rtc-rp5c01.c rtc->ops = &rp5c01_rtc_ops; rtc 254 drivers/rtc/rtc-rp5c01.c rtc->nvram_old_abi = true; rtc 256 drivers/rtc/rtc-rp5c01.c priv->rtc = rtc; rtc 259 drivers/rtc/rtc-rp5c01.c error = rtc_nvmem_register(rtc, &nvmem_cfg); rtc 263 drivers/rtc/rtc-rp5c01.c return rtc_register_device(rtc); rtc 369 drivers/rtc/rtc-rs5c313.c struct rtc_device *rtc = devm_rtc_device_register(&pdev->dev, "rs5c313", rtc 372 drivers/rtc/rtc-rs5c313.c if (IS_ERR(rtc)) rtc 373 drivers/rtc/rtc-rs5c313.c return PTR_ERR(rtc); rtc 375 drivers/rtc/rtc-rs5c313.c platform_set_drvdata(pdev, rtc); rtc 54 drivers/rtc/rtc-rs5c348.c struct rtc_device *rtc; rtc 167 drivers/rtc/rtc-rs5c348.c struct rtc_device *rtc; rtc 192 drivers/rtc/rtc-rs5c348.c rtc = devm_rtc_allocate_device(&spi->dev); rtc 193 drivers/rtc/rtc-rs5c348.c if (IS_ERR(rtc)) rtc 194 drivers/rtc/rtc-rs5c348.c return PTR_ERR(rtc); rtc 196 drivers/rtc/rtc-rs5c348.c pdata->rtc = rtc; rtc 198 drivers/rtc/rtc-rs5c348.c rtc->ops = &rs5c348_rtc_ops; rtc 200 drivers/rtc/rtc-rs5c348.c return rtc_register_device(rtc); rtc 122 drivers/rtc/rtc-rs5c372.c struct rtc_device *rtc; rtc 715 drivers/rtc/rtc-rs5c372.c rs5c372->rtc = devm_rtc_device_register(&client->dev, rtc 719 drivers/rtc/rtc-rs5c372.c if (IS_ERR(rs5c372->rtc)) { rtc 720 drivers/rtc/rtc-rs5c372.c err = PTR_ERR(rs5c372->rtc); rtc 85 drivers/rtc/rtc-rv3028.c struct rtc_device *rtc; rtc 177 drivers/rtc/rtc-rv3028.c dev_warn(&rv3028->rtc->dev, "Voltage low, data loss detected.\n"); rtc 198 drivers/rtc/rtc-rv3028.c rtc_update_irq(rv3028->rtc, 1, events); rtc 204 drivers/rtc/rtc-rv3028.c sysfs_notify(&rv3028->rtc->dev.kobj, NULL, rtc 206 drivers/rtc/rtc-rv3028.c dev_warn(&rv3028->rtc->dev, "event detected"); rtc 336 drivers/rtc/rtc-rv3028.c if (rv3028->rtc->uie_rtctimer.enabled) rtc 338 drivers/rtc/rtc-rv3028.c if (rv3028->rtc->aie_timer.enabled) rtc 354 drivers/rtc/rtc-rv3028.c if (rv3028->rtc->uie_rtctimer.enabled) rtc 356 drivers/rtc/rtc-rv3028.c if (rv3028->rtc->aie_timer.enabled) rtc 423 drivers/rtc/rtc-rv3028.c dev_warn(&rv3028->rtc->dev, "Voltage low, data loss detected.\n"); rtc 641 drivers/rtc/rtc-rv3028.c rv3028->rtc = devm_rtc_allocate_device(&client->dev); rtc 642 drivers/rtc/rtc-rv3028.c if (IS_ERR(rv3028->rtc)) rtc 643 drivers/rtc/rtc-rv3028.c return PTR_ERR(rv3028->rtc); rtc 693 drivers/rtc/rtc-rv3028.c ret = rtc_add_group(rv3028->rtc, &rv3028_attr_group); rtc 697 drivers/rtc/rtc-rv3028.c rv3028->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 698 drivers/rtc/rtc-rv3028.c rv3028->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 699 drivers/rtc/rtc-rv3028.c rv3028->rtc->ops = &rv3028_rtc_ops; rtc 700 drivers/rtc/rtc-rv3028.c ret = rtc_register_device(rv3028->rtc); rtc 705 drivers/rtc/rtc-rv3028.c rtc_nvmem_register(rv3028->rtc, &nvmem_cfg); rtc 707 drivers/rtc/rtc-rv3028.c rtc_nvmem_register(rv3028->rtc, &eeprom_cfg); rtc 709 drivers/rtc/rtc-rv3028.c rv3028->rtc->max_user_freq = 1; rtc 119 drivers/rtc/rtc-rv3029c2.c struct rtc_device *rtc; rtc 332 drivers/rtc/rtc-rv3029c2.c struct mutex *lock = &rv3029->rtc->ops_lock; rtc 360 drivers/rtc/rtc-rv3029c2.c rtc_update_irq(rv3029->rtc, 1, events); rtc 815 drivers/rtc/rtc-rv3029c2.c rv3029->rtc = devm_rtc_device_register(dev, name, &rv3029_rtc_ops, rtc 817 drivers/rtc/rtc-rv3029c2.c if (IS_ERR(rv3029->rtc)) { rtc 819 drivers/rtc/rtc-rv3029c2.c return PTR_ERR(rv3029->rtc); rtc 63 drivers/rtc/rtc-rv8803.c struct rtc_device *rtc; rtc 178 drivers/rtc/rtc-rv8803.c rtc_update_irq(rv8803->rtc, 1, events); rtc 354 drivers/rtc/rtc-rv8803.c if (rv8803->rtc->uie_rtctimer.enabled) rtc 356 drivers/rtc/rtc-rv8803.c if (rv8803->rtc->aie_timer.enabled) rtc 377 drivers/rtc/rtc-rv8803.c if (rv8803->rtc->uie_rtctimer.enabled) rtc 379 drivers/rtc/rtc-rv8803.c if (rv8803->rtc->aie_timer.enabled) rtc 382 drivers/rtc/rtc-rv8803.c if (!rv8803->rtc->uie_rtctimer.enabled) rtc 384 drivers/rtc/rtc-rv8803.c if (!rv8803->rtc->aie_timer.enabled) rtc 566 drivers/rtc/rtc-rv8803.c rv8803->rtc = devm_rtc_allocate_device(&client->dev); rtc 567 drivers/rtc/rtc-rv8803.c if (IS_ERR(rv8803->rtc)) rtc 568 drivers/rtc/rtc-rv8803.c return PTR_ERR(rv8803->rtc); rtc 595 drivers/rtc/rtc-rv8803.c rv8803->rtc->ops = &rv8803_rtc_ops; rtc 596 drivers/rtc/rtc-rv8803.c rv8803->rtc->nvram_old_abi = true; rtc 597 drivers/rtc/rtc-rv8803.c rv8803->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 598 drivers/rtc/rtc-rv8803.c rv8803->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 599 drivers/rtc/rtc-rv8803.c err = rtc_register_device(rv8803->rtc); rtc 603 drivers/rtc/rtc-rv8803.c rtc_nvmem_register(rv8803->rtc, &nvmem_cfg); rtc 605 drivers/rtc/rtc-rv8803.c rv8803->rtc->max_user_freq = 1; rtc 256 drivers/rtc/rtc-rx4581.c struct rtc_device *rtc; rtc 264 drivers/rtc/rtc-rx4581.c rtc = devm_rtc_device_register(&spi->dev, "rx4581", rtc 266 drivers/rtc/rtc-rx4581.c if (IS_ERR(rtc)) rtc 267 drivers/rtc/rtc-rx4581.c return PTR_ERR(rtc); rtc 269 drivers/rtc/rtc-rx4581.c spi_set_drvdata(spi, rtc); rtc 107 drivers/rtc/rtc-rx6110.c struct rtc_device *rtc; rtc 272 drivers/rtc/rtc-rx6110.c struct rtc_device *rtc = rx6110->rtc; rtc 292 drivers/rtc/rtc-rx6110.c dev_warn(&rtc->dev, "Voltage low, data loss detected.\n"); rtc 296 drivers/rtc/rtc-rx6110.c dev_warn(&rtc->dev, "An alarm may have been missed.\n"); rtc 300 drivers/rtc/rtc-rx6110.c dev_warn(&rtc->dev, "Periodic timer was detected\n"); rtc 304 drivers/rtc/rtc-rx6110.c dev_warn(&rtc->dev, "Update timer was detected\n"); rtc 357 drivers/rtc/rtc-rx6110.c rx6110->rtc = devm_rtc_device_register(&spi->dev, rtc 361 drivers/rtc/rtc-rx6110.c if (IS_ERR(rx6110->rtc)) rtc 362 drivers/rtc/rtc-rx6110.c return PTR_ERR(rx6110->rtc); rtc 368 drivers/rtc/rtc-rx6110.c rx6110->rtc->max_user_freq = 1; rtc 65 drivers/rtc/rtc-rx8010.c struct rtc_device *rtc; rtc 75 drivers/rtc/rtc-rx8010.c mutex_lock(&rx8010->rtc->ops_lock); rtc 80 drivers/rtc/rtc-rx8010.c mutex_unlock(&rx8010->rtc->ops_lock); rtc 89 drivers/rtc/rtc-rx8010.c rtc_update_irq(rx8010->rtc, 1, RTC_PF | RTC_IRQF); rtc 94 drivers/rtc/rtc-rx8010.c rtc_update_irq(rx8010->rtc, 1, RTC_AF | RTC_IRQF); rtc 99 drivers/rtc/rtc-rx8010.c rtc_update_irq(rx8010->rtc, 1, RTC_UF | RTC_IRQF); rtc 104 drivers/rtc/rtc-rx8010.c mutex_unlock(&rx8010->rtc->ops_lock); rtc 332 drivers/rtc/rtc-rx8010.c if (rx8010->rtc->uie_rtctimer.enabled) rtc 334 drivers/rtc/rtc-rx8010.c if (rx8010->rtc->aie_timer.enabled) rtc 359 drivers/rtc/rtc-rx8010.c if (rx8010->rtc->uie_rtctimer.enabled) rtc 361 drivers/rtc/rtc-rx8010.c if (rx8010->rtc->aie_timer.enabled) rtc 364 drivers/rtc/rtc-rx8010.c if (!rx8010->rtc->uie_rtctimer.enabled) rtc 366 drivers/rtc/rtc-rx8010.c if (!rx8010->rtc->aie_timer.enabled) rtc 475 drivers/rtc/rtc-rx8010.c rx8010->rtc = devm_rtc_device_register(&client->dev, client->name, rtc 478 drivers/rtc/rtc-rx8010.c if (IS_ERR(rx8010->rtc)) { rtc 480 drivers/rtc/rtc-rx8010.c return PTR_ERR(rx8010->rtc); rtc 483 drivers/rtc/rtc-rx8010.c rx8010->rtc->max_user_freq = 1; rtc 71 drivers/rtc/rtc-rx8025.c struct rtc_device *rtc; rtc 146 drivers/rtc/rtc-rx8025.c struct mutex *lock = &rx8025->rtc->ops_lock; rtc 161 drivers/rtc/rtc-rx8025.c rtc_update_irq(rx8025->rtc, 1, RTC_PF | RTC_IRQF); rtc 170 drivers/rtc/rtc-rx8025.c rtc_update_irq(rx8025->rtc, 1, RTC_AF | RTC_IRQF); rtc 526 drivers/rtc/rtc-rx8025.c rx8025->rtc = devm_rtc_device_register(&client->dev, client->name, rtc 528 drivers/rtc/rtc-rx8025.c if (IS_ERR(rx8025->rtc)) { rtc 530 drivers/rtc/rtc-rx8025.c return PTR_ERR(rx8025->rtc); rtc 545 drivers/rtc/rtc-rx8025.c rx8025->rtc->max_user_freq = 1; rtc 548 drivers/rtc/rtc-rx8025.c rx8025->rtc->uie_unsupported = 1; rtc 58 drivers/rtc/rtc-rx8581.c struct rtc_device *rtc; rtc 291 drivers/rtc/rtc-rx8581.c rx8581->rtc = devm_rtc_allocate_device(&client->dev); rtc 292 drivers/rtc/rtc-rx8581.c if (IS_ERR(rx8581->rtc)) rtc 293 drivers/rtc/rtc-rx8581.c return PTR_ERR(rx8581->rtc); rtc 295 drivers/rtc/rtc-rx8581.c rx8581->rtc->ops = &rx8581_rtc_ops; rtc 296 drivers/rtc/rtc-rx8581.c rx8581->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 297 drivers/rtc/rtc-rx8581.c rx8581->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 298 drivers/rtc/rtc-rx8581.c rx8581->rtc->start_secs = 0; rtc 299 drivers/rtc/rtc-rx8581.c rx8581->rtc->set_start_time = true; rtc 301 drivers/rtc/rtc-rx8581.c ret = rtc_register_device(rx8581->rtc); rtc 305 drivers/rtc/rtc-rx8581.c rtc_nvmem_register(rx8581->rtc, &nvmem_cfg[i]); rtc 67 drivers/rtc/rtc-s35390a.c struct rtc_device *rtc; rtc 488 drivers/rtc/rtc-s35390a.c s35390a->rtc = devm_rtc_device_register(dev, s35390a_driver.driver.name, rtc 491 drivers/rtc/rtc-s35390a.c if (IS_ERR(s35390a->rtc)) rtc 492 drivers/rtc/rtc-s35390a.c return PTR_ERR(s35390a->rtc); rtc 495 drivers/rtc/rtc-s35390a.c s35390a->rtc->uie_unsupported = 1; rtc 498 drivers/rtc/rtc-s35390a.c rtc_update_irq(s35390a->rtc, 1, RTC_AF); rtc 35 drivers/rtc/rtc-s3c.c struct rtc_device *rtc; rtc 537 drivers/rtc/rtc-s3c.c info->rtc = devm_rtc_device_register(&pdev->dev, "s3c", &s3c_rtcops, rtc 539 drivers/rtc/rtc-s3c.c if (IS_ERR(info->rtc)) { rtc 541 drivers/rtc/rtc-s3c.c ret = PTR_ERR(info->rtc); rtc 632 drivers/rtc/rtc-s3c.c rtc_update_irq(info->rtc, 1, RTC_AF | RTC_IRQF); rtc 637 drivers/rtc/rtc-s3c.c rtc_update_irq(info->rtc, 1, RTC_AF | RTC_IRQF); rtc 649 drivers/rtc/rtc-s3c.c val = (info->rtc->max_user_freq / freq) - 1; rtc 663 drivers/rtc/rtc-s3c.c val = (info->rtc->max_user_freq / freq) - 1; rtc 681 drivers/rtc/rtc-s3c.c val = (info->rtc->max_user_freq / freq) - 1; rtc 693 drivers/rtc/rtc-s3c.c val = (info->rtc->max_user_freq / freq) - 1; rtc 49 drivers/rtc/rtc-sa1100.c struct rtc_device *rtc = info->rtc; rtc 87 drivers/rtc/rtc-sa1100.c rtc_update_irq(rtc, 1, events); rtc 185 drivers/rtc/rtc-sa1100.c struct rtc_device *rtc; rtc 214 drivers/rtc/rtc-sa1100.c rtc = devm_rtc_device_register(&pdev->dev, pdev->name, &sa1100_rtc_ops, rtc 216 drivers/rtc/rtc-sa1100.c if (IS_ERR(rtc)) { rtc 218 drivers/rtc/rtc-sa1100.c return PTR_ERR(rtc); rtc 220 drivers/rtc/rtc-sa1100.c info->rtc = rtc; rtc 222 drivers/rtc/rtc-sa1100.c rtc->max_user_freq = RTC_FREQ; rtc 18 drivers/rtc/rtc-sa1100.h struct rtc_device *rtc; rtc 104 drivers/rtc/rtc-sc27xx.c struct rtc_device *rtc; rtc 126 drivers/rtc/rtc-sc27xx.c static int sprd_rtc_clear_alarm_ints(struct sprd_rtc *rtc) rtc 128 drivers/rtc/rtc-sc27xx.c return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, rtc 132 drivers/rtc/rtc-sc27xx.c static int sprd_rtc_lock_alarm(struct sprd_rtc *rtc, bool lock) rtc 137 drivers/rtc/rtc-sc27xx.c ret = regmap_read(rtc->regmap, rtc->base + SPRD_RTC_SPG_VALUE, &val); rtc 147 drivers/rtc/rtc-sc27xx.c ret = regmap_write(rtc->regmap, rtc->base + SPRD_RTC_SPG_UPD, val); rtc 152 drivers/rtc/rtc-sc27xx.c ret = regmap_read_poll_timeout(rtc->regmap, rtc 153 drivers/rtc/rtc-sc27xx.c rtc->base + SPRD_RTC_INT_RAW_STS, val, rtc 158 drivers/rtc/rtc-sc27xx.c dev_err(rtc->dev, "failed to update SPG value:%d\n", ret); rtc 162 drivers/rtc/rtc-sc27xx.c return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, rtc 166 drivers/rtc/rtc-sc27xx.c static int sprd_rtc_get_secs(struct sprd_rtc *rtc, enum sprd_rtc_reg_types type, rtc 196 drivers/rtc/rtc-sc27xx.c ret = regmap_read(rtc->regmap, rtc->base + sec_reg, &val); rtc 202 drivers/rtc/rtc-sc27xx.c ret = regmap_read(rtc->regmap, rtc->base + min_reg, &val); rtc 208 drivers/rtc/rtc-sc27xx.c ret = regmap_read(rtc->regmap, rtc->base + hour_reg, &val); rtc 214 drivers/rtc/rtc-sc27xx.c ret = regmap_read(rtc->regmap, rtc->base + day_reg, &val); rtc 223 drivers/rtc/rtc-sc27xx.c static int sprd_rtc_set_secs(struct sprd_rtc *rtc, enum sprd_rtc_reg_types type, rtc 263 drivers/rtc/rtc-sc27xx.c ret = regmap_write(rtc->regmap, rtc->base + sec_reg, sec); rtc 267 drivers/rtc/rtc-sc27xx.c ret = regmap_write(rtc->regmap, rtc->base + min_reg, min); rtc 271 drivers/rtc/rtc-sc27xx.c ret = regmap_write(rtc->regmap, rtc->base + hour_reg, hour); rtc 275 drivers/rtc/rtc-sc27xx.c ret = regmap_write(rtc->regmap, rtc->base + day_reg, day); rtc 288 drivers/rtc/rtc-sc27xx.c ret = regmap_read_poll_timeout(rtc->regmap, rtc 289 drivers/rtc/rtc-sc27xx.c rtc->base + SPRD_RTC_INT_RAW_STS, val, rtc 294 drivers/rtc/rtc-sc27xx.c dev_err(rtc->dev, "set time/alarm values timeout\n"); rtc 298 drivers/rtc/rtc-sc27xx.c return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, rtc 304 drivers/rtc/rtc-sc27xx.c struct sprd_rtc *rtc = dev_get_drvdata(dev); rtc 309 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_get_secs(rtc, SPRD_RTC_AUX_ALARM, &secs); rtc 315 drivers/rtc/rtc-sc27xx.c ret = regmap_read(rtc->regmap, rtc->base + SPRD_RTC_INT_EN, &val); rtc 321 drivers/rtc/rtc-sc27xx.c ret = regmap_read(rtc->regmap, rtc->base + SPRD_RTC_INT_RAW_STS, &val); rtc 331 drivers/rtc/rtc-sc27xx.c struct sprd_rtc *rtc = dev_get_drvdata(dev); rtc 336 drivers/rtc/rtc-sc27xx.c ret = regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, rtc 341 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_set_secs(rtc, SPRD_RTC_AUX_ALARM, secs); rtc 346 drivers/rtc/rtc-sc27xx.c ret = regmap_update_bits(rtc->regmap, rtc 347 drivers/rtc/rtc-sc27xx.c rtc->base + SPRD_RTC_INT_EN, rtc 351 drivers/rtc/rtc-sc27xx.c ret = regmap_update_bits(rtc->regmap, rtc 352 drivers/rtc/rtc-sc27xx.c rtc->base + SPRD_RTC_INT_EN, rtc 361 drivers/rtc/rtc-sc27xx.c struct sprd_rtc *rtc = dev_get_drvdata(dev); rtc 365 drivers/rtc/rtc-sc27xx.c if (!rtc->valid) { rtc 370 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_get_secs(rtc, SPRD_RTC_TIME, &secs); rtc 380 drivers/rtc/rtc-sc27xx.c struct sprd_rtc *rtc = dev_get_drvdata(dev); rtc 384 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_set_secs(rtc, SPRD_RTC_TIME, secs); rtc 388 drivers/rtc/rtc-sc27xx.c if (!rtc->valid) { rtc 390 drivers/rtc/rtc-sc27xx.c ret = regmap_write(rtc->regmap, rtc->base + SPRD_RTC_PWR_CTRL, rtc 399 drivers/rtc/rtc-sc27xx.c ret = regmap_write(rtc->regmap, rtc->base + SPRD_RTC_PWR_CTRL, rtc 404 drivers/rtc/rtc-sc27xx.c rtc->valid = true; rtc 412 drivers/rtc/rtc-sc27xx.c struct sprd_rtc *rtc = dev_get_drvdata(dev); rtc 425 drivers/rtc/rtc-sc27xx.c if (rtc->rtc && rtc->rtc->registered && rtc->rtc->aie_timer.enabled == 0) rtc 428 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_get_secs(rtc, SPRD_RTC_ALARM, &secs); rtc 434 drivers/rtc/rtc-sc27xx.c ret = regmap_read(rtc->regmap, rtc->base + SPRD_RTC_INT_EN, &val); rtc 440 drivers/rtc/rtc-sc27xx.c ret = regmap_read(rtc->regmap, rtc->base + SPRD_RTC_INT_RAW_STS, &val); rtc 450 drivers/rtc/rtc-sc27xx.c struct sprd_rtc *rtc = dev_get_drvdata(dev); rtc 453 drivers/rtc/rtc-sc27xx.c rtc_ktime_to_tm(rtc->rtc->aie_timer.node.expires); rtc 469 drivers/rtc/rtc-sc27xx.c if (!rtc->rtc->aie_timer.enabled || rtc_tm_sub(&aie_time, &alrm->time)) rtc 473 drivers/rtc/rtc-sc27xx.c ret = regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, rtc 478 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_set_secs(rtc, SPRD_RTC_ALARM, secs); rtc 483 drivers/rtc/rtc-sc27xx.c ret = regmap_update_bits(rtc->regmap, rtc 484 drivers/rtc/rtc-sc27xx.c rtc->base + SPRD_RTC_INT_EN, rtc 491 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_lock_alarm(rtc, false); rtc 493 drivers/rtc/rtc-sc27xx.c regmap_update_bits(rtc->regmap, rtc 494 drivers/rtc/rtc-sc27xx.c rtc->base + SPRD_RTC_INT_EN, rtc 501 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_lock_alarm(rtc, true); rtc 509 drivers/rtc/rtc-sc27xx.c struct sprd_rtc *rtc = dev_get_drvdata(dev); rtc 513 drivers/rtc/rtc-sc27xx.c ret = regmap_update_bits(rtc->regmap, rtc 514 drivers/rtc/rtc-sc27xx.c rtc->base + SPRD_RTC_INT_EN, rtc 520 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_lock_alarm(rtc, false); rtc 522 drivers/rtc/rtc-sc27xx.c regmap_update_bits(rtc->regmap, rtc->base + SPRD_RTC_INT_EN, rtc 525 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_lock_alarm(rtc, true); rtc 541 drivers/rtc/rtc-sc27xx.c struct sprd_rtc *rtc = dev_id; rtc 544 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_clear_alarm_ints(rtc); rtc 548 drivers/rtc/rtc-sc27xx.c rtc_update_irq(rtc->rtc, 1, RTC_AF | RTC_IRQF); rtc 552 drivers/rtc/rtc-sc27xx.c static int sprd_rtc_check_power_down(struct sprd_rtc *rtc) rtc 557 drivers/rtc/rtc-sc27xx.c ret = regmap_read(rtc->regmap, rtc->base + SPRD_RTC_PWR_STS, &val); rtc 566 drivers/rtc/rtc-sc27xx.c rtc->valid = val == SPRD_RTC_POWER_RESET_VALUE ? false : true; rtc 570 drivers/rtc/rtc-sc27xx.c static int sprd_rtc_check_alarm_int(struct sprd_rtc *rtc) rtc 575 drivers/rtc/rtc-sc27xx.c ret = regmap_read(rtc->regmap, rtc->base + SPRD_RTC_SPG_VALUE, &val); rtc 592 drivers/rtc/rtc-sc27xx.c return regmap_update_bits(rtc->regmap, rtc->base + SPRD_RTC_INT_EN, rtc 599 drivers/rtc/rtc-sc27xx.c struct sprd_rtc *rtc; rtc 602 drivers/rtc/rtc-sc27xx.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 603 drivers/rtc/rtc-sc27xx.c if (!rtc) rtc 606 drivers/rtc/rtc-sc27xx.c rtc->regmap = dev_get_regmap(pdev->dev.parent, NULL); rtc 607 drivers/rtc/rtc-sc27xx.c if (!rtc->regmap) rtc 610 drivers/rtc/rtc-sc27xx.c ret = of_property_read_u32(node, "reg", &rtc->base); rtc 616 drivers/rtc/rtc-sc27xx.c rtc->irq = platform_get_irq(pdev, 0); rtc 617 drivers/rtc/rtc-sc27xx.c if (rtc->irq < 0) rtc 618 drivers/rtc/rtc-sc27xx.c return rtc->irq; rtc 620 drivers/rtc/rtc-sc27xx.c rtc->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 621 drivers/rtc/rtc-sc27xx.c if (IS_ERR(rtc->rtc)) rtc 622 drivers/rtc/rtc-sc27xx.c return PTR_ERR(rtc->rtc); rtc 624 drivers/rtc/rtc-sc27xx.c rtc->dev = &pdev->dev; rtc 625 drivers/rtc/rtc-sc27xx.c platform_set_drvdata(pdev, rtc); rtc 628 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_check_alarm_int(rtc); rtc 635 drivers/rtc/rtc-sc27xx.c ret = sprd_rtc_check_power_down(rtc); rtc 641 drivers/rtc/rtc-sc27xx.c ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL, rtc 644 drivers/rtc/rtc-sc27xx.c pdev->name, rtc); rtc 652 drivers/rtc/rtc-sc27xx.c rtc->rtc->ops = &sprd_rtc_ops; rtc 653 drivers/rtc/rtc-sc27xx.c rtc->rtc->range_min = 0; rtc 654 drivers/rtc/rtc-sc27xx.c rtc->rtc->range_max = 5662310399LL; rtc 655 drivers/rtc/rtc-sc27xx.c ret = rtc_register_device(rtc->rtc); rtc 40 drivers/rtc/rtc-sd3078.c struct rtc_device *rtc; rtc 187 drivers/rtc/rtc-sd3078.c sd3078->rtc = devm_rtc_allocate_device(&client->dev); rtc 188 drivers/rtc/rtc-sd3078.c if (IS_ERR(sd3078->rtc)) rtc 189 drivers/rtc/rtc-sd3078.c return PTR_ERR(sd3078->rtc); rtc 191 drivers/rtc/rtc-sd3078.c sd3078->rtc->ops = &sd3078_rtc_ops; rtc 192 drivers/rtc/rtc-sd3078.c sd3078->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 193 drivers/rtc/rtc-sd3078.c sd3078->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 195 drivers/rtc/rtc-sd3078.c ret = rtc_register_device(sd3078->rtc); rtc 110 drivers/rtc/rtc-sh.c static int __sh_rtc_interrupt(struct sh_rtc *rtc) rtc 114 drivers/rtc/rtc-sh.c tmp = readb(rtc->regbase + RCR1); rtc 117 drivers/rtc/rtc-sh.c writeb(tmp, rtc->regbase + RCR1); rtc 120 drivers/rtc/rtc-sh.c if (pending && rtc->periodic_freq & PF_OXS) rtc 121 drivers/rtc/rtc-sh.c rtc_update_irq(rtc->rtc_dev, 1, RTC_UF | RTC_IRQF); rtc 126 drivers/rtc/rtc-sh.c static int __sh_rtc_alarm(struct sh_rtc *rtc) rtc 130 drivers/rtc/rtc-sh.c tmp = readb(rtc->regbase + RCR1); rtc 133 drivers/rtc/rtc-sh.c writeb(tmp, rtc->regbase + RCR1); rtc 136 drivers/rtc/rtc-sh.c rtc_update_irq(rtc->rtc_dev, 1, RTC_AF | RTC_IRQF); rtc 141 drivers/rtc/rtc-sh.c static int __sh_rtc_periodic(struct sh_rtc *rtc) rtc 145 drivers/rtc/rtc-sh.c tmp = readb(rtc->regbase + RCR2); rtc 148 drivers/rtc/rtc-sh.c writeb(tmp, rtc->regbase + RCR2); rtc 154 drivers/rtc/rtc-sh.c if ((rtc->periodic_freq & PF_HP) && (rtc->periodic_freq & PF_COUNT)) rtc 155 drivers/rtc/rtc-sh.c rtc->periodic_freq &= ~PF_COUNT; rtc 157 drivers/rtc/rtc-sh.c if (rtc->periodic_freq & PF_HP) rtc 158 drivers/rtc/rtc-sh.c rtc->periodic_freq |= PF_COUNT; rtc 159 drivers/rtc/rtc-sh.c rtc_update_irq(rtc->rtc_dev, 1, RTC_PF | RTC_IRQF); rtc 167 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_id; rtc 170 drivers/rtc/rtc-sh.c spin_lock(&rtc->lock); rtc 171 drivers/rtc/rtc-sh.c ret = __sh_rtc_interrupt(rtc); rtc 172 drivers/rtc/rtc-sh.c spin_unlock(&rtc->lock); rtc 179 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_id; rtc 182 drivers/rtc/rtc-sh.c spin_lock(&rtc->lock); rtc 183 drivers/rtc/rtc-sh.c ret = __sh_rtc_alarm(rtc); rtc 184 drivers/rtc/rtc-sh.c spin_unlock(&rtc->lock); rtc 191 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_id; rtc 194 drivers/rtc/rtc-sh.c spin_lock(&rtc->lock); rtc 195 drivers/rtc/rtc-sh.c ret = __sh_rtc_periodic(rtc); rtc 196 drivers/rtc/rtc-sh.c spin_unlock(&rtc->lock); rtc 203 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_id; rtc 206 drivers/rtc/rtc-sh.c spin_lock(&rtc->lock); rtc 207 drivers/rtc/rtc-sh.c ret = __sh_rtc_interrupt(rtc); rtc 208 drivers/rtc/rtc-sh.c ret |= __sh_rtc_alarm(rtc); rtc 209 drivers/rtc/rtc-sh.c ret |= __sh_rtc_periodic(rtc); rtc 210 drivers/rtc/rtc-sh.c spin_unlock(&rtc->lock); rtc 217 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_get_drvdata(dev); rtc 220 drivers/rtc/rtc-sh.c spin_lock_irq(&rtc->lock); rtc 222 drivers/rtc/rtc-sh.c tmp = readb(rtc->regbase + RCR1); rtc 229 drivers/rtc/rtc-sh.c writeb(tmp, rtc->regbase + RCR1); rtc 231 drivers/rtc/rtc-sh.c spin_unlock_irq(&rtc->lock); rtc 236 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_get_drvdata(dev); rtc 239 drivers/rtc/rtc-sh.c tmp = readb(rtc->regbase + RCR1); rtc 242 drivers/rtc/rtc-sh.c tmp = readb(rtc->regbase + RCR2); rtc 251 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_get_drvdata(dev); rtc 254 drivers/rtc/rtc-sh.c spin_lock_irq(&rtc->lock); rtc 256 drivers/rtc/rtc-sh.c tmp = readb(rtc->regbase + RCR1); rtc 263 drivers/rtc/rtc-sh.c writeb(tmp, rtc->regbase + RCR1); rtc 265 drivers/rtc/rtc-sh.c spin_unlock_irq(&rtc->lock); rtc 276 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_get_drvdata(dev); rtc 279 drivers/rtc/rtc-sh.c if (!(readb(rtc->regbase + RCR2) & RCR2_RTCEN)) rtc 285 drivers/rtc/rtc-sh.c spin_lock_irq(&rtc->lock); rtc 287 drivers/rtc/rtc-sh.c tmp = readb(rtc->regbase + RCR1); rtc 290 drivers/rtc/rtc-sh.c writeb(tmp, rtc->regbase + RCR1); rtc 292 drivers/rtc/rtc-sh.c sec128 = readb(rtc->regbase + R64CNT); rtc 294 drivers/rtc/rtc-sh.c tm->tm_sec = bcd2bin(readb(rtc->regbase + RSECCNT)); rtc 295 drivers/rtc/rtc-sh.c tm->tm_min = bcd2bin(readb(rtc->regbase + RMINCNT)); rtc 296 drivers/rtc/rtc-sh.c tm->tm_hour = bcd2bin(readb(rtc->regbase + RHRCNT)); rtc 297 drivers/rtc/rtc-sh.c tm->tm_wday = bcd2bin(readb(rtc->regbase + RWKCNT)); rtc 298 drivers/rtc/rtc-sh.c tm->tm_mday = bcd2bin(readb(rtc->regbase + RDAYCNT)); rtc 299 drivers/rtc/rtc-sh.c tm->tm_mon = bcd2bin(readb(rtc->regbase + RMONCNT)) - 1; rtc 301 drivers/rtc/rtc-sh.c if (rtc->capabilities & RTC_CAP_4_DIGIT_YEAR) { rtc 302 drivers/rtc/rtc-sh.c yr = readw(rtc->regbase + RYRCNT); rtc 306 drivers/rtc/rtc-sh.c yr = readb(rtc->regbase + RYRCNT); rtc 312 drivers/rtc/rtc-sh.c sec2 = readb(rtc->regbase + R64CNT); rtc 313 drivers/rtc/rtc-sh.c cf_bit = readb(rtc->regbase + RCR1) & RCR1_CF; rtc 315 drivers/rtc/rtc-sh.c spin_unlock_irq(&rtc->lock); rtc 324 drivers/rtc/rtc-sh.c if (!(rtc->periodic_freq & PF_OXS)) rtc 338 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_get_drvdata(dev); rtc 342 drivers/rtc/rtc-sh.c spin_lock_irq(&rtc->lock); rtc 345 drivers/rtc/rtc-sh.c tmp = readb(rtc->regbase + RCR2); rtc 348 drivers/rtc/rtc-sh.c writeb(tmp, rtc->regbase + RCR2); rtc 350 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_sec), rtc->regbase + RSECCNT); rtc 351 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_min), rtc->regbase + RMINCNT); rtc 352 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_hour), rtc->regbase + RHRCNT); rtc 353 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_wday), rtc->regbase + RWKCNT); rtc 354 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_mday), rtc->regbase + RDAYCNT); rtc 355 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_mon + 1), rtc->regbase + RMONCNT); rtc 357 drivers/rtc/rtc-sh.c if (rtc->capabilities & RTC_CAP_4_DIGIT_YEAR) { rtc 360 drivers/rtc/rtc-sh.c writew(year, rtc->regbase + RYRCNT); rtc 363 drivers/rtc/rtc-sh.c writeb(bin2bcd(year), rtc->regbase + RYRCNT); rtc 367 drivers/rtc/rtc-sh.c tmp = readb(rtc->regbase + RCR2); rtc 370 drivers/rtc/rtc-sh.c writeb(tmp, rtc->regbase + RCR2); rtc 372 drivers/rtc/rtc-sh.c spin_unlock_irq(&rtc->lock); rtc 377 drivers/rtc/rtc-sh.c static inline int sh_rtc_read_alarm_value(struct sh_rtc *rtc, int reg_off) rtc 382 drivers/rtc/rtc-sh.c byte = readb(rtc->regbase + reg_off); rtc 393 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_get_drvdata(dev); rtc 396 drivers/rtc/rtc-sh.c spin_lock_irq(&rtc->lock); rtc 398 drivers/rtc/rtc-sh.c tm->tm_sec = sh_rtc_read_alarm_value(rtc, RSECAR); rtc 399 drivers/rtc/rtc-sh.c tm->tm_min = sh_rtc_read_alarm_value(rtc, RMINAR); rtc 400 drivers/rtc/rtc-sh.c tm->tm_hour = sh_rtc_read_alarm_value(rtc, RHRAR); rtc 401 drivers/rtc/rtc-sh.c tm->tm_wday = sh_rtc_read_alarm_value(rtc, RWKAR); rtc 402 drivers/rtc/rtc-sh.c tm->tm_mday = sh_rtc_read_alarm_value(rtc, RDAYAR); rtc 403 drivers/rtc/rtc-sh.c tm->tm_mon = sh_rtc_read_alarm_value(rtc, RMONAR); rtc 407 drivers/rtc/rtc-sh.c wkalrm->enabled = (readb(rtc->regbase + RCR1) & RCR1_AIE) ? 1 : 0; rtc 409 drivers/rtc/rtc-sh.c spin_unlock_irq(&rtc->lock); rtc 414 drivers/rtc/rtc-sh.c static inline void sh_rtc_write_alarm_value(struct sh_rtc *rtc, rtc 419 drivers/rtc/rtc-sh.c writeb(0, rtc->regbase + reg_off); rtc 421 drivers/rtc/rtc-sh.c writeb(bin2bcd(value) | AR_ENB, rtc->regbase + reg_off); rtc 426 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_get_drvdata(dev); rtc 431 drivers/rtc/rtc-sh.c spin_lock_irq(&rtc->lock); rtc 434 drivers/rtc/rtc-sh.c rcr1 = readb(rtc->regbase + RCR1); rtc 436 drivers/rtc/rtc-sh.c writeb(rcr1, rtc->regbase + RCR1); rtc 439 drivers/rtc/rtc-sh.c sh_rtc_write_alarm_value(rtc, tm->tm_sec, RSECAR); rtc 440 drivers/rtc/rtc-sh.c sh_rtc_write_alarm_value(rtc, tm->tm_min, RMINAR); rtc 441 drivers/rtc/rtc-sh.c sh_rtc_write_alarm_value(rtc, tm->tm_hour, RHRAR); rtc 442 drivers/rtc/rtc-sh.c sh_rtc_write_alarm_value(rtc, tm->tm_wday, RWKAR); rtc 443 drivers/rtc/rtc-sh.c sh_rtc_write_alarm_value(rtc, tm->tm_mday, RDAYAR); rtc 447 drivers/rtc/rtc-sh.c sh_rtc_write_alarm_value(rtc, mon, RMONAR); rtc 451 drivers/rtc/rtc-sh.c writeb(rcr1, rtc->regbase + RCR1); rtc 454 drivers/rtc/rtc-sh.c spin_unlock_irq(&rtc->lock); rtc 470 drivers/rtc/rtc-sh.c struct sh_rtc *rtc; rtc 475 drivers/rtc/rtc-sh.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 476 drivers/rtc/rtc-sh.c if (unlikely(!rtc)) rtc 479 drivers/rtc/rtc-sh.c spin_lock_init(&rtc->lock); rtc 488 drivers/rtc/rtc-sh.c rtc->periodic_irq = ret; rtc 489 drivers/rtc/rtc-sh.c rtc->carry_irq = platform_get_irq(pdev, 1); rtc 490 drivers/rtc/rtc-sh.c rtc->alarm_irq = platform_get_irq(pdev, 2); rtc 500 drivers/rtc/rtc-sh.c rtc->regsize = resource_size(res); rtc 502 drivers/rtc/rtc-sh.c rtc->res = devm_request_mem_region(&pdev->dev, res->start, rtc 503 drivers/rtc/rtc-sh.c rtc->regsize, pdev->name); rtc 504 drivers/rtc/rtc-sh.c if (unlikely(!rtc->res)) rtc 507 drivers/rtc/rtc-sh.c rtc->regbase = devm_ioremap_nocache(&pdev->dev, rtc->res->start, rtc 508 drivers/rtc/rtc-sh.c rtc->regsize); rtc 509 drivers/rtc/rtc-sh.c if (unlikely(!rtc->regbase)) rtc 522 drivers/rtc/rtc-sh.c rtc->clk = devm_clk_get(&pdev->dev, clk_name); rtc 523 drivers/rtc/rtc-sh.c if (IS_ERR(rtc->clk)) { rtc 530 drivers/rtc/rtc-sh.c rtc->clk = NULL; rtc 533 drivers/rtc/rtc-sh.c rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev); rtc 534 drivers/rtc/rtc-sh.c if (IS_ERR(rtc->rtc_dev)) rtc 535 drivers/rtc/rtc-sh.c return PTR_ERR(rtc->rtc_dev); rtc 537 drivers/rtc/rtc-sh.c clk_enable(rtc->clk); rtc 539 drivers/rtc/rtc-sh.c rtc->capabilities = RTC_DEF_CAPABILITIES; rtc 550 drivers/rtc/rtc-sh.c rtc->capabilities |= pinfo->capabilities; rtc 554 drivers/rtc/rtc-sh.c if (rtc->carry_irq <= 0) { rtc 556 drivers/rtc/rtc-sh.c ret = devm_request_irq(&pdev->dev, rtc->periodic_irq, rtc 557 drivers/rtc/rtc-sh.c sh_rtc_shared, 0, "sh-rtc", rtc); rtc 561 drivers/rtc/rtc-sh.c rtc->periodic_irq); rtc 566 drivers/rtc/rtc-sh.c ret = devm_request_irq(&pdev->dev, rtc->periodic_irq, rtc 567 drivers/rtc/rtc-sh.c sh_rtc_periodic, 0, "sh-rtc period", rtc); rtc 571 drivers/rtc/rtc-sh.c ret, rtc->periodic_irq); rtc 575 drivers/rtc/rtc-sh.c ret = devm_request_irq(&pdev->dev, rtc->carry_irq, rtc 576 drivers/rtc/rtc-sh.c sh_rtc_interrupt, 0, "sh-rtc carry", rtc); rtc 580 drivers/rtc/rtc-sh.c ret, rtc->carry_irq); rtc 584 drivers/rtc/rtc-sh.c ret = devm_request_irq(&pdev->dev, rtc->alarm_irq, rtc 585 drivers/rtc/rtc-sh.c sh_rtc_alarm, 0, "sh-rtc alarm", rtc); rtc 589 drivers/rtc/rtc-sh.c ret, rtc->alarm_irq); rtc 594 drivers/rtc/rtc-sh.c platform_set_drvdata(pdev, rtc); rtc 600 drivers/rtc/rtc-sh.c rtc->rtc_dev->ops = &sh_rtc_ops; rtc 601 drivers/rtc/rtc-sh.c rtc->rtc_dev->max_user_freq = 256; rtc 603 drivers/rtc/rtc-sh.c if (rtc->capabilities & RTC_CAP_4_DIGIT_YEAR) { rtc 604 drivers/rtc/rtc-sh.c rtc->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_1900; rtc 605 drivers/rtc/rtc-sh.c rtc->rtc_dev->range_max = RTC_TIMESTAMP_END_9999; rtc 607 drivers/rtc/rtc-sh.c rtc->rtc_dev->range_min = mktime64(1999, 1, 1, 0, 0, 0); rtc 608 drivers/rtc/rtc-sh.c rtc->rtc_dev->range_max = mktime64(2098, 12, 31, 23, 59, 59); rtc 611 drivers/rtc/rtc-sh.c ret = rtc_register_device(rtc->rtc_dev); rtc 619 drivers/rtc/rtc-sh.c clk_disable(rtc->clk); rtc 626 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = platform_get_drvdata(pdev); rtc 631 drivers/rtc/rtc-sh.c clk_disable(rtc->clk); rtc 638 drivers/rtc/rtc-sh.c struct sh_rtc *rtc = dev_get_drvdata(dev); rtc 640 drivers/rtc/rtc-sh.c irq_set_irq_wake(rtc->periodic_irq, enabled); rtc 642 drivers/rtc/rtc-sh.c if (rtc->carry_irq > 0) { rtc 643 drivers/rtc/rtc-sh.c irq_set_irq_wake(rtc->carry_irq, enabled); rtc 644 drivers/rtc/rtc-sh.c irq_set_irq_wake(rtc->alarm_irq, enabled); rtc 44 drivers/rtc/rtc-sirfsoc.c struct rtc_device *rtc; rtc 271 drivers/rtc/rtc-sirfsoc.c rtc_update_irq(rtcdrv->rtc, 1, events); rtc 344 drivers/rtc/rtc-sirfsoc.c rtcdrv->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 346 drivers/rtc/rtc-sirfsoc.c if (IS_ERR(rtcdrv->rtc)) { rtc 347 drivers/rtc/rtc-sirfsoc.c err = PTR_ERR(rtcdrv->rtc); rtc 37 drivers/rtc/rtc-snvs.c struct rtc_device *rtc; rtc 72 drivers/rtc/rtc-snvs.c dev_err(&data->rtc->dev, "Timeout trying to get valid LPSRT Counter read\n"); rtc 90 drivers/rtc/rtc-snvs.c dev_err(&data->rtc->dev, "Timeout trying to get valid LPSRT Counter read\n"); rtc 117 drivers/rtc/rtc-snvs.c dev_err(&data->rtc->dev, "Timeout waiting for LPSRT Counter to change\n"); rtc 249 drivers/rtc/rtc-snvs.c rtc_update_irq(data->rtc, 1, events); rtc 277 drivers/rtc/rtc-snvs.c data->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 278 drivers/rtc/rtc-snvs.c if (IS_ERR(data->rtc)) rtc 279 drivers/rtc/rtc-snvs.c return PTR_ERR(data->rtc); rtc 345 drivers/rtc/rtc-snvs.c data->rtc->ops = &snvs_rtc_ops; rtc 346 drivers/rtc/rtc-snvs.c data->rtc->range_max = U32_MAX; rtc 347 drivers/rtc/rtc-snvs.c ret = rtc_register_device(data->rtc); rtc 81 drivers/rtc/rtc-spear.c struct rtc_device *rtc; rtc 166 drivers/rtc/rtc-spear.c rtc_update_irq(config->rtc, 1, events); rtc 388 drivers/rtc/rtc-spear.c config->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 390 drivers/rtc/rtc-spear.c if (IS_ERR(config->rtc)) { rtc 392 drivers/rtc/rtc-spear.c PTR_ERR(config->rtc)); rtc 393 drivers/rtc/rtc-spear.c status = PTR_ERR(config->rtc); rtc 397 drivers/rtc/rtc-spear.c config->rtc->uie_unsupported = 1; rtc 53 drivers/rtc/rtc-st-lpc.c static void st_rtc_set_hw_alarm(struct st_rtc *rtc, rtc 58 drivers/rtc/rtc-st-lpc.c spin_lock_irqsave(&rtc->lock, flags); rtc 60 drivers/rtc/rtc-st-lpc.c writel_relaxed(1, rtc->ioaddr + LPC_WDT_OFF); rtc 62 drivers/rtc/rtc-st-lpc.c writel_relaxed(msb, rtc->ioaddr + LPC_LPA_MSB_OFF); rtc 63 drivers/rtc/rtc-st-lpc.c writel_relaxed(lsb, rtc->ioaddr + LPC_LPA_LSB_OFF); rtc 64 drivers/rtc/rtc-st-lpc.c writel_relaxed(1, rtc->ioaddr + LPC_LPA_START_OFF); rtc 66 drivers/rtc/rtc-st-lpc.c writel_relaxed(0, rtc->ioaddr + LPC_WDT_OFF); rtc 68 drivers/rtc/rtc-st-lpc.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 73 drivers/rtc/rtc-st-lpc.c struct st_rtc *rtc = (struct st_rtc *)data; rtc 75 drivers/rtc/rtc-st-lpc.c rtc_update_irq(rtc->rtc_dev, 1, RTC_AF); rtc 82 drivers/rtc/rtc-st-lpc.c struct st_rtc *rtc = dev_get_drvdata(dev); rtc 87 drivers/rtc/rtc-st-lpc.c spin_lock_irqsave(&rtc->lock, flags); rtc 90 drivers/rtc/rtc-st-lpc.c lpt_msb = readl_relaxed(rtc->ioaddr + LPC_LPT_MSB_OFF); rtc 91 drivers/rtc/rtc-st-lpc.c lpt_lsb = readl_relaxed(rtc->ioaddr + LPC_LPT_LSB_OFF); rtc 92 drivers/rtc/rtc-st-lpc.c } while (readl_relaxed(rtc->ioaddr + LPC_LPT_MSB_OFF) != lpt_msb); rtc 94 drivers/rtc/rtc-st-lpc.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 97 drivers/rtc/rtc-st-lpc.c do_div(lpt, rtc->clkrate); rtc 105 drivers/rtc/rtc-st-lpc.c struct st_rtc *rtc = dev_get_drvdata(dev); rtc 111 drivers/rtc/rtc-st-lpc.c lpt = (unsigned long long)secs * rtc->clkrate; rtc 113 drivers/rtc/rtc-st-lpc.c spin_lock_irqsave(&rtc->lock, flags); rtc 115 drivers/rtc/rtc-st-lpc.c writel_relaxed(lpt >> 32, rtc->ioaddr + LPC_LPT_MSB_OFF); rtc 116 drivers/rtc/rtc-st-lpc.c writel_relaxed(lpt, rtc->ioaddr + LPC_LPT_LSB_OFF); rtc 117 drivers/rtc/rtc-st-lpc.c writel_relaxed(1, rtc->ioaddr + LPC_LPT_START_OFF); rtc 119 drivers/rtc/rtc-st-lpc.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 126 drivers/rtc/rtc-st-lpc.c struct st_rtc *rtc = dev_get_drvdata(dev); rtc 129 drivers/rtc/rtc-st-lpc.c spin_lock_irqsave(&rtc->lock, flags); rtc 131 drivers/rtc/rtc-st-lpc.c memcpy(wkalrm, &rtc->alarm, sizeof(struct rtc_wkalrm)); rtc 133 drivers/rtc/rtc-st-lpc.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 140 drivers/rtc/rtc-st-lpc.c struct st_rtc *rtc = dev_get_drvdata(dev); rtc 142 drivers/rtc/rtc-st-lpc.c if (enabled && !rtc->irq_enabled) { rtc 143 drivers/rtc/rtc-st-lpc.c enable_irq(rtc->irq); rtc 144 drivers/rtc/rtc-st-lpc.c rtc->irq_enabled = true; rtc 145 drivers/rtc/rtc-st-lpc.c } else if (!enabled && rtc->irq_enabled) { rtc 146 drivers/rtc/rtc-st-lpc.c disable_irq(rtc->irq); rtc 147 drivers/rtc/rtc-st-lpc.c rtc->irq_enabled = false; rtc 155 drivers/rtc/rtc-st-lpc.c struct st_rtc *rtc = dev_get_drvdata(dev); rtc 165 drivers/rtc/rtc-st-lpc.c memcpy(&rtc->alarm, t, sizeof(struct rtc_wkalrm)); rtc 169 drivers/rtc/rtc-st-lpc.c lpa = (unsigned long long)alarm_secs * rtc->clkrate; rtc 171 drivers/rtc/rtc-st-lpc.c st_rtc_set_hw_alarm(rtc, lpa >> 32, lpa); rtc 188 drivers/rtc/rtc-st-lpc.c struct st_rtc *rtc; rtc 203 drivers/rtc/rtc-st-lpc.c rtc = devm_kzalloc(&pdev->dev, sizeof(struct st_rtc), GFP_KERNEL); rtc 204 drivers/rtc/rtc-st-lpc.c if (!rtc) rtc 207 drivers/rtc/rtc-st-lpc.c rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev); rtc 208 drivers/rtc/rtc-st-lpc.c if (IS_ERR(rtc->rtc_dev)) rtc 209 drivers/rtc/rtc-st-lpc.c return PTR_ERR(rtc->rtc_dev); rtc 211 drivers/rtc/rtc-st-lpc.c spin_lock_init(&rtc->lock); rtc 214 drivers/rtc/rtc-st-lpc.c rtc->ioaddr = devm_ioremap_resource(&pdev->dev, res); rtc 215 drivers/rtc/rtc-st-lpc.c if (IS_ERR(rtc->ioaddr)) rtc 216 drivers/rtc/rtc-st-lpc.c return PTR_ERR(rtc->ioaddr); rtc 218 drivers/rtc/rtc-st-lpc.c rtc->irq = irq_of_parse_and_map(np, 0); rtc 219 drivers/rtc/rtc-st-lpc.c if (!rtc->irq) { rtc 224 drivers/rtc/rtc-st-lpc.c ret = devm_request_irq(&pdev->dev, rtc->irq, st_rtc_handler, 0, rtc 225 drivers/rtc/rtc-st-lpc.c pdev->name, rtc); rtc 227 drivers/rtc/rtc-st-lpc.c dev_err(&pdev->dev, "Failed to request irq %i\n", rtc->irq); rtc 231 drivers/rtc/rtc-st-lpc.c enable_irq_wake(rtc->irq); rtc 232 drivers/rtc/rtc-st-lpc.c disable_irq(rtc->irq); rtc 234 drivers/rtc/rtc-st-lpc.c rtc->clk = clk_get(&pdev->dev, NULL); rtc 235 drivers/rtc/rtc-st-lpc.c if (IS_ERR(rtc->clk)) { rtc 237 drivers/rtc/rtc-st-lpc.c return PTR_ERR(rtc->clk); rtc 240 drivers/rtc/rtc-st-lpc.c clk_prepare_enable(rtc->clk); rtc 242 drivers/rtc/rtc-st-lpc.c rtc->clkrate = clk_get_rate(rtc->clk); rtc 243 drivers/rtc/rtc-st-lpc.c if (!rtc->clkrate) { rtc 250 drivers/rtc/rtc-st-lpc.c platform_set_drvdata(pdev, rtc); rtc 252 drivers/rtc/rtc-st-lpc.c rtc->rtc_dev->ops = &st_rtc_ops; rtc 253 drivers/rtc/rtc-st-lpc.c rtc->rtc_dev->range_max = U64_MAX; rtc 254 drivers/rtc/rtc-st-lpc.c do_div(rtc->rtc_dev->range_max, rtc->clkrate); rtc 256 drivers/rtc/rtc-st-lpc.c ret = rtc_register_device(rtc->rtc_dev); rtc 258 drivers/rtc/rtc-st-lpc.c clk_disable_unprepare(rtc->clk); rtc 268 drivers/rtc/rtc-st-lpc.c struct st_rtc *rtc = dev_get_drvdata(dev); rtc 273 drivers/rtc/rtc-st-lpc.c writel_relaxed(1, rtc->ioaddr + LPC_WDT_OFF); rtc 274 drivers/rtc/rtc-st-lpc.c writel_relaxed(0, rtc->ioaddr + LPC_LPA_START_OFF); rtc 275 drivers/rtc/rtc-st-lpc.c writel_relaxed(0, rtc->ioaddr + LPC_WDT_OFF); rtc 282 drivers/rtc/rtc-st-lpc.c struct st_rtc *rtc = dev_get_drvdata(dev); rtc 284 drivers/rtc/rtc-st-lpc.c rtc_alarm_irq_enable(rtc->rtc_dev, 0); rtc 290 drivers/rtc/rtc-st-lpc.c memset(&rtc->alarm, 0, sizeof(struct rtc_wkalrm)); rtc 292 drivers/rtc/rtc-st-lpc.c writel_relaxed(0, rtc->ioaddr + LPC_LPA_MSB_OFF); rtc 293 drivers/rtc/rtc-st-lpc.c writel_relaxed(0, rtc->ioaddr + LPC_LPA_LSB_OFF); rtc 294 drivers/rtc/rtc-st-lpc.c writel_relaxed(1, rtc->ioaddr + LPC_WDT_OFF); rtc 295 drivers/rtc/rtc-st-lpc.c writel_relaxed(1, rtc->ioaddr + LPC_LPA_START_OFF); rtc 296 drivers/rtc/rtc-st-lpc.c writel_relaxed(0, rtc->ioaddr + LPC_WDT_OFF); rtc 40 drivers/rtc/rtc-starfire.c struct rtc_device *rtc; rtc 42 drivers/rtc/rtc-starfire.c rtc = devm_rtc_device_register(&pdev->dev, "starfire", rtc 44 drivers/rtc/rtc-starfire.c if (IS_ERR(rtc)) rtc 45 drivers/rtc/rtc-starfire.c return PTR_ERR(rtc); rtc 47 drivers/rtc/rtc-starfire.c platform_set_drvdata(pdev, rtc); rtc 60 drivers/rtc/rtc-stk17ta8.c struct rtc_device *rtc; rtc 204 drivers/rtc/rtc-stk17ta8.c rtc_update_irq(pdata->rtc, 1, events); rtc 311 drivers/rtc/rtc-stk17ta8.c pdata->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 312 drivers/rtc/rtc-stk17ta8.c if (IS_ERR(pdata->rtc)) rtc 313 drivers/rtc/rtc-stk17ta8.c return PTR_ERR(pdata->rtc); rtc 315 drivers/rtc/rtc-stk17ta8.c pdata->rtc->ops = &stk17ta8_rtc_ops; rtc 316 drivers/rtc/rtc-stk17ta8.c pdata->rtc->nvram_old_abi = true; rtc 319 drivers/rtc/rtc-stk17ta8.c ret = rtc_nvmem_register(pdata->rtc, &nvmem_cfg); rtc 323 drivers/rtc/rtc-stk17ta8.c return rtc_register_device(pdata->rtc); rtc 114 drivers/rtc/rtc-stm32.c void (*clear_events)(struct stm32_rtc *rtc, unsigned int flags); rtc 133 drivers/rtc/rtc-stm32.c static void stm32_rtc_wpr_unlock(struct stm32_rtc *rtc) rtc 135 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 137 drivers/rtc/rtc-stm32.c writel_relaxed(RTC_WPR_1ST_KEY, rtc->base + regs->wpr); rtc 138 drivers/rtc/rtc-stm32.c writel_relaxed(RTC_WPR_2ND_KEY, rtc->base + regs->wpr); rtc 141 drivers/rtc/rtc-stm32.c static void stm32_rtc_wpr_lock(struct stm32_rtc *rtc) rtc 143 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 145 drivers/rtc/rtc-stm32.c writel_relaxed(RTC_WPR_WRONG_KEY, rtc->base + regs->wpr); rtc 148 drivers/rtc/rtc-stm32.c static int stm32_rtc_enter_init_mode(struct stm32_rtc *rtc) rtc 150 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 151 drivers/rtc/rtc-stm32.c unsigned int isr = readl_relaxed(rtc->base + regs->isr); rtc 155 drivers/rtc/rtc-stm32.c writel_relaxed(isr, rtc->base + regs->isr); rtc 164 drivers/rtc/rtc-stm32.c rtc->base + regs->isr, rtc 172 drivers/rtc/rtc-stm32.c static void stm32_rtc_exit_init_mode(struct stm32_rtc *rtc) rtc 174 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 175 drivers/rtc/rtc-stm32.c unsigned int isr = readl_relaxed(rtc->base + regs->isr); rtc 178 drivers/rtc/rtc-stm32.c writel_relaxed(isr, rtc->base + regs->isr); rtc 181 drivers/rtc/rtc-stm32.c static int stm32_rtc_wait_sync(struct stm32_rtc *rtc) rtc 183 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 184 drivers/rtc/rtc-stm32.c unsigned int isr = readl_relaxed(rtc->base + regs->isr); rtc 187 drivers/rtc/rtc-stm32.c writel_relaxed(isr, rtc->base + regs->isr); rtc 193 drivers/rtc/rtc-stm32.c return readl_relaxed_poll_timeout_atomic(rtc->base + regs->isr, rtc 199 drivers/rtc/rtc-stm32.c static void stm32_rtc_clear_event_flags(struct stm32_rtc *rtc, rtc 202 drivers/rtc/rtc-stm32.c rtc->data->clear_events(rtc, flags); rtc 207 drivers/rtc/rtc-stm32.c struct stm32_rtc *rtc = (struct stm32_rtc *)dev_id; rtc 208 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 209 drivers/rtc/rtc-stm32.c const struct stm32_rtc_events *evts = &rtc->data->events; rtc 212 drivers/rtc/rtc-stm32.c mutex_lock(&rtc->rtc_dev->ops_lock); rtc 214 drivers/rtc/rtc-stm32.c status = readl_relaxed(rtc->base + regs->sr); rtc 215 drivers/rtc/rtc-stm32.c cr = readl_relaxed(rtc->base + regs->cr); rtc 220 drivers/rtc/rtc-stm32.c dev_dbg(&rtc->rtc_dev->dev, "Alarm occurred\n"); rtc 223 drivers/rtc/rtc-stm32.c rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF); rtc 226 drivers/rtc/rtc-stm32.c stm32_rtc_clear_event_flags(rtc, evts->alra); rtc 229 drivers/rtc/rtc-stm32.c mutex_unlock(&rtc->rtc_dev->ops_lock); rtc 272 drivers/rtc/rtc-stm32.c struct stm32_rtc *rtc = dev_get_drvdata(dev); rtc 273 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 277 drivers/rtc/rtc-stm32.c tr = readl_relaxed(rtc->base + regs->tr); rtc 278 drivers/rtc/rtc-stm32.c dr = readl_relaxed(rtc->base + regs->dr); rtc 298 drivers/rtc/rtc-stm32.c struct stm32_rtc *rtc = dev_get_drvdata(dev); rtc 299 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 316 drivers/rtc/rtc-stm32.c stm32_rtc_wpr_unlock(rtc); rtc 318 drivers/rtc/rtc-stm32.c ret = stm32_rtc_enter_init_mode(rtc); rtc 324 drivers/rtc/rtc-stm32.c writel_relaxed(tr, rtc->base + regs->tr); rtc 325 drivers/rtc/rtc-stm32.c writel_relaxed(dr, rtc->base + regs->dr); rtc 327 drivers/rtc/rtc-stm32.c stm32_rtc_exit_init_mode(rtc); rtc 329 drivers/rtc/rtc-stm32.c ret = stm32_rtc_wait_sync(rtc); rtc 331 drivers/rtc/rtc-stm32.c stm32_rtc_wpr_lock(rtc); rtc 338 drivers/rtc/rtc-stm32.c struct stm32_rtc *rtc = dev_get_drvdata(dev); rtc 339 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 340 drivers/rtc/rtc-stm32.c const struct stm32_rtc_events *evts = &rtc->data->events; rtc 344 drivers/rtc/rtc-stm32.c alrmar = readl_relaxed(rtc->base + regs->alrmar); rtc 345 drivers/rtc/rtc-stm32.c cr = readl_relaxed(rtc->base + regs->cr); rtc 346 drivers/rtc/rtc-stm32.c status = readl_relaxed(rtc->base + regs->sr); rtc 406 drivers/rtc/rtc-stm32.c struct stm32_rtc *rtc = dev_get_drvdata(dev); rtc 407 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 408 drivers/rtc/rtc-stm32.c const struct stm32_rtc_events *evts = &rtc->data->events; rtc 411 drivers/rtc/rtc-stm32.c cr = readl_relaxed(rtc->base + regs->cr); rtc 413 drivers/rtc/rtc-stm32.c stm32_rtc_wpr_unlock(rtc); rtc 420 drivers/rtc/rtc-stm32.c writel_relaxed(cr, rtc->base + regs->cr); rtc 423 drivers/rtc/rtc-stm32.c stm32_rtc_clear_event_flags(rtc, evts->alra); rtc 425 drivers/rtc/rtc-stm32.c stm32_rtc_wpr_lock(rtc); rtc 430 drivers/rtc/rtc-stm32.c static int stm32_rtc_valid_alrm(struct stm32_rtc *rtc, struct rtc_time *tm) rtc 432 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 434 drivers/rtc/rtc-stm32.c unsigned int dr = readl_relaxed(rtc->base + regs->dr); rtc 435 drivers/rtc/rtc-stm32.c unsigned int tr = readl_relaxed(rtc->base + regs->tr); rtc 468 drivers/rtc/rtc-stm32.c struct stm32_rtc *rtc = dev_get_drvdata(dev); rtc 469 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 480 drivers/rtc/rtc-stm32.c if (stm32_rtc_valid_alrm(rtc, tm) < 0) { rtc 498 drivers/rtc/rtc-stm32.c stm32_rtc_wpr_unlock(rtc); rtc 501 drivers/rtc/rtc-stm32.c cr = readl_relaxed(rtc->base + regs->cr); rtc 503 drivers/rtc/rtc-stm32.c writel_relaxed(cr, rtc->base + regs->cr); rtc 509 drivers/rtc/rtc-stm32.c ret = readl_relaxed_poll_timeout_atomic(rtc->base + regs->isr, rtc 520 drivers/rtc/rtc-stm32.c writel_relaxed(alrmar, rtc->base + regs->alrmar); rtc 524 drivers/rtc/rtc-stm32.c stm32_rtc_wpr_lock(rtc); rtc 537 drivers/rtc/rtc-stm32.c static void stm32_rtc_clear_events(struct stm32_rtc *rtc, rtc 540 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 543 drivers/rtc/rtc-stm32.c writel_relaxed(readl_relaxed(rtc->base + regs->isr) & ~flags, rtc 544 drivers/rtc/rtc-stm32.c rtc->base + regs->isr); rtc 591 drivers/rtc/rtc-stm32.c static void stm32mp1_rtc_clear_events(struct stm32_rtc *rtc, rtc 594 drivers/rtc/rtc-stm32.c struct stm32_rtc_registers regs = rtc->data->regs; rtc 597 drivers/rtc/rtc-stm32.c writel_relaxed(flags, rtc->base + regs.scr); rtc 631 drivers/rtc/rtc-stm32.c struct stm32_rtc *rtc) rtc 633 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 638 drivers/rtc/rtc-stm32.c rate = clk_get_rate(rtc->rtc_ck); rtc 664 drivers/rtc/rtc-stm32.c stm32_rtc_wpr_unlock(rtc); rtc 666 drivers/rtc/rtc-stm32.c ret = stm32_rtc_enter_init_mode(rtc); rtc 674 drivers/rtc/rtc-stm32.c writel_relaxed(prer, rtc->base + regs->prer); rtc 676 drivers/rtc/rtc-stm32.c writel_relaxed(prer, rtc->base + regs->prer); rtc 679 drivers/rtc/rtc-stm32.c cr = readl_relaxed(rtc->base + regs->cr); rtc 681 drivers/rtc/rtc-stm32.c writel_relaxed(cr, rtc->base + regs->cr); rtc 683 drivers/rtc/rtc-stm32.c stm32_rtc_exit_init_mode(rtc); rtc 685 drivers/rtc/rtc-stm32.c ret = stm32_rtc_wait_sync(rtc); rtc 687 drivers/rtc/rtc-stm32.c stm32_rtc_wpr_lock(rtc); rtc 694 drivers/rtc/rtc-stm32.c struct stm32_rtc *rtc; rtc 699 drivers/rtc/rtc-stm32.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 700 drivers/rtc/rtc-stm32.c if (!rtc) rtc 704 drivers/rtc/rtc-stm32.c rtc->base = devm_ioremap_resource(&pdev->dev, res); rtc 705 drivers/rtc/rtc-stm32.c if (IS_ERR(rtc->base)) rtc 706 drivers/rtc/rtc-stm32.c return PTR_ERR(rtc->base); rtc 708 drivers/rtc/rtc-stm32.c rtc->data = (struct stm32_rtc_data *) rtc 710 drivers/rtc/rtc-stm32.c regs = &rtc->data->regs; rtc 712 drivers/rtc/rtc-stm32.c if (rtc->data->need_dbp) { rtc 713 drivers/rtc/rtc-stm32.c rtc->dbp = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, rtc 715 drivers/rtc/rtc-stm32.c if (IS_ERR(rtc->dbp)) { rtc 717 drivers/rtc/rtc-stm32.c return PTR_ERR(rtc->dbp); rtc 721 drivers/rtc/rtc-stm32.c 1, &rtc->dbp_reg); rtc 728 drivers/rtc/rtc-stm32.c 2, &rtc->dbp_mask); rtc 735 drivers/rtc/rtc-stm32.c if (!rtc->data->has_pclk) { rtc 736 drivers/rtc/rtc-stm32.c rtc->pclk = NULL; rtc 737 drivers/rtc/rtc-stm32.c rtc->rtc_ck = devm_clk_get(&pdev->dev, NULL); rtc 739 drivers/rtc/rtc-stm32.c rtc->pclk = devm_clk_get(&pdev->dev, "pclk"); rtc 740 drivers/rtc/rtc-stm32.c if (IS_ERR(rtc->pclk)) { rtc 742 drivers/rtc/rtc-stm32.c return PTR_ERR(rtc->pclk); rtc 744 drivers/rtc/rtc-stm32.c rtc->rtc_ck = devm_clk_get(&pdev->dev, "rtc_ck"); rtc 746 drivers/rtc/rtc-stm32.c if (IS_ERR(rtc->rtc_ck)) { rtc 748 drivers/rtc/rtc-stm32.c return PTR_ERR(rtc->rtc_ck); rtc 751 drivers/rtc/rtc-stm32.c if (rtc->data->has_pclk) { rtc 752 drivers/rtc/rtc-stm32.c ret = clk_prepare_enable(rtc->pclk); rtc 757 drivers/rtc/rtc-stm32.c ret = clk_prepare_enable(rtc->rtc_ck); rtc 761 drivers/rtc/rtc-stm32.c if (rtc->data->need_dbp) rtc 762 drivers/rtc/rtc-stm32.c regmap_update_bits(rtc->dbp, rtc->dbp_reg, rtc 763 drivers/rtc/rtc-stm32.c rtc->dbp_mask, rtc->dbp_mask); rtc 773 drivers/rtc/rtc-stm32.c ret = stm32_rtc_init(pdev, rtc); rtc 777 drivers/rtc/rtc-stm32.c rtc->irq_alarm = platform_get_irq(pdev, 0); rtc 778 drivers/rtc/rtc-stm32.c if (rtc->irq_alarm <= 0) { rtc 779 drivers/rtc/rtc-stm32.c ret = rtc->irq_alarm; rtc 784 drivers/rtc/rtc-stm32.c if (rtc->data->has_wakeirq) { rtc 785 drivers/rtc/rtc-stm32.c rtc->wakeirq_alarm = platform_get_irq(pdev, 1); rtc 786 drivers/rtc/rtc-stm32.c if (rtc->wakeirq_alarm > 0) { rtc 788 drivers/rtc/rtc-stm32.c rtc->wakeirq_alarm); rtc 790 drivers/rtc/rtc-stm32.c ret = rtc->wakeirq_alarm; rtc 791 drivers/rtc/rtc-stm32.c if (rtc->wakeirq_alarm == -EPROBE_DEFER) rtc 798 drivers/rtc/rtc-stm32.c platform_set_drvdata(pdev, rtc); rtc 800 drivers/rtc/rtc-stm32.c rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 802 drivers/rtc/rtc-stm32.c if (IS_ERR(rtc->rtc_dev)) { rtc 803 drivers/rtc/rtc-stm32.c ret = PTR_ERR(rtc->rtc_dev); rtc 810 drivers/rtc/rtc-stm32.c ret = devm_request_threaded_irq(&pdev->dev, rtc->irq_alarm, NULL, rtc 812 drivers/rtc/rtc-stm32.c pdev->name, rtc); rtc 815 drivers/rtc/rtc-stm32.c rtc->irq_alarm); rtc 823 drivers/rtc/rtc-stm32.c if (!(readl_relaxed(rtc->base + regs->isr) & STM32_RTC_ISR_INITS)) rtc 827 drivers/rtc/rtc-stm32.c u32 ver = readl_relaxed(rtc->base + regs->verr); rtc 836 drivers/rtc/rtc-stm32.c if (rtc->data->has_pclk) rtc 837 drivers/rtc/rtc-stm32.c clk_disable_unprepare(rtc->pclk); rtc 838 drivers/rtc/rtc-stm32.c clk_disable_unprepare(rtc->rtc_ck); rtc 840 drivers/rtc/rtc-stm32.c if (rtc->data->need_dbp) rtc 841 drivers/rtc/rtc-stm32.c regmap_update_bits(rtc->dbp, rtc->dbp_reg, rtc->dbp_mask, 0); rtc 851 drivers/rtc/rtc-stm32.c struct stm32_rtc *rtc = platform_get_drvdata(pdev); rtc 852 drivers/rtc/rtc-stm32.c const struct stm32_rtc_registers *regs = &rtc->data->regs; rtc 856 drivers/rtc/rtc-stm32.c stm32_rtc_wpr_unlock(rtc); rtc 857 drivers/rtc/rtc-stm32.c cr = readl_relaxed(rtc->base + regs->cr); rtc 859 drivers/rtc/rtc-stm32.c writel_relaxed(cr, rtc->base + regs->cr); rtc 860 drivers/rtc/rtc-stm32.c stm32_rtc_wpr_lock(rtc); rtc 862 drivers/rtc/rtc-stm32.c clk_disable_unprepare(rtc->rtc_ck); rtc 863 drivers/rtc/rtc-stm32.c if (rtc->data->has_pclk) rtc 864 drivers/rtc/rtc-stm32.c clk_disable_unprepare(rtc->pclk); rtc 867 drivers/rtc/rtc-stm32.c if (rtc->data->need_dbp) rtc 868 drivers/rtc/rtc-stm32.c regmap_update_bits(rtc->dbp, rtc->dbp_reg, rtc->dbp_mask, 0); rtc 879 drivers/rtc/rtc-stm32.c struct stm32_rtc *rtc = dev_get_drvdata(dev); rtc 881 drivers/rtc/rtc-stm32.c if (rtc->data->has_pclk) rtc 882 drivers/rtc/rtc-stm32.c clk_disable_unprepare(rtc->pclk); rtc 885 drivers/rtc/rtc-stm32.c return enable_irq_wake(rtc->irq_alarm); rtc 892 drivers/rtc/rtc-stm32.c struct stm32_rtc *rtc = dev_get_drvdata(dev); rtc 895 drivers/rtc/rtc-stm32.c if (rtc->data->has_pclk) { rtc 896 drivers/rtc/rtc-stm32.c ret = clk_prepare_enable(rtc->pclk); rtc 901 drivers/rtc/rtc-stm32.c ret = stm32_rtc_wait_sync(rtc); rtc 906 drivers/rtc/rtc-stm32.c return disable_irq_wake(rtc->irq_alarm); rtc 58 drivers/rtc/rtc-stmp3xxx.c struct rtc_device *rtc; rtc 176 drivers/rtc/rtc-stmp3xxx.c rtc_update_irq(rtc_data->rtc, 1, RTC_AF | RTC_IRQF); rtc 354 drivers/rtc/rtc-stmp3xxx.c rtc_data->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 355 drivers/rtc/rtc-stmp3xxx.c if (IS_ERR(rtc_data->rtc)) rtc 356 drivers/rtc/rtc-stmp3xxx.c return PTR_ERR(rtc_data->rtc); rtc 366 drivers/rtc/rtc-stmp3xxx.c rtc_data->rtc->ops = &stmp3xxx_rtc_ops; rtc 367 drivers/rtc/rtc-stmp3xxx.c rtc_data->rtc->range_max = U32_MAX; rtc 369 drivers/rtc/rtc-stmp3xxx.c err = rtc_register_device(rtc_data->rtc); rtc 79 drivers/rtc/rtc-sun4v.c struct rtc_device *rtc; rtc 81 drivers/rtc/rtc-sun4v.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 82 drivers/rtc/rtc-sun4v.c if (IS_ERR(rtc)) rtc 83 drivers/rtc/rtc-sun4v.c return PTR_ERR(rtc); rtc 85 drivers/rtc/rtc-sun4v.c rtc->ops = &sun4v_rtc_ops; rtc 86 drivers/rtc/rtc-sun4v.c rtc->range_max = U64_MAX; rtc 87 drivers/rtc/rtc-sun4v.c platform_set_drvdata(pdev, rtc); rtc 89 drivers/rtc/rtc-sun4v.c return rtc_register_device(rtc); rtc 138 drivers/rtc/rtc-sun6i.c struct rtc_device *rtc; rtc 158 drivers/rtc/rtc-sun6i.c struct sun6i_rtc_dev *rtc = container_of(hw, struct sun6i_rtc_dev, hw); rtc 161 drivers/rtc/rtc-sun6i.c val = readl(rtc->base + SUN6I_LOSC_CTRL); rtc 165 drivers/rtc/rtc-sun6i.c if (rtc->data->fixed_prescaler) rtc 166 drivers/rtc/rtc-sun6i.c parent_rate /= rtc->data->fixed_prescaler; rtc 168 drivers/rtc/rtc-sun6i.c if (rtc->data->has_prescaler) { rtc 169 drivers/rtc/rtc-sun6i.c val = readl(rtc->base + SUN6I_LOSC_CLK_PRESCAL); rtc 178 drivers/rtc/rtc-sun6i.c struct sun6i_rtc_dev *rtc = container_of(hw, struct sun6i_rtc_dev, hw); rtc 180 drivers/rtc/rtc-sun6i.c return readl(rtc->base + SUN6I_LOSC_CTRL) & SUN6I_LOSC_CTRL_EXT_OSC; rtc 185 drivers/rtc/rtc-sun6i.c struct sun6i_rtc_dev *rtc = container_of(hw, struct sun6i_rtc_dev, hw); rtc 192 drivers/rtc/rtc-sun6i.c spin_lock_irqsave(&rtc->lock, flags); rtc 193 drivers/rtc/rtc-sun6i.c val = readl(rtc->base + SUN6I_LOSC_CTRL); rtc 197 drivers/rtc/rtc-sun6i.c if (rtc->data->has_losc_en) { rtc 201 drivers/rtc/rtc-sun6i.c writel(val, rtc->base + SUN6I_LOSC_CTRL); rtc 202 drivers/rtc/rtc-sun6i.c spin_unlock_irqrestore(&rtc->lock, flags); rtc 218 drivers/rtc/rtc-sun6i.c struct sun6i_rtc_dev *rtc; rtc 228 drivers/rtc/rtc-sun6i.c rtc = kzalloc(sizeof(*rtc), GFP_KERNEL); rtc 229 drivers/rtc/rtc-sun6i.c if (!rtc) rtc 232 drivers/rtc/rtc-sun6i.c rtc->data = data; rtc 235 drivers/rtc/rtc-sun6i.c kfree(rtc); rtc 239 drivers/rtc/rtc-sun6i.c spin_lock_init(&rtc->lock); rtc 241 drivers/rtc/rtc-sun6i.c rtc->base = of_io_request_and_map(node, 0, of_node_full_name(node)); rtc 242 drivers/rtc/rtc-sun6i.c if (IS_ERR(rtc->base)) { rtc 248 drivers/rtc/rtc-sun6i.c if (rtc->data->has_auto_swt) { rtc 251 drivers/rtc/rtc-sun6i.c writel(reg, rtc->base + SUN6I_LOSC_CTRL); rtc 256 drivers/rtc/rtc-sun6i.c if (rtc->data->has_losc_en) rtc 258 drivers/rtc/rtc-sun6i.c writel(reg, rtc->base + SUN6I_LOSC_CTRL); rtc 261 drivers/rtc/rtc-sun6i.c sun6i_rtc = rtc; rtc 268 drivers/rtc/rtc-sun6i.c if (rtc->data->export_iosc) rtc 272 drivers/rtc/rtc-sun6i.c rtc->int_osc = clk_hw_register_fixed_rate_with_accuracy(NULL, rtc 275 drivers/rtc/rtc-sun6i.c rtc->data->rc_osc_rate, rtc 277 drivers/rtc/rtc-sun6i.c if (IS_ERR(rtc->int_osc)) { rtc 282 drivers/rtc/rtc-sun6i.c parents[0] = clk_hw_get_name(rtc->int_osc); rtc 285 drivers/rtc/rtc-sun6i.c rtc->hw.init = &init; rtc 292 drivers/rtc/rtc-sun6i.c rtc->losc = clk_register(NULL, &rtc->hw); rtc 293 drivers/rtc/rtc-sun6i.c if (IS_ERR(rtc->losc)) { rtc 300 drivers/rtc/rtc-sun6i.c rtc->ext_losc = clk_register_gate(NULL, clkout_name, init.name, rtc 301 drivers/rtc/rtc-sun6i.c 0, rtc->base + SUN6I_LOSC_OUT_GATING, rtc 303 drivers/rtc/rtc-sun6i.c &rtc->lock); rtc 304 drivers/rtc/rtc-sun6i.c if (IS_ERR(rtc->ext_losc)) { rtc 310 drivers/rtc/rtc-sun6i.c clk_data->hws[0] = &rtc->hw; rtc 311 drivers/rtc/rtc-sun6i.c clk_data->hws[1] = __clk_get_hw(rtc->ext_losc); rtc 312 drivers/rtc/rtc-sun6i.c if (rtc->data->export_iosc) { rtc 313 drivers/rtc/rtc-sun6i.c clk_data->hws[2] = rtc->int_osc; rtc 424 drivers/rtc/rtc-sun6i.c rtc_update_irq(chip->rtc, 1, RTC_AF | RTC_IRQF); rtc 731 drivers/rtc/rtc-sun6i.c chip->rtc = devm_rtc_device_register(&pdev->dev, "rtc-sun6i", rtc 733 drivers/rtc/rtc-sun6i.c if (IS_ERR(chip->rtc)) { rtc 735 drivers/rtc/rtc-sun6i.c return PTR_ERR(chip->rtc); rtc 139 drivers/rtc/rtc-sunxi.c struct rtc_device *rtc; rtc 157 drivers/rtc/rtc-sunxi.c rtc_update_irq(chip->rtc, 1, RTC_AF | RTC_IRQF); rtc 435 drivers/rtc/rtc-sunxi.c chip->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 436 drivers/rtc/rtc-sunxi.c if (IS_ERR(chip->rtc)) rtc 437 drivers/rtc/rtc-sunxi.c return PTR_ERR(chip->rtc); rtc 473 drivers/rtc/rtc-sunxi.c chip->rtc->ops = &sunxi_rtc_ops; rtc 475 drivers/rtc/rtc-sunxi.c return rtc_register_device(chip->rtc); rtc 50 drivers/rtc/rtc-tegra.c struct rtc_device *rtc; rtc 257 drivers/rtc/rtc-tegra.c rtc_update_irq(info->rtc, 1, events); rtc 298 drivers/rtc/rtc-tegra.c info->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 299 drivers/rtc/rtc-tegra.c if (IS_ERR(info->rtc)) rtc 300 drivers/rtc/rtc-tegra.c return PTR_ERR(info->rtc); rtc 302 drivers/rtc/rtc-tegra.c info->rtc->ops = &tegra_rtc_ops; rtc 303 drivers/rtc/rtc-tegra.c info->rtc->range_max = U32_MAX; rtc 334 drivers/rtc/rtc-tegra.c ret = rtc_register_device(info->rtc); rtc 16 drivers/rtc/rtc-test.c struct rtc_device *rtc; rtc 113 drivers/rtc/rtc-test.c rtc_update_irq(rtd->rtc, 1, RTC_AF | RTC_IRQF); rtc 126 drivers/rtc/rtc-test.c rtd->rtc = devm_rtc_allocate_device(&plat_dev->dev); rtc 127 drivers/rtc/rtc-test.c if (IS_ERR(rtd->rtc)) rtc 128 drivers/rtc/rtc-test.c return PTR_ERR(rtd->rtc); rtc 132 drivers/rtc/rtc-test.c rtd->rtc->ops = &test_rtc_ops_noalm; rtc 135 drivers/rtc/rtc-test.c rtd->rtc->ops = &test_rtc_ops; rtc 142 drivers/rtc/rtc-test.c return rtc_register_device(rtd->rtc); rtc 58 drivers/rtc/rtc-tps6586x.c struct rtc_device *rtc; rtc 136 drivers/rtc/rtc-tps6586x.c struct tps6586x_rtc *rtc = dev_get_drvdata(dev); rtc 138 drivers/rtc/rtc-tps6586x.c if (enabled && !rtc->irq_en) { rtc 139 drivers/rtc/rtc-tps6586x.c enable_irq(rtc->irq); rtc 140 drivers/rtc/rtc-tps6586x.c rtc->irq_en = true; rtc 141 drivers/rtc/rtc-tps6586x.c } else if (!enabled && rtc->irq_en) { rtc 142 drivers/rtc/rtc-tps6586x.c disable_irq(rtc->irq); rtc 143 drivers/rtc/rtc-tps6586x.c rtc->irq_en = false; rtc 227 drivers/rtc/rtc-tps6586x.c struct tps6586x_rtc *rtc = data; rtc 229 drivers/rtc/rtc-tps6586x.c rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF); rtc 236 drivers/rtc/rtc-tps6586x.c struct tps6586x_rtc *rtc; rtc 239 drivers/rtc/rtc-tps6586x.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 240 drivers/rtc/rtc-tps6586x.c if (!rtc) rtc 243 drivers/rtc/rtc-tps6586x.c rtc->dev = &pdev->dev; rtc 244 drivers/rtc/rtc-tps6586x.c rtc->irq = platform_get_irq(pdev, 0); rtc 258 drivers/rtc/rtc-tps6586x.c platform_set_drvdata(pdev, rtc); rtc 259 drivers/rtc/rtc-tps6586x.c rtc->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 260 drivers/rtc/rtc-tps6586x.c if (IS_ERR(rtc->rtc)) { rtc 261 drivers/rtc/rtc-tps6586x.c ret = PTR_ERR(rtc->rtc); rtc 265 drivers/rtc/rtc-tps6586x.c rtc->rtc->ops = &tps6586x_rtc_ops; rtc 266 drivers/rtc/rtc-tps6586x.c rtc->rtc->range_max = (1ULL << 30) - 1; /* 30-bit seconds */ rtc 267 drivers/rtc/rtc-tps6586x.c rtc->rtc->start_secs = mktime64(2009, 1, 1, 0, 0, 0); rtc 268 drivers/rtc/rtc-tps6586x.c rtc->rtc->set_start_time = true; rtc 270 drivers/rtc/rtc-tps6586x.c ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL, rtc 273 drivers/rtc/rtc-tps6586x.c dev_name(&pdev->dev), rtc); rtc 276 drivers/rtc/rtc-tps6586x.c rtc->irq, ret); rtc 279 drivers/rtc/rtc-tps6586x.c disable_irq(rtc->irq); rtc 281 drivers/rtc/rtc-tps6586x.c ret = rtc_register_device(rtc->rtc); rtc 305 drivers/rtc/rtc-tps6586x.c struct tps6586x_rtc *rtc = dev_get_drvdata(dev); rtc 308 drivers/rtc/rtc-tps6586x.c enable_irq_wake(rtc->irq); rtc 314 drivers/rtc/rtc-tps6586x.c struct tps6586x_rtc *rtc = dev_get_drvdata(dev); rtc 317 drivers/rtc/rtc-tps6586x.c disable_irq_wake(rtc->irq); rtc 26 drivers/rtc/rtc-tps65910.c struct rtc_device *rtc; rtc 328 drivers/rtc/rtc-tps65910.c static irqreturn_t tps65910_rtc_interrupt(int irq, void *rtc) rtc 330 drivers/rtc/rtc-tps65910.c struct device *dev = rtc; rtc 349 drivers/rtc/rtc-tps65910.c rtc_update_irq(tps_rtc->rtc, 1, events); rtc 379 drivers/rtc/rtc-tps65910.c tps_rtc->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 380 drivers/rtc/rtc-tps65910.c if (IS_ERR(tps_rtc->rtc)) rtc 381 drivers/rtc/rtc-tps65910.c return PTR_ERR(tps_rtc->rtc); rtc 424 drivers/rtc/rtc-tps65910.c tps_rtc->rtc->ops = &tps65910_rtc_ops; rtc 425 drivers/rtc/rtc-tps65910.c tps_rtc->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 426 drivers/rtc/rtc-tps65910.c tps_rtc->rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 428 drivers/rtc/rtc-tps65910.c return rtc_register_device(tps_rtc->rtc); rtc 63 drivers/rtc/rtc-tps80031.c struct rtc_device *rtc; rtc 187 drivers/rtc/rtc-tps80031.c static int clear_alarm_int_status(struct device *dev, struct tps80031_rtc *rtc) rtc 217 drivers/rtc/rtc-tps80031.c struct tps80031_rtc *rtc = dev_get_drvdata(dev); rtc 220 drivers/rtc/rtc-tps80031.c ret = clear_alarm_int_status(dev, rtc); rtc 224 drivers/rtc/rtc-tps80031.c rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF); rtc 238 drivers/rtc/rtc-tps80031.c struct tps80031_rtc *rtc; rtc 242 drivers/rtc/rtc-tps80031.c rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); rtc 243 drivers/rtc/rtc-tps80031.c if (!rtc) rtc 246 drivers/rtc/rtc-tps80031.c rtc->irq = platform_get_irq(pdev, 0); rtc 247 drivers/rtc/rtc-tps80031.c platform_set_drvdata(pdev, rtc); rtc 274 drivers/rtc/rtc-tps80031.c ret = clear_alarm_int_status(&pdev->dev, rtc); rtc 280 drivers/rtc/rtc-tps80031.c rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 282 drivers/rtc/rtc-tps80031.c if (IS_ERR(rtc->rtc)) { rtc 283 drivers/rtc/rtc-tps80031.c ret = PTR_ERR(rtc->rtc); rtc 288 drivers/rtc/rtc-tps80031.c ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL, rtc 291 drivers/rtc/rtc-tps80031.c dev_name(&pdev->dev), rtc); rtc 294 drivers/rtc/rtc-tps80031.c rtc->irq, ret); rtc 304 drivers/rtc/rtc-tps80031.c struct tps80031_rtc *rtc = dev_get_drvdata(dev); rtc 307 drivers/rtc/rtc-tps80031.c enable_irq_wake(rtc->irq); rtc 313 drivers/rtc/rtc-tps80031.c struct tps80031_rtc *rtc = dev_get_drvdata(dev); rtc 316 drivers/rtc/rtc-tps80031.c disable_irq_wake(rtc->irq); rtc 141 drivers/rtc/rtc-twl.c struct rtc_device *rtc; rtc 475 drivers/rtc/rtc-twl.c rtc_update_irq(twl_rtc->rtc, 1, events); rtc 565 drivers/rtc/rtc-twl.c twl_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc 567 drivers/rtc/rtc-twl.c if (IS_ERR(twl_rtc->rtc)) { rtc 569 drivers/rtc/rtc-twl.c PTR_ERR(twl_rtc->rtc)); rtc 570 drivers/rtc/rtc-twl.c return PTR_ERR(twl_rtc->rtc); rtc 576 drivers/rtc/rtc-twl.c dev_name(&twl_rtc->rtc->dev), twl_rtc); rtc 40 drivers/rtc/rtc-tx4939.c struct rtc_device *rtc; rtc 190 drivers/rtc/rtc-tx4939.c rtc_update_irq(pdata->rtc, 1, events); rtc 237 drivers/rtc/rtc-tx4939.c struct rtc_device *rtc; rtc 266 drivers/rtc/rtc-tx4939.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 267 drivers/rtc/rtc-tx4939.c if (IS_ERR(rtc)) rtc 268 drivers/rtc/rtc-tx4939.c return PTR_ERR(rtc); rtc 270 drivers/rtc/rtc-tx4939.c rtc->ops = &tx4939_rtc_ops; rtc 271 drivers/rtc/rtc-tx4939.c rtc->nvram_old_abi = true; rtc 272 drivers/rtc/rtc-tx4939.c rtc->range_max = U32_MAX; rtc 274 drivers/rtc/rtc-tx4939.c pdata->rtc = rtc; rtc 277 drivers/rtc/rtc-tx4939.c ret = rtc_nvmem_register(rtc, &nvmem_cfg); rtc 281 drivers/rtc/rtc-tx4939.c return rtc_register_device(rtc); rtc 58 drivers/rtc/rtc-v3020.c struct rtc_device *rtc; rtc 333 drivers/rtc/rtc-v3020.c chip->rtc = devm_rtc_device_register(&pdev->dev, "v3020", rtc 335 drivers/rtc/rtc-v3020.c if (IS_ERR(chip->rtc)) { rtc 336 drivers/rtc/rtc-v3020.c retval = PTR_ERR(chip->rtc); rtc 216 drivers/rtc/rtc-vr41xx.c struct rtc_device *rtc = platform_get_drvdata(pdev); rtc 220 drivers/rtc/rtc-vr41xx.c rtc_update_irq(rtc, 1, RTC_AF); rtc 228 drivers/rtc/rtc-vr41xx.c struct rtc_device *rtc = platform_get_drvdata(pdev); rtc 236 drivers/rtc/rtc-vr41xx.c rtc_update_irq(rtc, 1, RTC_PF); rtc 253 drivers/rtc/rtc-vr41xx.c struct rtc_device *rtc; rtc 279 drivers/rtc/rtc-vr41xx.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 280 drivers/rtc/rtc-vr41xx.c if (IS_ERR(rtc)) { rtc 281 drivers/rtc/rtc-vr41xx.c retval = PTR_ERR(rtc); rtc 285 drivers/rtc/rtc-vr41xx.c rtc->ops = &vr41xx_rtc_ops; rtc 288 drivers/rtc/rtc-vr41xx.c rtc->range_max = (1ULL << 33) - 1; rtc 289 drivers/rtc/rtc-vr41xx.c rtc->max_user_freq = MAX_PERIODIC_RATE; rtc 323 drivers/rtc/rtc-vr41xx.c platform_set_drvdata(pdev, rtc); rtc 330 drivers/rtc/rtc-vr41xx.c retval = rtc_register_device(rtc); rtc 75 drivers/rtc/rtc-vt8500.c struct rtc_device *rtc; rtc 96 drivers/rtc/rtc-vt8500.c rtc_update_irq(vt8500_rtc->rtc, 1, events); rtc 227 drivers/rtc/rtc-vt8500.c vt8500_rtc->rtc = devm_rtc_device_register(&pdev->dev, "vt8500-rtc", rtc 229 drivers/rtc/rtc-vt8500.c if (IS_ERR(vt8500_rtc->rtc)) { rtc 230 drivers/rtc/rtc-vt8500.c ret = PTR_ERR(vt8500_rtc->rtc); rtc 92 drivers/rtc/rtc-wilco-ec.c struct ec_rtc_read_response rtc; rtc 100 drivers/rtc/rtc-wilco-ec.c msg.response_data = &rtc; rtc 101 drivers/rtc/rtc-wilco-ec.c msg.response_size = sizeof(rtc); rtc 107 drivers/rtc/rtc-wilco-ec.c tm->tm_sec = rtc.second; rtc 108 drivers/rtc/rtc-wilco-ec.c tm->tm_min = rtc.minute; rtc 109 drivers/rtc/rtc-wilco-ec.c tm->tm_hour = rtc.hour; rtc 110 drivers/rtc/rtc-wilco-ec.c tm->tm_mday = rtc.day; rtc 111 drivers/rtc/rtc-wilco-ec.c tm->tm_mon = rtc.month - 1; rtc 112 drivers/rtc/rtc-wilco-ec.c tm->tm_year = rtc.year + (rtc.century * 100) - 1900; rtc 124 drivers/rtc/rtc-wilco-ec.c struct ec_rtc_write_request rtc; rtc 135 drivers/rtc/rtc-wilco-ec.c rtc.command = EC_COMMAND_CMOS; rtc 136 drivers/rtc/rtc-wilco-ec.c rtc.param = EC_CMOS_TOD_WRITE; rtc 137 drivers/rtc/rtc-wilco-ec.c rtc.century = bin2bcd(year / 100); rtc 138 drivers/rtc/rtc-wilco-ec.c rtc.year = bin2bcd(year % 100); rtc 139 drivers/rtc/rtc-wilco-ec.c rtc.month = bin2bcd(tm->tm_mon + 1); rtc 140 drivers/rtc/rtc-wilco-ec.c rtc.day = bin2bcd(tm->tm_mday); rtc 141 drivers/rtc/rtc-wilco-ec.c rtc.hour = bin2bcd(tm->tm_hour); rtc 142 drivers/rtc/rtc-wilco-ec.c rtc.minute = bin2bcd(tm->tm_min); rtc 143 drivers/rtc/rtc-wilco-ec.c rtc.second = bin2bcd(tm->tm_sec); rtc 144 drivers/rtc/rtc-wilco-ec.c rtc.weekday = bin2bcd(wday); rtc 148 drivers/rtc/rtc-wilco-ec.c msg.request_data = &rtc; rtc 149 drivers/rtc/rtc-wilco-ec.c msg.request_size = sizeof(rtc); rtc 165 drivers/rtc/rtc-wilco-ec.c struct rtc_device *rtc; rtc 167 drivers/rtc/rtc-wilco-ec.c rtc = devm_rtc_allocate_device(&pdev->dev); rtc 168 drivers/rtc/rtc-wilco-ec.c if (IS_ERR(rtc)) rtc 169 drivers/rtc/rtc-wilco-ec.c return PTR_ERR(rtc); rtc 171 drivers/rtc/rtc-wilco-ec.c rtc->ops = &wilco_ec_rtc_ops; rtc 173 drivers/rtc/rtc-wilco-ec.c rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rtc 174 drivers/rtc/rtc-wilco-ec.c rtc->range_max = RTC_TIMESTAMP_END_2099; rtc 175 drivers/rtc/rtc-wilco-ec.c rtc->owner = THIS_MODULE; rtc 177 drivers/rtc/rtc-wilco-ec.c return rtc_register_device(rtc); rtc 91 drivers/rtc/rtc-wm831x.c struct rtc_device *rtc; rtc 332 drivers/rtc/rtc-wm831x.c rtc_update_irq(wm831x_rtc->rtc, 1, RTC_IRQF | RTC_AF); rtc 425 drivers/rtc/rtc-wm831x.c wm831x_rtc->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 426 drivers/rtc/rtc-wm831x.c if (IS_ERR(wm831x_rtc->rtc)) rtc 427 drivers/rtc/rtc-wm831x.c return PTR_ERR(wm831x_rtc->rtc); rtc 429 drivers/rtc/rtc-wm831x.c wm831x_rtc->rtc->ops = &wm831x_rtc_ops; rtc 430 drivers/rtc/rtc-wm831x.c wm831x_rtc->rtc->range_max = U32_MAX; rtc 432 drivers/rtc/rtc-wm831x.c ret = rtc_register_device(wm831x_rtc->rtc); rtc 301 drivers/rtc/rtc-wm8350.c struct rtc_device *rtc = wm8350->rtc.rtc; rtc 304 drivers/rtc/rtc-wm8350.c rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF); rtc 310 drivers/rtc/rtc-wm8350.c dev_err(&(wm8350->rtc.pdev->dev), rtc 320 drivers/rtc/rtc-wm8350.c struct rtc_device *rtc = wm8350->rtc.rtc; rtc 322 drivers/rtc/rtc-wm8350.c rtc_update_irq(rtc, 1, RTC_IRQF | RTC_UF); rtc 344 drivers/rtc/rtc-wm8350.c if (device_may_wakeup(&wm8350->rtc.pdev->dev) && rtc 359 drivers/rtc/rtc-wm8350.c if (wm8350->rtc.alarm_enabled) { rtc 372 drivers/rtc/rtc-wm8350.c struct wm8350_rtc *wm_rtc = &wm8350->rtc; rtc 427 drivers/rtc/rtc-wm8350.c wm_rtc->rtc = devm_rtc_device_register(&pdev->dev, "wm8350", rtc 429 drivers/rtc/rtc-wm8350.c if (IS_ERR(wm_rtc->rtc)) { rtc 430 drivers/rtc/rtc-wm8350.c ret = PTR_ERR(wm_rtc->rtc); rtc 622 drivers/rtc/rtc-x1205.c struct rtc_device *rtc; rtc 632 drivers/rtc/rtc-x1205.c rtc = devm_rtc_device_register(&client->dev, x1205_driver.driver.name, rtc 635 drivers/rtc/rtc-x1205.c if (IS_ERR(rtc)) rtc 636 drivers/rtc/rtc-x1205.c return PTR_ERR(rtc); rtc 638 drivers/rtc/rtc-x1205.c i2c_set_clientdata(client, rtc); rtc 36 drivers/rtc/rtc-xgene.c struct rtc_device *rtc; rtc 132 drivers/rtc/rtc-xgene.c rtc_update_irq(pdata->rtc, 1, RTC_IRQF | RTC_AF); rtc 155 drivers/rtc/rtc-xgene.c pdata->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 156 drivers/rtc/rtc-xgene.c if (IS_ERR(pdata->rtc)) rtc 157 drivers/rtc/rtc-xgene.c return PTR_ERR(pdata->rtc); rtc 188 drivers/rtc/rtc-xgene.c pdata->rtc->uie_unsupported = 1; rtc 189 drivers/rtc/rtc-xgene.c pdata->rtc->ops = &xgene_rtc_ops; rtc 190 drivers/rtc/rtc-xgene.c pdata->rtc->range_max = U32_MAX; rtc 192 drivers/rtc/rtc-xgene.c ret = rtc_register_device(pdata->rtc); rtc 43 drivers/rtc/rtc-zynqmp.c struct rtc_device *rtc; rtc 190 drivers/rtc/rtc-zynqmp.c rtc_update_irq(xrtcdev->rtc, 1, RTC_IRQF | RTC_AF); rtc 207 drivers/rtc/rtc-zynqmp.c xrtcdev->rtc = devm_rtc_allocate_device(&pdev->dev); rtc 208 drivers/rtc/rtc-zynqmp.c if (IS_ERR(xrtcdev->rtc)) rtc 209 drivers/rtc/rtc-zynqmp.c return PTR_ERR(xrtcdev->rtc); rtc 211 drivers/rtc/rtc-zynqmp.c xrtcdev->rtc->ops = &xlnx_rtc_ops; rtc 212 drivers/rtc/rtc-zynqmp.c xrtcdev->rtc->range_max = U32_MAX; rtc 251 drivers/rtc/rtc-zynqmp.c return rtc_register_device(xrtcdev->rtc); rtc 87 drivers/rtc/sysfs.c struct rtc_device *rtc = to_rtc_device(dev); rtc 98 drivers/rtc/sysfs.c rtc->max_user_freq = (int)val; rtc 155 drivers/rtc/sysfs.c struct rtc_device *rtc = to_rtc_device(dev); rtc 162 drivers/rtc/sysfs.c retval = rtc_read_time(rtc, &alm.time); rtc 187 drivers/rtc/sysfs.c retval = rtc_read_alarm(rtc, &alm); rtc 209 drivers/rtc/sysfs.c retval = rtc_set_alarm(rtc, &alm); rtc 268 drivers/rtc/sysfs.c static bool rtc_does_wakealarm(struct rtc_device *rtc) rtc 270 drivers/rtc/sysfs.c if (!device_can_wakeup(rtc->dev.parent)) rtc 273 drivers/rtc/sysfs.c return rtc->ops->set_alarm != NULL; rtc 280 drivers/rtc/sysfs.c struct rtc_device *rtc = to_rtc_device(dev); rtc 284 drivers/rtc/sysfs.c if (!rtc_does_wakealarm(rtc)) rtc 287 drivers/rtc/sysfs.c if (!rtc->ops->set_offset) rtc 290 drivers/rtc/sysfs.c if (!(rtc->range_max - rtc->range_min)) rtc 312 drivers/rtc/sysfs.c int rtc_add_groups(struct rtc_device *rtc, const struct attribute_group **grps) rtc 317 drivers/rtc/sysfs.c if (rtc->registered) rtc 322 drivers/rtc/sysfs.c groups = rtc->dev.groups; rtc 331 drivers/rtc/sysfs.c groups = devm_kcalloc(&rtc->dev, new_cnt, sizeof(*groups), GFP_KERNEL); rtc 334 drivers/rtc/sysfs.c memcpy(groups, rtc->dev.groups, old_cnt * sizeof(*groups)); rtc 338 drivers/rtc/sysfs.c old = rtc->dev.groups; rtc 339 drivers/rtc/sysfs.c rtc->dev.groups = groups; rtc 341 drivers/rtc/sysfs.c devm_kfree(&rtc->dev, old); rtc 347 drivers/rtc/sysfs.c int rtc_add_group(struct rtc_device *rtc, const struct attribute_group *grp) rtc 351 drivers/rtc/sysfs.c return rtc_add_groups(rtc, groups); rtc 23 drivers/rtc/systohc.c struct rtc_device *rtc; rtc 29 drivers/rtc/systohc.c rtc = rtc_class_open(CONFIG_RTC_SYSTOHC_DEVICE); rtc 30 drivers/rtc/systohc.c if (!rtc) rtc 33 drivers/rtc/systohc.c if (!rtc->ops || !rtc->ops->set_time) rtc 40 drivers/rtc/systohc.c set_normalized_timespec64(&to_set, 0, -rtc->set_offset_nsec); rtc 47 drivers/rtc/systohc.c ok = rtc_tv_nsec_ok(rtc->set_offset_nsec, &to_set, &now); rtc 55 drivers/rtc/systohc.c err = rtc_set_time(rtc, &tm); rtc 58 drivers/rtc/systohc.c rtc_class_close(rtc); rtc 2180 drivers/scsi/megaraid/megaraid_sas.h u32 rtc; rtc 307 include/linux/mfd/88pm80x.h struct pm80x_rtc_pdata *rtc; rtc 437 include/linux/mfd/88pm860x.h struct pm860x_rtc_pdata *rtc; rtc 196 include/linux/mfd/max8925.h struct i2c_client *rtc; rtc 372 include/linux/mfd/max8997-private.h struct i2c_client *rtc; /* slave addr 0x0c */ rtc 143 include/linux/mfd/max8998-private.h struct i2c_client *rtc; rtc 895 include/linux/mfd/tps65910.h struct tps65910_rtc *rtc; rtc 615 include/linux/mfd/wm8350/core.h struct wm8350_rtc rtc; rtc 260 include/linux/mfd/wm8350/rtc.h struct rtc_device *rtc; rtc 92 include/linux/rtc.h void (*func)(struct rtc_device *rtc); rtc 93 include/linux/rtc.h struct rtc_device *rtc; rtc 174 include/linux/rtc.h int __rtc_register_device(struct module *owner, struct rtc_device *rtc); rtc 176 include/linux/rtc.h extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); rtc 177 include/linux/rtc.h extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); rtc 179 include/linux/rtc.h int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm); rtc 180 include/linux/rtc.h extern int rtc_read_alarm(struct rtc_device *rtc, rtc 182 include/linux/rtc.h extern int rtc_set_alarm(struct rtc_device *rtc, rtc 184 include/linux/rtc.h extern int rtc_initialize_alarm(struct rtc_device *rtc, rtc 186 include/linux/rtc.h extern void rtc_update_irq(struct rtc_device *rtc, rtc 190 include/linux/rtc.h extern void rtc_class_close(struct rtc_device *rtc); rtc 192 include/linux/rtc.h extern int rtc_irq_set_state(struct rtc_device *rtc, int enabled); rtc 193 include/linux/rtc.h extern int rtc_irq_set_freq(struct rtc_device *rtc, int freq); rtc 194 include/linux/rtc.h extern int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled); rtc 195 include/linux/rtc.h extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); rtc 196 include/linux/rtc.h extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, rtc 199 include/linux/rtc.h void rtc_handle_legacy_irq(struct rtc_device *rtc, int num, int mode); rtc 200 include/linux/rtc.h void rtc_aie_update_irq(struct rtc_device *rtc); rtc 201 include/linux/rtc.h void rtc_uie_update_irq(struct rtc_device *rtc); rtc 205 include/linux/rtc.h struct rtc_device *rtc); rtc 206 include/linux/rtc.h int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer *timer, rtc 208 include/linux/rtc.h void rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer); rtc 209 include/linux/rtc.h int rtc_read_offset(struct rtc_device *rtc, long *offset); rtc 210 include/linux/rtc.h int rtc_set_offset(struct rtc_device *rtc, long offset); rtc 261 include/linux/rtc.h int rtc_nvmem_register(struct rtc_device *rtc, rtc 263 include/linux/rtc.h void rtc_nvmem_unregister(struct rtc_device *rtc); rtc 265 include/linux/rtc.h static inline int rtc_nvmem_register(struct rtc_device *rtc, rtc 270 include/linux/rtc.h static inline void rtc_nvmem_unregister(struct rtc_device *rtc) {} rtc 274 include/linux/rtc.h int rtc_add_group(struct rtc_device *rtc, const struct attribute_group *grp); rtc 275 include/linux/rtc.h int rtc_add_groups(struct rtc_device *rtc, const struct attribute_group **grps); rtc 278 include/linux/rtc.h int rtc_add_group(struct rtc_device *rtc, const struct attribute_group *grp) rtc 284 include/linux/rtc.h int rtc_add_groups(struct rtc_device *rtc, const struct attribute_group **grps) rtc 29 include/soc/arc/timers.h unsigned int pad2:15, rtsc:1, pad1:5, rtc:1, t1:1, t0:1, ver:8; rtc 31 include/soc/arc/timers.h unsigned int ver:8, t0:1, t1:1, rtc:1, pad1:5, rtsc:1, pad2:15; rtc 2 include/trace/events/rtc.h #define TRACE_SYSTEM rtc rtc 62 kernel/power/suspend_test.c static void __init test_wakealarm(struct rtc_device *rtc, suspend_state_t state) rtc 79 kernel/power/suspend_test.c status = rtc_read_time(rtc, &alm.time); rtc 81 kernel/power/suspend_test.c printk(err_readtime, dev_name(&rtc->dev), status); rtc 90 kernel/power/suspend_test.c status = rtc_set_alarm(rtc, &alm); rtc 92 kernel/power/suspend_test.c printk(err_wakealarm, dev_name(&rtc->dev), status); rtc 125 kernel/power/suspend_test.c rtc_set_alarm(rtc, &alm); rtc 184 kernel/power/suspend_test.c struct rtc_device *rtc = NULL; rtc 206 kernel/power/suspend_test.c rtc = rtc_class_open(dev_name(dev)); rtc 209 kernel/power/suspend_test.c if (!rtc) { rtc 215 kernel/power/suspend_test.c test_wakealarm(rtc, test_state); rtc 216 kernel/power/suspend_test.c rtc_class_close(rtc); rtc 89 kernel/time/alarmtimer.c struct rtc_device *rtc = to_rtc_device(dev); rtc 97 kernel/time/alarmtimer.c if (!rtc->ops->set_alarm) rtc 99 kernel/time/alarmtimer.c if (!device_may_wakeup(rtc->dev.parent)) rtc 108 kernel/time/alarmtimer.c if (!try_module_get(rtc->owner)) { rtc 113 kernel/time/alarmtimer.c rtcdev = rtc; rtc 255 kernel/time/alarmtimer.c struct rtc_device *rtc; rtc 266 kernel/time/alarmtimer.c rtc = alarmtimer_get_rtcdev(); rtc 268 kernel/time/alarmtimer.c if (!rtc) rtc 300 kernel/time/alarmtimer.c rtc_timer_cancel(rtc, &rtctimer); rtc 301 kernel/time/alarmtimer.c rtc_read_time(rtc, &tm); rtc 306 kernel/time/alarmtimer.c ret = rtc_timer_start(rtc, &rtctimer, now, 0); rtc 314 kernel/time/alarmtimer.c struct rtc_device *rtc; rtc 316 kernel/time/alarmtimer.c rtc = alarmtimer_get_rtcdev(); rtc 317 kernel/time/alarmtimer.c if (rtc) rtc 318 kernel/time/alarmtimer.c rtc_timer_cancel(rtc, &rtctimer); rtc 26 tools/testing/selftests/rtc/rtctest.c FIXTURE(rtc) { rtc 30 tools/testing/selftests/rtc/rtctest.c FIXTURE_SETUP(rtc) { rtc 35 tools/testing/selftests/rtc/rtctest.c FIXTURE_TEARDOWN(rtc) { rtc 39 tools/testing/selftests/rtc/rtctest.c TEST_F(rtc, date_read) { rtc 52 tools/testing/selftests/rtc/rtctest.c TEST_F_TIMEOUT(rtc, uie_read, NUM_UIE + 2) { rtc 77 tools/testing/selftests/rtc/rtctest.c TEST_F(rtc, uie_select) { rtc 112 tools/testing/selftests/rtc/rtctest.c TEST_F(rtc, alarm_alm_set) { rtc 165 tools/testing/selftests/rtc/rtctest.c TEST_F(rtc, alarm_wkalm_set) { rtc 214 tools/testing/selftests/rtc/rtctest.c TEST_F_TIMEOUT(rtc, alarm_alm_set_minute, 65) { rtc 267 tools/testing/selftests/rtc/rtctest.c TEST_F_TIMEOUT(rtc, alarm_wkalm_set_minute, 65) { rtc 25 tools/testing/selftests/rtc/setdate.c const char *rtc, *date; rtc 34 tools/testing/selftests/rtc/setdate.c rtc = argv[1]; rtc 41 tools/testing/selftests/rtc/setdate.c fd = open(rtc, O_RDONLY); rtc 43 tools/testing/selftests/rtc/setdate.c perror(rtc); rtc 32 tools/testing/selftests/timers/rtcpie.c const char *rtc = default_rtc; rtc 37 tools/testing/selftests/timers/rtcpie.c rtc = argv[1]; rtc 46 tools/testing/selftests/timers/rtcpie.c fd = open(rtc, O_RDONLY); rtc 49 tools/testing/selftests/timers/rtcpie.c perror(rtc);