Lines Matching refs:rc

90 	int rc;  in fsi_spi_check_mux()  local
94 rc = fsi_slave_read(fsi->slave, FSI_MBOX_ROOT_CTRL_8, &root_ctrl_8_be, in fsi_spi_check_mux()
96 if (rc) in fsi_spi_check_mux()
97 return rc; in fsi_spi_check_mux()
110 int rc; in fsi_spi_check_status() local
114 rc = fsi_device_read(ctx->fsi, FSI2SPI_STATUS, &sts_be, in fsi_spi_check_status()
116 if (rc) in fsi_spi_check_status()
117 return rc; in fsi_spi_check_status()
130 int rc; in fsi_spi_read_reg() local
141 rc = fsi_device_write(ctx->fsi, FSI2SPI_CMD, &cmd_be, sizeof(cmd_be)); in fsi_spi_read_reg()
142 if (rc) in fsi_spi_read_reg()
143 return rc; in fsi_spi_read_reg()
145 rc = fsi_spi_check_status(ctx); in fsi_spi_read_reg()
146 if (rc) in fsi_spi_read_reg()
147 return rc; in fsi_spi_read_reg()
149 rc = fsi_device_read(ctx->fsi, FSI2SPI_DATA0, &data_be, in fsi_spi_read_reg()
151 if (rc) in fsi_spi_read_reg()
152 return rc; in fsi_spi_read_reg()
156 rc = fsi_device_read(ctx->fsi, FSI2SPI_DATA1, &data_be, in fsi_spi_read_reg()
158 if (rc) in fsi_spi_read_reg()
159 return rc; in fsi_spi_read_reg()
169 int rc; in fsi_spi_write_reg() local
180 rc = fsi_device_write(ctx->fsi, FSI2SPI_DATA0, &data_be, in fsi_spi_write_reg()
182 if (rc) in fsi_spi_write_reg()
183 return rc; in fsi_spi_write_reg()
186 rc = fsi_device_write(ctx->fsi, FSI2SPI_DATA1, &data_be, in fsi_spi_write_reg()
188 if (rc) in fsi_spi_write_reg()
189 return rc; in fsi_spi_write_reg()
192 rc = fsi_device_write(ctx->fsi, FSI2SPI_CMD, &cmd_be, sizeof(cmd_be)); in fsi_spi_write_reg()
193 if (rc) in fsi_spi_write_reg()
194 return rc; in fsi_spi_write_reg()
227 int rc; in fsi_spi_reset() local
231 rc = fsi_spi_write_reg(ctx, SPI_FSI_CLOCK_CFG, in fsi_spi_reset()
233 if (rc) in fsi_spi_reset()
234 return rc; in fsi_spi_reset()
236 rc = fsi_spi_write_reg(ctx, SPI_FSI_CLOCK_CFG, in fsi_spi_reset()
238 if (rc) in fsi_spi_reset()
239 return rc; in fsi_spi_reset()
271 int rc; in fsi_spi_sequence_transfer() local
323 rc = fsi_spi_write_reg(ctx, SPI_FSI_COUNTER_CFG, cfg); in fsi_spi_sequence_transfer()
324 if (rc) in fsi_spi_sequence_transfer()
325 return rc; in fsi_spi_sequence_transfer()
339 int rc = 0; in fsi_spi_transfer_data() local
353 rc = fsi_spi_write_reg(ctx, SPI_FSI_DATA_TX, out); in fsi_spi_transfer_data()
354 if (rc) in fsi_spi_transfer_data()
355 return rc; in fsi_spi_transfer_data()
358 rc = fsi_spi_read_reg(ctx, SPI_FSI_STATUS, in fsi_spi_transfer_data()
360 if (rc) in fsi_spi_transfer_data()
361 return rc; in fsi_spi_transfer_data()
364 rc = fsi_spi_reset(ctx); in fsi_spi_transfer_data()
365 if (rc) in fsi_spi_transfer_data()
366 return rc; in fsi_spi_transfer_data()
379 rc = fsi_spi_read_reg(ctx, SPI_FSI_COUNTER_CFG, &cfg); in fsi_spi_transfer_data()
380 if (rc) in fsi_spi_transfer_data()
381 return rc; in fsi_spi_transfer_data()
384 rc = fsi_spi_write_reg(ctx, SPI_FSI_DATA_TX, 0); in fsi_spi_transfer_data()
385 if (rc) in fsi_spi_transfer_data()
386 return rc; in fsi_spi_transfer_data()
391 rc = fsi_spi_read_reg(ctx, SPI_FSI_STATUS, in fsi_spi_transfer_data()
393 if (rc) in fsi_spi_transfer_data()
394 return rc; in fsi_spi_transfer_data()
397 rc = fsi_spi_reset(ctx); in fsi_spi_transfer_data()
398 if (rc) in fsi_spi_transfer_data()
399 return rc; in fsi_spi_transfer_data()
405 rc = fsi_spi_read_reg(ctx, SPI_FSI_DATA_RX, &in); in fsi_spi_transfer_data()
406 if (rc) in fsi_spi_transfer_data()
407 return rc; in fsi_spi_transfer_data()
419 int rc; in fsi_spi_transfer_init() local
434 rc = fsi_spi_read_reg(ctx, SPI_FSI_STATUS, &status); in fsi_spi_transfer_init()
435 if (rc) in fsi_spi_transfer_init()
436 return rc; in fsi_spi_transfer_init()
446 rc = fsi_spi_reset(ctx); in fsi_spi_transfer_init()
447 if (rc) in fsi_spi_transfer_init()
448 return rc; in fsi_spi_transfer_init()
455 rc = fsi_spi_read_reg(ctx, SPI_FSI_CLOCK_CFG, &clock_cfg); in fsi_spi_transfer_init()
456 if (rc) in fsi_spi_transfer_init()
457 return rc; in fsi_spi_transfer_init()
464 rc = fsi_spi_write_reg(ctx, SPI_FSI_CLOCK_CFG, in fsi_spi_transfer_init()
467 return rc; in fsi_spi_transfer_init()
473 int rc; in fsi_spi_transfer_one_message() local
478 rc = fsi_spi_check_mux(ctx->fsi, ctx->dev); in fsi_spi_transfer_one_message()
479 if (rc) in fsi_spi_transfer_one_message()
489 rc = -EINVAL; in fsi_spi_transfer_one_message()
495 rc = fsi_spi_transfer_init(ctx); in fsi_spi_transfer_one_message()
496 if (rc < 0) in fsi_spi_transfer_one_message()
502 rc = fsi_spi_sequence_transfer(ctx, &seq, transfer); in fsi_spi_transfer_one_message()
503 if (rc) in fsi_spi_transfer_one_message()
513 rc = -EINVAL; in fsi_spi_transfer_one_message()
520 rc = fsi_spi_sequence_transfer(ctx, &seq, in fsi_spi_transfer_one_message()
522 if (rc) in fsi_spi_transfer_one_message()
531 rc = fsi_spi_write_reg(ctx, SPI_FSI_SEQUENCE, seq.data); in fsi_spi_transfer_one_message()
532 if (rc) in fsi_spi_transfer_one_message()
535 rc = fsi_spi_transfer_data(ctx, transfer); in fsi_spi_transfer_one_message()
536 if (rc) in fsi_spi_transfer_one_message()
540 rc = fsi_spi_transfer_data(ctx, next); in fsi_spi_transfer_one_message()
541 if (rc) in fsi_spi_transfer_one_message()
549 mesg->status = rc; in fsi_spi_transfer_one_message()
552 return rc; in fsi_spi_transfer_one_message()
564 int rc; in fsi_spi_probe() local
569 rc = fsi_spi_check_mux(fsi, dev); in fsi_spi_probe()
570 if (rc) in fsi_spi_probe()
604 rc = devm_spi_register_controller(dev, ctlr); in fsi_spi_probe()
605 if (rc) in fsi_spi_probe()