Lines Matching refs:ret

52 	int ret;
55 ret = palmas_update_bits(palmas, PALMAS_RTC_BASE, PALMAS_RTC_CTRL_REG,
57 if (ret < 0) {
58 dev_err(dev, "RTC CTRL reg update failed, err: %d\n", ret);
59 return ret;
62 ret = palmas_bulk_read(palmas, PALMAS_RTC_BASE, PALMAS_SECONDS_REG,
64 if (ret < 0) {
65 dev_err(dev, "RTC_SECONDS reg read failed, err = %d\n", ret);
66 return ret;
76 return ret;
83 int ret;
93 ret = palmas_update_bits(palmas, PALMAS_RTC_BASE, PALMAS_RTC_CTRL_REG,
95 if (ret < 0) {
96 dev_err(dev, "RTC stop failed, err = %d\n", ret);
97 return ret;
100 ret = palmas_bulk_write(palmas, PALMAS_RTC_BASE, PALMAS_SECONDS_REG,
102 if (ret < 0) {
103 dev_err(dev, "RTC_SECONDS reg write failed, err = %d\n", ret);
104 return ret;
108 ret = palmas_update_bits(palmas, PALMAS_RTC_BASE, PALMAS_RTC_CTRL_REG,
110 if (ret < 0)
111 dev_err(dev, "RTC start failed, err = %d\n", ret);
112 return ret;
130 int ret;
132 ret = palmas_bulk_read(palmas, PALMAS_RTC_BASE,
135 if (ret < 0) {
136 dev_err(dev, "RTC_ALARM_SECONDS read failed, err = %d\n", ret);
137 return ret;
147 ret = palmas_read(palmas, PALMAS_RTC_BASE, PALMAS_RTC_INTERRUPTS_REG,
149 if (ret < 0) {
150 dev_err(dev, "RTC_INTERRUPTS reg read failed, err = %d\n", ret);
151 return ret;
156 return ret;
163 int ret;
165 ret = palmas_rtc_alarm_irq_enable(dev, 0);
166 if (ret < 0) {
168 return ret;
178 ret = palmas_bulk_write(palmas, PALMAS_RTC_BASE,
180 if (ret < 0) {
181 dev_err(dev, "ALARM_SECONDS_REG write failed, err = %d\n", ret);
182 return ret;
186 ret = palmas_rtc_alarm_irq_enable(dev, 1);
187 return ret;
194 int ret;
196 ret = palmas_read(palmas, PALMAS_RTC_BASE, PALMAS_RTC_STATUS_REG,
198 if (ret < 0) {
199 dev_err(dev, "RTC_STATUS read failed, err = %d\n", ret);
200 return ret;
203 ret = palmas_write(palmas, PALMAS_RTC_BASE, PALMAS_RTC_STATUS_REG,
205 if (ret < 0) {
206 dev_err(dev, "RTC_STATUS write failed, err = %d\n", ret);
207 return ret;
216 int ret;
218 ret = palmas_clear_interrupts(dev);
219 if (ret < 0) {
220 dev_err(dev, "RTC interrupt clear failed, err = %d\n", ret);
240 int ret;
257 ret = palmas_clear_interrupts(&pdev->dev);
258 if (ret < 0) {
259 dev_err(&pdev->dev, "clear RTC int failed, err = %d\n", ret);
260 return ret;
272 ret = palmas_update_bits(palmas, PALMAS_PMU_CONTROL_BASE,
275 if (ret < 0) {
277 "BACKUP_BATTERY_CTRL update failed, %d\n", ret);
278 return ret;
281 ret = palmas_update_bits(palmas, PALMAS_PMU_CONTROL_BASE,
285 if (ret < 0) {
287 "BACKUP_BATTERY_CTRL update failed, %d\n", ret);
288 return ret;
293 ret = palmas_update_bits(palmas, PALMAS_RTC_BASE, PALMAS_RTC_CTRL_REG,
296 if (ret < 0) {
297 dev_err(&pdev->dev, "RTC_CTRL write failed, err = %d\n", ret);
298 return ret;
307 ret = PTR_ERR(palmas_rtc->rtc);
308 dev_err(&pdev->dev, "RTC register failed, err = %d\n", ret);
309 return ret;
312 ret = devm_request_threaded_irq(&pdev->dev, palmas_rtc->irq, NULL,
317 if (ret < 0) {
318 dev_err(&pdev->dev, "IRQ request failed, err = %d\n", ret);
319 return ret;