Lines Matching refs:ret

101 	int ret;
109 ret = wm831x_reg_read(wm831x, WM831X_RTC_WRITE_COUNTER);
110 if (ret >= 0) {
111 reg = ret;
115 ret);
127 int ret;
131 ret = wm831x_reg_read(wm831x, WM831X_RTC_CONTROL);
132 if (ret < 0) {
133 dev_err(dev, "Failed to read RTC control: %d\n", ret);
134 return ret;
136 if (!(ret & WM831X_RTC_VALID)) {
145 ret = wm831x_bulk_read(wm831x, WM831X_RTC_TIME_1,
147 if (ret != 0)
150 ret = wm831x_bulk_read(wm831x, WM831X_RTC_TIME_1,
152 if (ret != 0)
178 int ret;
181 ret = wm831x_reg_write(wm831x, WM831X_RTC_TIME_1,
183 if (ret < 0) {
184 dev_err(dev, "Failed to write TIME_1: %d\n", ret);
185 return ret;
188 ret = wm831x_reg_write(wm831x, WM831X_RTC_TIME_2, time & 0xffff);
189 if (ret < 0) {
190 dev_err(dev, "Failed to write TIME_2: %d\n", ret);
191 return ret;
200 ret = wm831x_reg_read(wm831x, WM831X_RTC_CONTROL);
201 if (ret < 0)
202 ret = WM831X_RTC_SYNC_BUSY;
203 } while (!(ret & WM831X_RTC_SYNC_BUSY) &&
206 if (ret & WM831X_RTC_SYNC_BUSY) {
214 ret = wm831x_rtc_readtime(dev, &new_tm);
215 if (ret < 0)
216 return ret;
218 ret = rtc_tm_to_time(&new_tm, &new_time);
219 if (ret < 0) {
220 dev_err(dev, "Failed to convert time: %d\n", ret);
221 return ret;
239 int ret;
243 ret = wm831x_bulk_read(wm831x_rtc->wm831x, WM831X_RTC_ALARM_1,
245 if (ret != 0) {
246 dev_err(dev, "Failed to read alarm time: %d\n", ret);
247 return ret;
254 ret = wm831x_reg_read(wm831x_rtc->wm831x, WM831X_RTC_CONTROL);
255 if (ret < 0) {
256 dev_err(dev, "Failed to read RTC control: %d\n", ret);
257 return ret;
260 if (ret & WM831X_RTC_ALM_ENA)
288 int ret;
291 ret = rtc_tm_to_time(&alrm->time, &time);
292 if (ret < 0) {
293 dev_err(dev, "Failed to convert time: %d\n", ret);
294 return ret;
297 ret = wm831x_rtc_stop_alarm(wm831x_rtc);
298 if (ret < 0) {
299 dev_err(dev, "Failed to stop alarm: %d\n", ret);
300 return ret;
303 ret = wm831x_reg_write(wm831x, WM831X_RTC_ALARM_1,
305 if (ret < 0) {
306 dev_err(dev, "Failed to write ALARM_1: %d\n", ret);
307 return ret;
310 ret = wm831x_reg_write(wm831x, WM831X_RTC_ALARM_2, time & 0xffff);
311 if (ret < 0) {
312 dev_err(dev, "Failed to write ALARM_2: %d\n", ret);
313 return ret;
317 ret = wm831x_rtc_start_alarm(wm831x_rtc);
318 if (ret < 0) {
319 dev_err(dev, "Failed to start alarm: %d\n", ret);
320 return ret;
361 int ret, enable;
368 ret = wm831x_set_bits(wm831x_rtc->wm831x, WM831X_RTC_CONTROL,
370 if (ret != 0)
371 dev_err(&pdev->dev, "Failed to update RTC alarm: %d\n", ret);
383 int ret;
386 ret = wm831x_rtc_start_alarm(wm831x_rtc);
387 if (ret != 0)
389 "Failed to restart RTC alarm: %d\n", ret);
400 int ret;
402 ret = wm831x_set_bits(wm831x_rtc->wm831x, WM831X_RTC_CONTROL,
404 if (ret != 0)
405 dev_err(&pdev->dev, "Failed to stop RTC alarm: %d\n", ret);
420 int ret = 0;
429 ret = wm831x_reg_read(wm831x, WM831X_RTC_CONTROL);
430 if (ret < 0) {
431 dev_err(&pdev->dev, "Failed to read RTC control: %d\n", ret);
434 if (ret & WM831X_RTC_ALM_ENA)
442 ret = PTR_ERR(wm831x_rtc->rtc);
446 ret = devm_request_threaded_irq(&pdev->dev, alm_irq, NULL,
450 if (ret != 0) {
452 alm_irq, ret);
460 return ret;