Lines Matching refs:rc

155 	int rc;
158 rc = __i2c_transfer(adapter, msg, 1);
159 if (rc == 1)
163 try + 1, TPM_CR50_I2C_MAX_RETRIES, rc);
200 int rc;
208 rc = tpm_cr50_i2c_transfer_message(&chip->dev, client->adapter, &msg_reg_addr);
209 if (rc < 0)
213 rc = tpm_cr50_i2c_wait_tpm_ready(chip);
214 if (rc < 0)
218 rc = tpm_cr50_i2c_transfer_message(&chip->dev, client->adapter, &msg_response);
224 if (rc < 0)
225 return rc;
255 int rc;
270 rc = tpm_cr50_i2c_transfer_message(&chip->dev, client->adapter, &msg);
271 if (rc < 0)
281 if (rc < 0)
282 return rc;
299 int rc;
301 rc = tpm_cr50_i2c_read(chip, TPM_I2C_ACCESS(0), &buf, sizeof(buf));
302 if (rc < 0)
303 return rc;
343 int rc;
348 rc = tpm_cr50_i2c_write(chip, TPM_I2C_ACCESS(0), &buf, sizeof(buf));
349 if (rc < 0)
350 return rc;
458 int rc;
463 rc = tpm_cr50_i2c_get_burst_and_status(chip, mask, &burstcnt, &status);
464 if (rc < 0)
471 rc = -EIO;
476 rc = tpm_cr50_i2c_read(chip, addr, buf, burstcnt);
477 if (rc < 0) {
486 rc = -E2BIG;
494 rc = tpm_cr50_i2c_get_burst_and_status(chip, mask, &burstcnt, &status);
495 if (rc < 0)
499 rc = tpm_cr50_i2c_read(chip, addr, buf + cur, len);
500 if (rc < 0) {
509 rc = tpm_cr50_i2c_get_burst_and_status(chip, TPM_STS_VALID, &burstcnt, &status);
510 if (rc < 0)
514 rc = -EIO;
527 return rc;
546 int rc;
548 rc = tpm_cr50_request_locality(chip);
549 if (rc < 0)
550 return rc;
556 rc = -ETIMEDOUT;
571 rc = tpm_cr50_i2c_get_burst_and_status(chip, mask, &burstcnt, &status);
572 if (rc < 0)
580 rc = tpm_cr50_i2c_write(chip, TPM_I2C_DATA_FIFO(0), &buf[sent], limit);
581 if (rc < 0) {
591 rc = tpm_cr50_i2c_get_burst_and_status(chip, TPM_STS_VALID, &burstcnt, &status);
592 if (rc < 0)
596 rc = -EIO;
601 rc = tpm_cr50_i2c_write(chip, TPM_I2C_STS(0), tpm_go,
603 if (rc < 0) {
615 return rc;
686 int rc;
714 rc = devm_request_irq(dev, client->irq, tpm_cr50_i2c_int_handler,
718 if (rc < 0) {
720 return rc;
729 rc = tpm_cr50_request_locality(chip);
730 if (rc < 0) {
732 return rc;
736 rc = tpm_cr50_i2c_read(chip, TPM_I2C_DID_VID(0), buf, sizeof(buf));
737 if (rc < 0) {
740 return rc;