Lines Matching refs:slave

53 	struct spi_slave *slave = dev_get_parent_priv(dev);  in dm_spi_claim_bus()  local
56 speed = slave->max_hz; in dm_spi_claim_bus()
57 mode = slave->mode; in dm_spi_claim_bus()
69 int ret = spi_set_speed_mode(bus, speed, slave->mode); in dm_spi_claim_bus()
118 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument
120 return log_ret(dm_spi_claim_bus(slave->dev)); in spi_claim_bus()
123 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument
125 dm_spi_release_bus(slave->dev); in spi_release_bus()
128 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, in spi_xfer() argument
131 return dm_spi_xfer(slave->dev, bitlen, dout, din, flags); in spi_xfer()
134 int spi_write_then_read(struct spi_slave *slave, const u8 *opcode, in spi_write_then_read() argument
144 ret = spi_xfer(slave, n_opcode * 8, opcode, NULL, flags); in spi_write_then_read()
149 ret = spi_xfer(slave, n_buf * 8, txbuf, rxbuf, SPI_XFER_END); in spi_write_then_read()
206 struct spi_slave *slave = dev_get_parent_priv(dev); in spi_child_pre_probe() local
215 slave->dev = dev; in spi_child_pre_probe()
217 slave->max_hz = plat->max_hz; in spi_child_pre_probe()
218 slave->mode = plat->mode; in spi_child_pre_probe()
219 slave->wordlen = SPI_DEFAULT_WORDLEN; in spi_child_pre_probe()
333 struct spi_slave *slave; in spi_get_bus_and_cs() local
380 struct spi_slave *slave; in spi_get_bus_and_cs() local
385 slave = dev_get_parent_priv(dev); in spi_get_bus_and_cs()
386 slave->dev = dev; in spi_get_bus_and_cs()
389 slave = dev_get_parent_priv(dev); in spi_get_bus_and_cs()
397 ret = spi_claim_bus(slave); in spi_get_bus_and_cs()
403 *devp = slave; in spi_get_bus_and_cs()
423 struct spi_slave *slave; in spi_setup_slave() local
428 &slave); in spi_setup_slave()
432 return slave; in spi_setup_slave()
435 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument
437 device_remove(slave->dev, DM_REMOVE_NORMAL); in spi_free_slave()
438 slave->dev = NULL; in spi_free_slave()