• Home
  • Raw
  • Download

Lines Matching refs:wm8350

33 #define to_wm8350_from_rtc_dev(d) container_of(d, struct wm8350, rtc.pdev.dev)
40 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_rtc_readtime() local
49 ret = wm8350_block_read(wm8350, WM8350_RTC_SECONDS_MINUTES, in wm8350_rtc_readtime()
53 ret = wm8350_block_read(wm8350, WM8350_RTC_SECONDS_MINUTES, in wm8350_rtc_readtime()
99 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_rtc_settime() local
117 ret = wm8350_set_bits(wm8350, WM8350_RTC_TIME_CONTROL, WM8350_RTC_SET); in wm8350_rtc_settime()
123 rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); in wm8350_rtc_settime()
133 ret = wm8350_block_write(wm8350, WM8350_RTC_SECONDS_MINUTES, 4, time); in wm8350_rtc_settime()
138 ret = wm8350_clear_bits(wm8350, WM8350_RTC_TIME_CONTROL, in wm8350_rtc_settime()
148 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_rtc_readalarm() local
153 ret = wm8350_block_read(wm8350, WM8350_ALARM_SECONDS_MINUTES, 4, time); in wm8350_rtc_readalarm()
192 static int wm8350_rtc_stop_alarm(struct wm8350 *wm8350) in wm8350_rtc_stop_alarm() argument
199 ret = wm8350_set_bits(wm8350, WM8350_RTC_TIME_CONTROL, in wm8350_rtc_stop_alarm()
206 rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); in wm8350_rtc_stop_alarm()
216 static int wm8350_rtc_start_alarm(struct wm8350 *wm8350) in wm8350_rtc_start_alarm() argument
222 ret = wm8350_clear_bits(wm8350, WM8350_RTC_TIME_CONTROL, in wm8350_rtc_start_alarm()
229 rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); in wm8350_rtc_start_alarm()
242 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_rtc_alarm_irq_enable() local
245 return wm8350_rtc_start_alarm(wm8350); in wm8350_rtc_alarm_irq_enable()
247 return wm8350_rtc_stop_alarm(wm8350); in wm8350_rtc_alarm_irq_enable()
252 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_rtc_setalarm() local
289 ret = wm8350_rtc_stop_alarm(wm8350); in wm8350_rtc_setalarm()
294 ret = wm8350_block_write(wm8350, WM8350_ALARM_SECONDS_MINUTES, in wm8350_rtc_setalarm()
300 ret = wm8350_rtc_start_alarm(wm8350); in wm8350_rtc_setalarm()
307 struct wm8350 *wm8350 = data; in wm8350_rtc_alarm_handler() local
308 struct rtc_device *rtc = wm8350->rtc.rtc; in wm8350_rtc_alarm_handler()
314 ret = wm8350_set_bits(wm8350, WM8350_RTC_TIME_CONTROL, in wm8350_rtc_alarm_handler()
317 dev_err(&(wm8350->rtc.pdev->dev), in wm8350_rtc_alarm_handler()
326 struct wm8350 *wm8350 = data; in wm8350_rtc_update_handler() local
327 struct rtc_device *rtc = wm8350->rtc.rtc; in wm8350_rtc_update_handler()
346 struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev); in wm8350_rtc_suspend() local
350 reg = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); in wm8350_rtc_suspend()
352 if (device_may_wakeup(&wm8350->rtc.pdev->dev) && in wm8350_rtc_suspend()
354 ret = wm8350_rtc_stop_alarm(wm8350); in wm8350_rtc_suspend()
366 struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev); in wm8350_rtc_resume() local
369 if (wm8350->rtc.alarm_enabled) { in wm8350_rtc_resume()
370 ret = wm8350_rtc_start_alarm(wm8350); in wm8350_rtc_resume()
382 struct wm8350 *wm8350 = platform_get_drvdata(pdev); in wm8350_rtc_probe() local
383 struct wm8350_rtc *wm_rtc = &wm8350->rtc; in wm8350_rtc_probe()
387 timectl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); in wm8350_rtc_probe()
398 power5 = wm8350_reg_read(wm8350, WM8350_POWER_MGMT_5); in wm8350_rtc_probe()
400 dev_info(wm8350->dev, "Starting RTC\n"); in wm8350_rtc_probe()
402 wm8350_reg_unlock(wm8350); in wm8350_rtc_probe()
404 ret = wm8350_set_bits(wm8350, WM8350_POWER_MGMT_5, in wm8350_rtc_probe()
411 wm8350_reg_lock(wm8350); in wm8350_rtc_probe()
417 ret = wm8350_clear_bits(wm8350, WM8350_RTC_TIME_CONTROL, in wm8350_rtc_probe()
426 timectl = wm8350_reg_read(wm8350, in wm8350_rtc_probe()
446 wm8350_register_irq(wm8350, WM8350_IRQ_RTC_SEC, in wm8350_rtc_probe()
448 "RTC Seconds", wm8350); in wm8350_rtc_probe()
449 wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC); in wm8350_rtc_probe()
451 wm8350_register_irq(wm8350, WM8350_IRQ_RTC_ALM, in wm8350_rtc_probe()
453 "RTC Alarm", wm8350); in wm8350_rtc_probe()
460 struct wm8350 *wm8350 = platform_get_drvdata(pdev); in wm8350_rtc_remove() local
462 wm8350_free_irq(wm8350, WM8350_IRQ_RTC_SEC, wm8350); in wm8350_rtc_remove()
463 wm8350_free_irq(wm8350, WM8350_IRQ_RTC_ALM, wm8350); in wm8350_rtc_remove()