Lines Matching refs:slave

57 	struct spi_slave *slave = dev_get_parent_priv(dev);  in dm_spi_claim_bus()  local
60 speed = slave->max_hz; in dm_spi_claim_bus()
61 mode = slave->mode; in dm_spi_claim_bus()
73 int ret = spi_set_speed_mode(bus, speed, slave->mode); in dm_spi_claim_bus()
122 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument
124 return log_ret(dm_spi_claim_bus(slave->dev)); in spi_claim_bus()
127 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument
129 dm_spi_release_bus(slave->dev); in spi_release_bus()
132 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, in spi_xfer() argument
135 return dm_spi_xfer(slave->dev, bitlen, dout, din, flags); in spi_xfer()
138 int spi_write_then_read(struct spi_slave *slave, const u8 *opcode, in spi_write_then_read() argument
148 ret = spi_xfer(slave, n_opcode * 8, opcode, NULL, flags); in spi_write_then_read()
150 dev_dbg(slave->dev, in spi_write_then_read()
154 ret = spi_xfer(slave, n_buf * 8, txbuf, rxbuf, SPI_XFER_END); in spi_write_then_read()
156 dev_dbg(slave->dev, in spi_write_then_read()
212 struct spi_slave *slave = dev_get_parent_priv(dev); in spi_child_pre_probe() local
221 slave->dev = dev; in spi_child_pre_probe()
223 slave->max_hz = plat->max_hz; in spi_child_pre_probe()
224 slave->mode = plat->mode; in spi_child_pre_probe()
225 slave->wordlen = SPI_DEFAULT_WORDLEN; in spi_child_pre_probe()
339 struct spi_slave *slave; in spi_get_bus_and_cs() local
386 struct spi_slave *slave; in spi_get_bus_and_cs() local
391 slave = dev_get_parent_priv(dev); in spi_get_bus_and_cs()
392 slave->dev = dev; in spi_get_bus_and_cs()
395 slave = dev_get_parent_priv(dev); in spi_get_bus_and_cs()
403 ret = spi_claim_bus(slave); in spi_get_bus_and_cs()
409 *devp = slave; in spi_get_bus_and_cs()
429 struct spi_slave *slave; in spi_setup_slave() local
434 &slave); in spi_setup_slave()
438 return slave; in spi_setup_slave()
441 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument
443 device_remove(slave->dev, DM_REMOVE_NORMAL); in spi_free_slave()