Lines Matching full:status

43 	int status = 0;  in smb_word_op()  local
75 status = -EBUSY; in smb_word_op()
80 status = -EIO; in smb_word_op()
89 return status; in smb_word_op()
97 int status; in secocec_adap_enable() local
100 /* Clear the status register */ in secocec_adap_enable()
101 status = smb_rd16(SECOCEC_STATUS_REG_1, &val); in secocec_adap_enable()
102 if (status) in secocec_adap_enable()
105 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_adap_enable()
106 if (status) in secocec_adap_enable()
110 status = smb_rd16(SECOCEC_ENABLE_REG_1, &val); in secocec_adap_enable()
111 if (status) in secocec_adap_enable()
114 status = smb_wr16(SECOCEC_ENABLE_REG_1, in secocec_adap_enable()
116 if (status) in secocec_adap_enable()
121 /* Clear the status register */ in secocec_adap_enable()
122 status = smb_rd16(SECOCEC_STATUS_REG_1, &val); in secocec_adap_enable()
123 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_adap_enable()
126 status = smb_rd16(SECOCEC_ENABLE_REG_1, &val); in secocec_adap_enable()
127 status = smb_wr16(SECOCEC_ENABLE_REG_1, val & in secocec_adap_enable()
136 return status; in secocec_adap_enable()
142 int status; in secocec_adap_log_addr() local
145 status = smb_rd16(SECOCEC_ENABLE_REG_1, &enable_val); in secocec_adap_log_addr()
146 if (status) in secocec_adap_log_addr()
147 return status; in secocec_adap_log_addr()
149 status = smb_wr16(SECOCEC_ENABLE_REG_1, in secocec_adap_log_addr()
151 if (status) in secocec_adap_log_addr()
152 return status; in secocec_adap_log_addr()
157 status = smb_wr16(SECOCEC_DEVICE_LA, logical_addr & 0xf); in secocec_adap_log_addr()
158 if (status) in secocec_adap_log_addr()
159 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()
175 int status; in secocec_adap_transmit() local
182 status = smb_wr16(SECOCEC_WRITE_DATA_LENGTH, payload_id_len); in secocec_adap_transmit()
183 if (status) in secocec_adap_transmit()
188 status = smb_wr16(SECOCEC_WRITE_OPERATION_ID, msg->msg[1]); in secocec_adap_transmit()
189 if (status) in secocec_adap_transmit()
206 status = smb_wr16(SECOCEC_WRITE_DATA_00 + i / 2, val); in secocec_adap_transmit()
207 if (status) in secocec_adap_transmit()
213 status = smb_wr16(SECOCEC_WRITE_BYTE0, destination); in secocec_adap_transmit()
214 if (status) in secocec_adap_transmit()
220 return status; in secocec_adap_transmit()
234 /* Reset status reg */ in secocec_tx_done()
250 int status; in secocec_rx_done() local
260 status = -EIO; in secocec_rx_done()
265 status = smb_rd16(SECOCEC_READ_DATA_LENGTH, &val); in secocec_rx_done()
266 if (status) in secocec_rx_done()
273 status = smb_rd16(SECOCEC_READ_BYTE0, &val); in secocec_rx_done()
274 if (status) in secocec_rx_done()
281 status = smb_rd16(SECOCEC_READ_OPERATION_ID, &val); in secocec_rx_done()
282 if (status) in secocec_rx_done()
294 status = smb_rd16(SECOCEC_READ_DATA_00 + i / 2, &val); in secocec_rx_done()
295 if (status) in secocec_rx_done()
308 /* Reset status reg */ in secocec_rx_done()
313 status = smb_wr16(SECOCEC_STATUS, status_val); in secocec_rx_done()
338 int status; in secocec_ir_probe() local
361 /* Clear the status register */ in secocec_ir_probe()
362 status = smb_rd16(SECOCEC_STATUS_REG_1, &val); in secocec_ir_probe()
363 if (status != 0) in secocec_ir_probe()
366 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_ir_probe()
367 if (status != 0) in secocec_ir_probe()
371 status = smb_rd16(SECOCEC_ENABLE_REG_1, &val); in secocec_ir_probe()
372 if (status != 0) in secocec_ir_probe()
375 status = smb_wr16(SECOCEC_ENABLE_REG_1, in secocec_ir_probe()
377 if (status != 0) in secocec_ir_probe()
382 status = devm_rc_register_device(dev, cec->ir); in secocec_ir_probe()
384 if (status) { in secocec_ir_probe()
399 return status; in secocec_ir_probe()
406 u16 val, status, key, addr, toggle; in secocec_ir_rx() local
411 status = smb_rd16(SECOCEC_IR_READ_DATA, &val); in secocec_ir_rx()
412 if (status != 0) in secocec_ir_rx()
427 dev_err(dev, "IR Receive message failed (%d)\n", status); in secocec_ir_rx()
446 int status; in secocec_irq_handler() local
448 /* Read status register */ in secocec_irq_handler()
449 status = smb_rd16(SECOCEC_STATUS_REG_1, &status_val); in secocec_irq_handler()
450 if (status) in secocec_irq_handler()
454 /* Read CEC status register */ in secocec_irq_handler()
455 status = smb_rd16(SECOCEC_STATUS, &cec_val); in secocec_irq_handler()
456 if (status) in secocec_irq_handler()
479 /* Reset status register */ in secocec_irq_handler()
480 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_irq_handler()
481 if (status) in secocec_irq_handler()
487 dev_err_once(dev, "IRQ: R/W SMBus operation failed %d\n", status); in secocec_irq_handler()
489 /* Reset status register */ in secocec_irq_handler()
696 int status; in secocec_suspend() local
701 /* Clear the status register */ in secocec_suspend()
702 status = smb_rd16(SECOCEC_STATUS_REG_1, &val); in secocec_suspend()
703 if (status) in secocec_suspend()
706 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_suspend()
707 if (status) in secocec_suspend()
711 status = smb_rd16(SECOCEC_ENABLE_REG_1, &val); in secocec_suspend()
712 if (status) in secocec_suspend()
715 status = smb_wr16(SECOCEC_ENABLE_REG_1, val & in secocec_suspend()
717 if (status) in secocec_suspend()
723 dev_err(dev, "Suspend failed: %d\n", status); in secocec_suspend()
724 return status; in secocec_suspend()
729 int status; in secocec_resume() local
734 /* Clear the status register */ in secocec_resume()
735 status = smb_rd16(SECOCEC_STATUS_REG_1, &val); in secocec_resume()
736 if (status) in secocec_resume()
739 status = smb_wr16(SECOCEC_STATUS_REG_1, val); in secocec_resume()
740 if (status) in secocec_resume()
744 status = smb_rd16(SECOCEC_ENABLE_REG_1, &val); in secocec_resume()
745 if (status) in secocec_resume()
748 status = smb_wr16(SECOCEC_ENABLE_REG_1, val | SECOCEC_ENABLE_REG_1_CEC); in secocec_resume()
749 if (status) in secocec_resume()
757 dev_err(dev, "Resume failed: %d\n", status); in secocec_resume()
758 return status; in secocec_resume()