Lines Matching refs:adap
53 struct i2c_algo_sibyte_data *adap = i2c_adap->algo_data; in smbus_xfer() local
57 while (csr_in32(SMB_CSR(adap, R_SMB_STATUS)) & M_SMB_BUSY) in smbus_xfer()
63 V_SMB_TT_QUICKCMD), SMB_CSR(adap, R_SMB_START)); in smbus_xfer()
68 SMB_CSR(adap, R_SMB_START)); in smbus_xfer()
71 csr_out32(V_SMB_CMD(command), SMB_CSR(adap, R_SMB_CMD)); in smbus_xfer()
73 SMB_CSR(adap, R_SMB_START)); in smbus_xfer()
77 csr_out32(V_SMB_CMD(command), SMB_CSR(adap, R_SMB_CMD)); in smbus_xfer()
80 SMB_CSR(adap, R_SMB_START)); in smbus_xfer()
83 csr_out32(V_SMB_LB(data->byte), SMB_CSR(adap, R_SMB_DATA)); in smbus_xfer()
85 SMB_CSR(adap, R_SMB_START)); in smbus_xfer()
89 csr_out32(V_SMB_CMD(command), SMB_CSR(adap, R_SMB_CMD)); in smbus_xfer()
92 SMB_CSR(adap, R_SMB_START)); in smbus_xfer()
95 csr_out32(V_SMB_LB(data->word & 0xff), SMB_CSR(adap, R_SMB_DATA)); in smbus_xfer()
96 csr_out32(V_SMB_MB(data->word >> 8), SMB_CSR(adap, R_SMB_DATA)); in smbus_xfer()
98 SMB_CSR(adap, R_SMB_START)); in smbus_xfer()
105 while (csr_in32(SMB_CSR(adap, R_SMB_STATUS)) & M_SMB_BUSY) in smbus_xfer()
108 error = csr_in32(SMB_CSR(adap, R_SMB_STATUS)); in smbus_xfer()
111 csr_out32(M_SMB_ERROR, SMB_CSR(adap, R_SMB_STATUS)); in smbus_xfer()
116 data->byte = csr_in32(SMB_CSR(adap, R_SMB_DATA)) & 0xff; in smbus_xfer()
118 data->word = csr_in32(SMB_CSR(adap, R_SMB_DATA)) & 0xffff; in smbus_xfer()
129 static u32 bit_func(struct i2c_adapter *adap) in bit_func() argument
155 struct i2c_algo_sibyte_data *adap = i2c_adap->algo_data; in i2c_sibyte_add_bus() local
163 csr_out32(speed, SMB_CSR(adap,R_SMB_FREQ)); in i2c_sibyte_add_bus()
164 csr_out32(0, SMB_CSR(adap,R_SMB_CONTROL)); in i2c_sibyte_add_bus()
192 int i2c_sibyte_del_bus(struct i2c_adapter *adap) in i2c_sibyte_del_bus() argument
196 if ((res = i2c_del_adapter(adap)) < 0) in i2c_sibyte_del_bus()