Lines Matching refs:master
73 struct mpc512x_psc_spi *mps = spi_master_get_devdata(spi->master); in mpc512x_psc_spi_activate_cs()
116 struct mpc512x_psc_spi *mps = spi_master_get_devdata(spi->master); in mpc512x_psc_spi_deactivate_cs()
131 struct mpc512x_psc_spi *mps = spi_master_get_devdata(spi->master); in mpc512x_psc_spi_transfer_rxtx()
268 static int mpc512x_psc_spi_msg_xfer(struct spi_master *master, in mpc512x_psc_spi_msg_xfer() argument
311 spi_finalize_current_message(master); in mpc512x_psc_spi_msg_xfer()
315 static int mpc512x_psc_spi_prep_xfer_hw(struct spi_master *master) in mpc512x_psc_spi_prep_xfer_hw() argument
317 struct mpc512x_psc_spi *mps = spi_master_get_devdata(master); in mpc512x_psc_spi_prep_xfer_hw()
320 dev_dbg(&master->dev, "%s()\n", __func__); in mpc512x_psc_spi_prep_xfer_hw()
332 static int mpc512x_psc_spi_unprep_xfer_hw(struct spi_master *master) in mpc512x_psc_spi_unprep_xfer_hw() argument
334 struct mpc512x_psc_spi *mps = spi_master_get_devdata(master); in mpc512x_psc_spi_unprep_xfer_hw()
338 dev_dbg(&master->dev, "%s()\n", __func__); in mpc512x_psc_spi_unprep_xfer_hw()
388 static int mpc512x_psc_spi_port_config(struct spi_master *master, in mpc512x_psc_spi_port_config() argument
474 struct spi_master *master; in mpc512x_psc_spi_do_probe() local
479 master = spi_alloc_master(dev, sizeof *mps); in mpc512x_psc_spi_do_probe()
480 if (master == NULL) in mpc512x_psc_spi_do_probe()
483 dev_set_drvdata(dev, master); in mpc512x_psc_spi_do_probe()
484 mps = spi_master_get_devdata(master); in mpc512x_psc_spi_do_probe()
491 master->bus_num = pdata->bus_num; in mpc512x_psc_spi_do_probe()
492 master->num_chipselect = pdata->max_chipselect; in mpc512x_psc_spi_do_probe()
495 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST; in mpc512x_psc_spi_do_probe()
496 master->setup = mpc512x_psc_spi_setup; in mpc512x_psc_spi_do_probe()
497 master->prepare_transfer_hardware = mpc512x_psc_spi_prep_xfer_hw; in mpc512x_psc_spi_do_probe()
498 master->transfer_one_message = mpc512x_psc_spi_msg_xfer; in mpc512x_psc_spi_do_probe()
499 master->unprepare_transfer_hardware = mpc512x_psc_spi_unprep_xfer_hw; in mpc512x_psc_spi_do_probe()
500 master->cleanup = mpc512x_psc_spi_cleanup; in mpc512x_psc_spi_do_probe()
501 master->dev.of_node = dev->of_node; in mpc512x_psc_spi_do_probe()
539 ret = mpc512x_psc_spi_port_config(master, mps); in mpc512x_psc_spi_do_probe()
543 ret = devm_spi_register_master(dev, master); in mpc512x_psc_spi_do_probe()
554 spi_master_put(master); in mpc512x_psc_spi_do_probe()
561 struct spi_master *master = dev_get_drvdata(dev); in mpc512x_psc_spi_do_remove() local
562 struct mpc512x_psc_spi *mps = spi_master_get_devdata(master); in mpc512x_psc_spi_do_remove()