Lines Matching full:status

45 	int status = 0;  in smb_word_op()  local
88 status = -EBUSY; in smb_word_op()
93 status = -EIO; in smb_word_op()
102 return status; in smb_word_op()
110 int status; in secocec_adap_enable() local
113 /* Clear the status register */ in secocec_adap_enable()
114 status = smb_rd16(SECOCEC_STATUS_REG_1, &val); in secocec_adap_enable()
115 if (status) in secocec_adap_enable()
118 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_adap_enable()
119 if (status) in secocec_adap_enable()
123 status = smb_rd16(SECOCEC_ENABLE_REG_1, &val); in secocec_adap_enable()
124 if (status) in secocec_adap_enable()
127 status = smb_wr16(SECOCEC_ENABLE_REG_1, in secocec_adap_enable()
129 if (status) in secocec_adap_enable()
134 /* Clear the status register */ in secocec_adap_enable()
135 status = smb_rd16(SECOCEC_STATUS_REG_1, &val); in secocec_adap_enable()
136 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_adap_enable()
139 status = smb_rd16(SECOCEC_ENABLE_REG_1, &val); in secocec_adap_enable()
140 status = smb_wr16(SECOCEC_ENABLE_REG_1, val & in secocec_adap_enable()
149 return status; in secocec_adap_enable()
155 int status; in secocec_adap_log_addr() local
158 status = smb_rd16(SECOCEC_ENABLE_REG_1, &enable_val); in secocec_adap_log_addr()
159 if (status) in secocec_adap_log_addr()
160 return status; in secocec_adap_log_addr()
162 status = smb_wr16(SECOCEC_ENABLE_REG_1, in secocec_adap_log_addr()
164 if (status) in secocec_adap_log_addr()
165 return status; in secocec_adap_log_addr()
170 status = smb_wr16(SECOCEC_DEVICE_LA, logical_addr & 0xf); in secocec_adap_log_addr()
171 if (status) in secocec_adap_log_addr()
172 return status; in secocec_adap_log_addr()
175 status = smb_wr16(SECOCEC_ENABLE_REG_1, in secocec_adap_log_addr()
177 if (status) in secocec_adap_log_addr()
178 return status; in secocec_adap_log_addr()
188 int status; in secocec_adap_transmit() local
195 status = smb_wr16(SECOCEC_WRITE_DATA_LENGTH, payload_id_len); in secocec_adap_transmit()
196 if (status) in secocec_adap_transmit()
201 status = smb_wr16(SECOCEC_WRITE_OPERATION_ID, msg->msg[1]); in secocec_adap_transmit()
202 if (status) in secocec_adap_transmit()
219 status = smb_wr16(SECOCEC_WRITE_DATA_00 + i / 2, val); in secocec_adap_transmit()
220 if (status) in secocec_adap_transmit()
226 status = smb_wr16(SECOCEC_WRITE_BYTE0, destination); in secocec_adap_transmit()
227 if (status) in secocec_adap_transmit()
233 return status; in secocec_adap_transmit()
247 /* Reset status reg */ in secocec_tx_done()
263 int status; in secocec_rx_done() local
273 status = -EIO; in secocec_rx_done()
278 status = smb_rd16(SECOCEC_READ_DATA_LENGTH, &val); in secocec_rx_done()
279 if (status) in secocec_rx_done()
286 status = smb_rd16(SECOCEC_READ_BYTE0, &val); in secocec_rx_done()
287 if (status) in secocec_rx_done()
294 status = smb_rd16(SECOCEC_READ_OPERATION_ID, &val); in secocec_rx_done()
295 if (status) in secocec_rx_done()
307 status = smb_rd16(SECOCEC_READ_DATA_00 + i / 2, &val); in secocec_rx_done()
308 if (status) in secocec_rx_done()
321 /* Reset status reg */ in secocec_rx_done()
326 status = smb_wr16(SECOCEC_STATUS, status_val); in secocec_rx_done()
351 int status; in secocec_ir_probe() local
374 /* Clear the status register */ in secocec_ir_probe()
375 status = smb_rd16(SECOCEC_STATUS_REG_1, &val); in secocec_ir_probe()
376 if (status != 0) in secocec_ir_probe()
379 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_ir_probe()
380 if (status != 0) in secocec_ir_probe()
384 status = smb_rd16(SECOCEC_ENABLE_REG_1, &val); in secocec_ir_probe()
385 if (status != 0) in secocec_ir_probe()
388 status = smb_wr16(SECOCEC_ENABLE_REG_1, in secocec_ir_probe()
390 if (status != 0) in secocec_ir_probe()
395 status = devm_rc_register_device(dev, cec->ir); in secocec_ir_probe()
397 if (status) { in secocec_ir_probe()
412 return status; in secocec_ir_probe()
419 u16 val, status, key, addr, toggle; in secocec_ir_rx() local
424 status = smb_rd16(SECOCEC_IR_READ_DATA, &val); in secocec_ir_rx()
425 if (status != 0) in secocec_ir_rx()
440 dev_err(dev, "IR Receive message failed (%d)", status); in secocec_ir_rx()
459 int status; in secocec_irq_handler() local
461 /* Read status register */ in secocec_irq_handler()
462 status = smb_rd16(SECOCEC_STATUS_REG_1, &status_val); in secocec_irq_handler()
463 if (status) in secocec_irq_handler()
467 /* Read CEC status register */ in secocec_irq_handler()
468 status = smb_rd16(SECOCEC_STATUS, &cec_val); in secocec_irq_handler()
469 if (status) in secocec_irq_handler()
492 /* Reset status register */ in secocec_irq_handler()
493 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_irq_handler()
494 if (status) in secocec_irq_handler()
500 dev_err_once(dev, "IRQ: R/W SMBus operation failed (%d)", status); in secocec_irq_handler()
502 /* Reset status register */ in secocec_irq_handler()
709 int status; in secocec_suspend() local
714 /* Clear the status register */ in secocec_suspend()
715 status = smb_rd16(SECOCEC_STATUS_REG_1, &val); in secocec_suspend()
716 if (status) in secocec_suspend()
719 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_suspend()
720 if (status) in secocec_suspend()
724 status = smb_rd16(SECOCEC_ENABLE_REG_1, &val); in secocec_suspend()
725 if (status) in secocec_suspend()
728 status = smb_wr16(SECOCEC_ENABLE_REG_1, val & in secocec_suspend()
730 if (status) in secocec_suspend()
736 dev_err(dev, "Suspend failed (err: %d)", status); in secocec_suspend()
737 return status; in secocec_suspend()
742 int status; in secocec_resume() local
747 /* Clear the status register */ in secocec_resume()
748 status = smb_rd16(SECOCEC_STATUS_REG_1, &val); in secocec_resume()
749 if (status) in secocec_resume()
752 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_resume()
753 if (status) in secocec_resume()
757 status = smb_rd16(SECOCEC_ENABLE_REG_1, &val); in secocec_resume()
758 if (status) in secocec_resume()
761 status = smb_wr16(SECOCEC_ENABLE_REG_1, val | SECOCEC_ENABLE_REG_1_CEC); in secocec_resume()
762 if (status) in secocec_resume()
770 dev_err(dev, "Resume failed (err: %d)", status); in secocec_resume()
771 return status; in secocec_resume()