Lines Matching full:master
80 static void spi100k_enable_clock(struct spi_master *master) in spi100k_enable_clock() argument
83 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in spi100k_enable_clock()
91 static void spi100k_disable_clock(struct spi_master *master) in spi100k_disable_clock() argument
94 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in spi100k_disable_clock()
102 static void spi100k_write_data(struct spi_master *master, int len, int data) in spi100k_write_data() argument
104 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in spi100k_write_data()
112 spi100k_enable_clock(master); in spi100k_write_data()
125 spi100k_disable_clock(master); in spi100k_write_data()
128 static int spi100k_read_data(struct spi_master *master, int len) in spi100k_read_data() argument
131 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in spi100k_read_data()
137 spi100k_enable_clock(master); in spi100k_read_data()
149 spi100k_disable_clock(master); in spi100k_read_data()
154 static void spi100k_open(struct spi_master *master) in spi100k_open() argument
157 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in spi100k_open()
197 spi100k_write_data(spi->master, word_len, *tx++); in omap1_spi100k_txrx_pio()
199 *rx++ = spi100k_read_data(spi->master, word_len); in omap1_spi100k_txrx_pio()
210 spi100k_write_data(spi->master, word_len, *tx++); in omap1_spi100k_txrx_pio()
212 *rx++ = spi100k_read_data(spi->master, word_len); in omap1_spi100k_txrx_pio()
223 spi100k_write_data(spi->master, word_len, *tx); in omap1_spi100k_txrx_pio()
225 *rx = spi100k_read_data(spi->master, word_len); in omap1_spi100k_txrx_pio()
235 struct omap1_spi100k *spi100k = spi_master_get_devdata(spi->master); in omap1_spi100k_setup_transfer()
265 spi100k = spi_master_get_devdata(spi->master); in omap1_spi100k_setup()
275 spi100k_open(spi->master); in omap1_spi100k_setup()
288 static int omap1_spi100k_transfer_one_message(struct spi_master *master, in omap1_spi100k_transfer_one_message() argument
291 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in omap1_spi100k_transfer_one_message()
340 spi_finalize_current_message(master); in omap1_spi100k_transfer_one_message()
347 struct spi_master *master; in omap1_spi100k_probe() local
354 master = spi_alloc_master(&pdev->dev, sizeof(*spi100k)); in omap1_spi100k_probe()
355 if (master == NULL) { in omap1_spi100k_probe()
356 dev_dbg(&pdev->dev, "master allocation failed\n"); in omap1_spi100k_probe()
361 master->bus_num = pdev->id; in omap1_spi100k_probe()
363 master->setup = omap1_spi100k_setup; in omap1_spi100k_probe()
364 master->transfer_one_message = omap1_spi100k_transfer_one_message; in omap1_spi100k_probe()
365 master->num_chipselect = 2; in omap1_spi100k_probe()
366 master->mode_bits = MODEBITS; in omap1_spi100k_probe()
367 master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32); in omap1_spi100k_probe()
368 master->min_speed_hz = OMAP1_SPI100K_MAX_FREQ/(1<<16); in omap1_spi100k_probe()
369 master->max_speed_hz = OMAP1_SPI100K_MAX_FREQ; in omap1_spi100k_probe()
370 master->auto_runtime_pm = true; in omap1_spi100k_probe()
372 spi100k = spi_master_get_devdata(master); in omap1_spi100k_probe()
410 status = devm_spi_register_master(&pdev->dev, master); in omap1_spi100k_probe()
422 spi_master_put(master); in omap1_spi100k_probe()
428 struct spi_master *master = platform_get_drvdata(pdev); in omap1_spi100k_remove() local
429 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in omap1_spi100k_remove()
442 struct spi_master *master = dev_get_drvdata(dev); in omap1_spi100k_runtime_suspend() local
443 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in omap1_spi100k_runtime_suspend()
453 struct spi_master *master = dev_get_drvdata(dev); in omap1_spi100k_runtime_resume() local
454 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in omap1_spi100k_runtime_resume()