Lines Matching refs:ep93xx_rtc
28 struct ep93xx_rtc { struct
36 struct ep93xx_rtc *ep93xx_rtc = dev_get_drvdata(dev); in ep93xx_rtc_get_swcomp() local
39 comp = readl(ep93xx_rtc->mmio_base + EP93XX_RTC_SWCOMP); in ep93xx_rtc_get_swcomp()
54 struct ep93xx_rtc *ep93xx_rtc = dev_get_drvdata(dev); in ep93xx_rtc_read_time() local
57 time = readl(ep93xx_rtc->mmio_base + EP93XX_RTC_DATA); in ep93xx_rtc_read_time()
65 struct ep93xx_rtc *ep93xx_rtc = dev_get_drvdata(dev); in ep93xx_rtc_set_time() local
68 writel(secs + 1, ep93xx_rtc->mmio_base + EP93XX_RTC_LOAD); in ep93xx_rtc_set_time()
124 struct ep93xx_rtc *ep93xx_rtc; in ep93xx_rtc_probe() local
127 ep93xx_rtc = devm_kzalloc(&pdev->dev, sizeof(*ep93xx_rtc), GFP_KERNEL); in ep93xx_rtc_probe()
128 if (!ep93xx_rtc) in ep93xx_rtc_probe()
131 ep93xx_rtc->mmio_base = devm_platform_ioremap_resource(pdev, 0); in ep93xx_rtc_probe()
132 if (IS_ERR(ep93xx_rtc->mmio_base)) in ep93xx_rtc_probe()
133 return PTR_ERR(ep93xx_rtc->mmio_base); in ep93xx_rtc_probe()
135 platform_set_drvdata(pdev, ep93xx_rtc); in ep93xx_rtc_probe()
137 ep93xx_rtc->rtc = devm_rtc_allocate_device(&pdev->dev); in ep93xx_rtc_probe()
138 if (IS_ERR(ep93xx_rtc->rtc)) in ep93xx_rtc_probe()
139 return PTR_ERR(ep93xx_rtc->rtc); in ep93xx_rtc_probe()
141 ep93xx_rtc->rtc->ops = &ep93xx_rtc_ops; in ep93xx_rtc_probe()
142 ep93xx_rtc->rtc->range_max = U32_MAX; in ep93xx_rtc_probe()
144 err = rtc_add_group(ep93xx_rtc->rtc, &ep93xx_rtc_sysfs_files); in ep93xx_rtc_probe()
148 return devm_rtc_register_device(ep93xx_rtc->rtc); in ep93xx_rtc_probe()