Lines Matching refs:tx
172 u8 tx[2], rx[1]; in mcp23s08_read() local
175 tx[0] = mcp->addr | 0x01; in mcp23s08_read()
176 tx[1] = reg; in mcp23s08_read()
177 status = spi_write_then_read(mcp->data, tx, sizeof(tx), rx, sizeof(rx)); in mcp23s08_read()
183 u8 tx[3]; in mcp23s08_write() local
185 tx[0] = mcp->addr; in mcp23s08_write()
186 tx[1] = reg; in mcp23s08_write()
187 tx[2] = val; in mcp23s08_write()
188 return spi_write_then_read(mcp->data, tx, sizeof(tx), NULL, 0); in mcp23s08_write()
194 u8 tx[2], *tmp; in mcp23s08_read_regs() local
199 tx[0] = mcp->addr | 0x01; in mcp23s08_read_regs()
200 tx[1] = reg; in mcp23s08_read_regs()
203 status = spi_write_then_read(mcp->data, tx, sizeof(tx), tmp, n); in mcp23s08_read_regs()
213 u8 tx[2], rx[2]; in mcp23s17_read() local
216 tx[0] = mcp->addr | 0x01; in mcp23s17_read()
217 tx[1] = reg << 1; in mcp23s17_read()
218 status = spi_write_then_read(mcp->data, tx, sizeof(tx), rx, sizeof(rx)); in mcp23s17_read()
224 u8 tx[4]; in mcp23s17_write() local
226 tx[0] = mcp->addr; in mcp23s17_write()
227 tx[1] = reg << 1; in mcp23s17_write()
228 tx[2] = val; in mcp23s17_write()
229 tx[3] = val >> 8; in mcp23s17_write()
230 return spi_write_then_read(mcp->data, tx, sizeof(tx), NULL, 0); in mcp23s17_write()
236 u8 tx[2]; in mcp23s17_read_regs() local
241 tx[0] = mcp->addr | 0x01; in mcp23s17_read_regs()
242 tx[1] = reg << 1; in mcp23s17_read_regs()
244 status = spi_write_then_read(mcp->data, tx, sizeof(tx), in mcp23s17_read_regs()