Lines Matching refs:master
93 struct spi_master *master;
118 static void spi100k_enable_clock(struct spi_master *master)
121 struct omap1_spi100k *spi100k = spi_master_get_devdata(master);
129 static void spi100k_disable_clock(struct spi_master *master)
132 struct omap1_spi100k *spi100k = spi_master_get_devdata(master);
140 static void spi100k_write_data(struct spi_master *master, int len, int data)
142 struct omap1_spi100k *spi100k = spi_master_get_devdata(master);
150 spi100k_enable_clock(master);
162 spi100k_disable_clock(master);
165 static int spi100k_read_data(struct spi_master *master, int len)
168 struct omap1_spi100k *spi100k = spi_master_get_devdata(master);
174 spi100k_enable_clock(master);
185 spi100k_disable_clock(master);
190 static void spi100k_open(struct spi_master *master)
193 struct omap1_spi100k *spi100k = spi_master_get_devdata(master);
221 spi100k = spi_master_get_devdata(spi->master);
235 spi100k_write_data(spi->master, word_len, *tx++);
237 *rx++ = spi100k_read_data(spi->master, word_len);
248 spi100k_write_data(spi->master,word_len, *tx++);
250 *rx++ = spi100k_read_data(spi->master,word_len);
261 spi100k_write_data(spi->master,word_len, *tx);
263 *rx = spi100k_read_data(spi->master,word_len);
273 struct omap1_spi100k *spi100k = spi_master_get_devdata(spi->master);
309 spi100k = spi_master_get_devdata(spi->master);
319 spi100k_open(spi->master);
346 * channel" master mode. As a side effect, we need to manage the
440 spi100k = spi_master_get_devdata(spi->master);
493 struct spi_master *master;
500 master = spi_alloc_master(&pdev->dev, sizeof *spi100k);
501 if (master == NULL) {
502 dev_dbg(&pdev->dev, "master allocation failed\n");
507 master->bus_num = pdev->id;
509 master->setup = omap1_spi100k_setup;
510 master->transfer = omap1_spi100k_transfer;
511 master->cleanup = NULL;
512 master->num_chipselect = 2;
513 master->mode_bits = MODEBITS;
515 dev_set_drvdata(&pdev->dev, master);
517 spi100k = spi_master_get_devdata(master);
518 spi100k->master = master;
548 status = spi_register_master(master);
561 spi_master_put(master);
567 struct spi_master *master;
574 master = dev_get_drvdata(&pdev->dev);
575 spi100k = spi_master_get_devdata(master);
599 spi_unregister_master(master);