Lines Matching refs:ret

81 	int ret = 0, i;  in rpu_validate_addr()  local
90 ret = validate_addr_blk(start_addr, end_addr, i, hl_flag, &selected_blk); in rpu_validate_addr()
91 if (!ret) { in rpu_validate_addr()
96 if (ret) { in rpu_validate_addr()
113 int ret; in rpu_irq_config() local
120 ret = gpio_pin_configure_dt(&host_irq_spec, GPIO_INPUT); in rpu_irq_config()
121 if (ret) { in rpu_irq_config()
126 ret = gpio_pin_interrupt_configure_dt(&host_irq_spec, in rpu_irq_config()
128 if (ret) { in rpu_irq_config()
138 ret = gpio_add_callback(host_irq_spec.port, irq_callback_data); in rpu_irq_config()
139 if (ret) { in rpu_irq_config()
148 return ret; in rpu_irq_config()
153 int ret; in rpu_irq_remove() local
155 ret = gpio_pin_configure_dt(&host_irq_spec, GPIO_DISCONNECTED); in rpu_irq_remove()
156 if (ret) { in rpu_irq_remove()
161 ret = gpio_remove_callback(host_irq_spec.port, irq_callback_data); in rpu_irq_remove()
162 if (ret) { in rpu_irq_remove()
169 return ret; in rpu_irq_remove()
174 int ret; in rpu_gpio_config() local
186 ret = gpio_pin_configure_dt(&bucken_spec, (GPIO_OUTPUT | NRF_GPIO_DRIVE_H0H1)); in rpu_gpio_config()
187 if (ret) { in rpu_gpio_config()
189 return ret; in rpu_gpio_config()
192 ret = gpio_pin_configure_dt(&iovdd_ctrl_spec, GPIO_OUTPUT); in rpu_gpio_config()
193 if (ret) { in rpu_gpio_config()
196 return ret; in rpu_gpio_config()
206 int ret; in rpu_gpio_remove() local
208 ret = gpio_pin_configure_dt(&bucken_spec, GPIO_DISCONNECTED); in rpu_gpio_remove()
209 if (ret) { in rpu_gpio_remove()
211 return ret; in rpu_gpio_remove()
214 ret = gpio_pin_configure_dt(&iovdd_ctrl_spec, GPIO_DISCONNECTED); in rpu_gpio_remove()
215 if (ret) { in rpu_gpio_remove()
217 return ret; in rpu_gpio_remove()
221 return ret; in rpu_gpio_remove()
226 int ret; in rpu_pwron() local
228 ret = gpio_pin_set_dt(&bucken_spec, 1); in rpu_pwron()
229 if (ret) { in rpu_pwron()
231 return ret; in rpu_pwron()
236 ret = gpio_pin_set_dt(&iovdd_ctrl_spec, 1); in rpu_pwron()
237 if (ret) { in rpu_pwron()
240 return ret; in rpu_pwron()
256 return ret; in rpu_pwron()
261 int ret; in rpu_pwroff() local
263 ret = gpio_pin_set_dt(&bucken_spec, 0); /* BUCKEN = 0 */ in rpu_pwroff()
264 if (ret) { in rpu_pwroff()
266 return ret; in rpu_pwroff()
269 ret = gpio_pin_set_dt(&iovdd_ctrl_spec, 0); /* IOVDD CNTRL = 0 */ in rpu_pwroff()
270 if (ret) { in rpu_pwroff()
272 return ret; in rpu_pwroff()
275 return ret; in rpu_pwroff()
315 int ret; in rpu_wakeup() local
317 ret = rpu_wrsr2(1); in rpu_wakeup()
318 if (ret) { in rpu_wakeup()
320 return ret; in rpu_wakeup()
323 ret = rpu_rdsr2(); in rpu_wakeup()
324 if (ret < 0) { in rpu_wakeup()
326 return ret; in rpu_wakeup()
329 ret = rpu_rdsr1(); in rpu_wakeup()
330 if (ret < 0) { in rpu_wakeup()
332 return ret; in rpu_wakeup()
345 int ret; in rpu_get_sleep_stats() local
347 ret = rpu_wakeup(); in rpu_get_sleep_stats()
348 if (ret) { in rpu_get_sleep_stats()
353 ret = rpu_read(addr, buff, wrd_len * 4); in rpu_get_sleep_stats()
354 if (ret) { in rpu_get_sleep_stats()
359 ret = rpu_sleep(); in rpu_get_sleep_stats()
360 if (ret) { in rpu_get_sleep_stats()
368 int ret; in rpu_wrsr2() local
371 ret = qspi_cmd_wakeup_rpu(&qspi_perip, data); in rpu_wrsr2()
373 ret = spim_cmd_rpu_wakeup_fn(data); in rpu_wrsr2()
377 return ret; in rpu_wrsr2()
413 int ret; in rpu_validate_comms() local
416 ret = rpu_read(0x0005C, &rpu_test, 4); in rpu_validate_comms()
417 if (ret) { in rpu_validate_comms()
419 return ret; in rpu_validate_comms()
435 int ret; in rpu_init() local
440 ret = rpu_gpio_config(); in rpu_init()
441 if (ret) { in rpu_init()
446 ret = sr_gpio_config(); in rpu_init()
447 if (ret) { in rpu_init()
451 ret = rpu_pwron(); in rpu_init()
452 if (ret) { in rpu_init()
469 return ret; in rpu_init()
474 int ret; in rpu_enable() local
476 ret = rpu_wakeup(); in rpu_enable()
477 if (ret) { in rpu_enable()
481 ret = rpu_clks_on(); in rpu_enable()
482 if (ret) { in rpu_enable()
491 ret = rpu_validate_comms(); in rpu_enable()
492 if (ret) { in rpu_enable()
499 return ret; in rpu_enable()
504 int ret; in rpu_disable() local
506 ret = rpu_pwroff(); in rpu_disable()
507 if (ret) { in rpu_disable()
510 ret = rpu_gpio_remove(); in rpu_disable()
511 if (ret) { in rpu_disable()
516 ret = sr_gpio_remove(); in rpu_disable()
517 if (ret) { in rpu_disable()
525 return ret; in rpu_disable()