Lines Matching refs:as3722_rtc

25 struct as3722_rtc {  struct
56 struct as3722_rtc *as3722_rtc = dev_get_drvdata(dev); in as3722_rtc_read_time() local
57 struct as3722 *as3722 = as3722_rtc->as3722; in as3722_rtc_read_time()
73 struct as3722_rtc *as3722_rtc = dev_get_drvdata(dev); in as3722_rtc_set_time() local
74 struct as3722 *as3722 = as3722_rtc->as3722; in as3722_rtc_set_time()
92 struct as3722_rtc *as3722_rtc = dev_get_drvdata(dev); in as3722_rtc_alarm_irq_enable() local
94 if (enabled && !as3722_rtc->irq_enable) { in as3722_rtc_alarm_irq_enable()
95 enable_irq(as3722_rtc->alarm_irq); in as3722_rtc_alarm_irq_enable()
96 as3722_rtc->irq_enable = true; in as3722_rtc_alarm_irq_enable()
97 } else if (!enabled && as3722_rtc->irq_enable) { in as3722_rtc_alarm_irq_enable()
98 disable_irq(as3722_rtc->alarm_irq); in as3722_rtc_alarm_irq_enable()
99 as3722_rtc->irq_enable = false; in as3722_rtc_alarm_irq_enable()
106 struct as3722_rtc *as3722_rtc = dev_get_drvdata(dev); in as3722_rtc_read_alarm() local
107 struct as3722 *as3722 = as3722_rtc->as3722; in as3722_rtc_read_alarm()
124 struct as3722_rtc *as3722_rtc = dev_get_drvdata(dev); in as3722_rtc_set_alarm() local
125 struct as3722 *as3722 = as3722_rtc->as3722; in as3722_rtc_set_alarm()
153 struct as3722_rtc *as3722_rtc = data; in as3722_alarm_irq() local
155 rtc_update_irq(as3722_rtc->rtc, 1, RTC_IRQF | RTC_AF); in as3722_alarm_irq()
170 struct as3722_rtc *as3722_rtc; in as3722_rtc_probe() local
173 as3722_rtc = devm_kzalloc(&pdev->dev, sizeof(*as3722_rtc), GFP_KERNEL); in as3722_rtc_probe()
174 if (!as3722_rtc) in as3722_rtc_probe()
177 as3722_rtc->as3722 = as3722; in as3722_rtc_probe()
178 as3722_rtc->dev = &pdev->dev; in as3722_rtc_probe()
179 platform_set_drvdata(pdev, as3722_rtc); in as3722_rtc_probe()
192 as3722_rtc->rtc = devm_rtc_device_register(&pdev->dev, "as3722-rtc", in as3722_rtc_probe()
194 if (IS_ERR(as3722_rtc->rtc)) { in as3722_rtc_probe()
195 ret = PTR_ERR(as3722_rtc->rtc); in as3722_rtc_probe()
200 as3722_rtc->alarm_irq = platform_get_irq(pdev, 0); in as3722_rtc_probe()
201 dev_info(&pdev->dev, "RTC interrupt %d\n", as3722_rtc->alarm_irq); in as3722_rtc_probe()
203 ret = devm_request_threaded_irq(&pdev->dev, as3722_rtc->alarm_irq, NULL, in as3722_rtc_probe()
205 "rtc-alarm", as3722_rtc); in as3722_rtc_probe()
208 as3722_rtc->alarm_irq, ret); in as3722_rtc_probe()
211 disable_irq(as3722_rtc->alarm_irq); in as3722_rtc_probe()
218 struct as3722_rtc *as3722_rtc = dev_get_drvdata(dev); in as3722_rtc_suspend() local
221 enable_irq_wake(as3722_rtc->alarm_irq); in as3722_rtc_suspend()
228 struct as3722_rtc *as3722_rtc = dev_get_drvdata(dev); in as3722_rtc_resume() local
231 disable_irq_wake(as3722_rtc->alarm_irq); in as3722_rtc_resume()