Lines Matching refs:rtcdrv
39 struct goldfish_rtc *rtcdrv; in goldfish_rtc_read_alarm() local
41 rtcdrv = dev_get_drvdata(dev); in goldfish_rtc_read_alarm()
42 base = rtcdrv->base; in goldfish_rtc_read_alarm()
64 struct goldfish_rtc *rtcdrv; in goldfish_rtc_set_alarm() local
69 rtcdrv = dev_get_drvdata(dev); in goldfish_rtc_set_alarm()
70 base = rtcdrv->base; in goldfish_rtc_set_alarm()
95 struct goldfish_rtc *rtcdrv; in goldfish_rtc_alarm_irq_enable() local
97 rtcdrv = dev_get_drvdata(dev); in goldfish_rtc_alarm_irq_enable()
98 base = rtcdrv->base; in goldfish_rtc_alarm_irq_enable()
110 struct goldfish_rtc *rtcdrv = dev_id; in goldfish_rtc_interrupt() local
111 void __iomem *base = rtcdrv->base; in goldfish_rtc_interrupt()
115 rtc_update_irq(rtcdrv->rtc, 1, RTC_IRQF | RTC_AF); in goldfish_rtc_interrupt()
122 struct goldfish_rtc *rtcdrv; in goldfish_rtc_read_time() local
128 rtcdrv = dev_get_drvdata(dev); in goldfish_rtc_read_time()
129 base = rtcdrv->base; in goldfish_rtc_read_time()
144 struct goldfish_rtc *rtcdrv; in goldfish_rtc_set_time() local
148 rtcdrv = dev_get_drvdata(dev); in goldfish_rtc_set_time()
149 base = rtcdrv->base; in goldfish_rtc_set_time()
168 struct goldfish_rtc *rtcdrv; in goldfish_rtc_probe() local
171 rtcdrv = devm_kzalloc(&pdev->dev, sizeof(*rtcdrv), GFP_KERNEL); in goldfish_rtc_probe()
172 if (!rtcdrv) in goldfish_rtc_probe()
175 platform_set_drvdata(pdev, rtcdrv); in goldfish_rtc_probe()
176 rtcdrv->base = devm_platform_ioremap_resource(pdev, 0); in goldfish_rtc_probe()
177 if (IS_ERR(rtcdrv->base)) in goldfish_rtc_probe()
178 return PTR_ERR(rtcdrv->base); in goldfish_rtc_probe()
180 rtcdrv->irq = platform_get_irq(pdev, 0); in goldfish_rtc_probe()
181 if (rtcdrv->irq < 0) in goldfish_rtc_probe()
184 rtcdrv->rtc = devm_rtc_allocate_device(&pdev->dev); in goldfish_rtc_probe()
185 if (IS_ERR(rtcdrv->rtc)) in goldfish_rtc_probe()
186 return PTR_ERR(rtcdrv->rtc); in goldfish_rtc_probe()
188 rtcdrv->rtc->ops = &goldfish_rtc_ops; in goldfish_rtc_probe()
189 rtcdrv->rtc->range_max = U64_MAX / NSEC_PER_SEC; in goldfish_rtc_probe()
191 err = devm_request_irq(&pdev->dev, rtcdrv->irq, in goldfish_rtc_probe()
193 0, pdev->name, rtcdrv); in goldfish_rtc_probe()
197 return devm_rtc_register_device(rtcdrv->rtc); in goldfish_rtc_probe()