• Home
  • Raw
  • Download

Lines Matching refs:master

60 			"%s registers:\n", dev_name(&dws->master->dev));  in dw_spi_show_regs()
112 snprintf(name, 128, "dw_spi-%s", dev_name(&dws->master->dev)); in dw_spi_debugfs_init()
140 struct dw_spi *dws = spi_master_get_devdata(spi->master); in dw_spi_set_cs()
227 dev_err(&dws->master->dev, "%s\n", msg); in int_error_stop()
228 dws->master->cur_msg->status = -EIO; in int_error_stop()
229 spi_finalize_current_transfer(dws->master); in int_error_stop()
246 spi_finalize_current_transfer(dws->master); in interrupt_transfer()
261 struct spi_master *master = dev_id; in dw_spi_irq() local
262 struct dw_spi *dws = spi_master_get_devdata(master); in dw_spi_irq()
268 if (!master->cur_msg) { in dw_spi_irq()
288 static int dw_spi_transfer_one(struct spi_master *master, in dw_spi_transfer_one() argument
291 struct dw_spi *dws = spi_master_get_devdata(master); in dw_spi_transfer_one()
358 if (master->can_dma && master->can_dma(master, spi, transfer)) in dw_spi_transfer_one()
359 dws->dma_mapped = master->cur_msg_mapped; in dw_spi_transfer_one()
397 static void dw_spi_handle_err(struct spi_master *master, in dw_spi_handle_err() argument
400 struct dw_spi *dws = spi_master_get_devdata(master); in dw_spi_handle_err()
485 struct spi_master *master; in dw_spi_add_host() local
490 master = spi_alloc_master(dev, 0); in dw_spi_add_host()
491 if (!master) in dw_spi_add_host()
494 dws->master = master; in dw_spi_add_host()
501 spi_master_set_devdata(master, dws); in dw_spi_add_host()
503 ret = request_irq(dws->irq, dw_spi_irq, IRQF_SHARED, dws->name, master); in dw_spi_add_host()
509 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LOOP; in dw_spi_add_host()
510 master->bits_per_word_mask = SPI_BPW_MASK(8) | SPI_BPW_MASK(16); in dw_spi_add_host()
511 master->bus_num = dws->bus_num; in dw_spi_add_host()
512 master->num_chipselect = dws->num_cs; in dw_spi_add_host()
513 master->setup = dw_spi_setup; in dw_spi_add_host()
514 master->cleanup = dw_spi_cleanup; in dw_spi_add_host()
515 master->set_cs = dw_spi_set_cs; in dw_spi_add_host()
516 master->transfer_one = dw_spi_transfer_one; in dw_spi_add_host()
517 master->handle_err = dw_spi_handle_err; in dw_spi_add_host()
518 master->max_speed_hz = dws->max_freq; in dw_spi_add_host()
519 master->dev.of_node = dev->of_node; in dw_spi_add_host()
530 master->can_dma = dws->dma_ops->can_dma; in dw_spi_add_host()
534 ret = spi_register_master(master); in dw_spi_add_host()
536 dev_err(&master->dev, "problem registering spi master\n"); in dw_spi_add_host()
547 free_irq(dws->irq, master); in dw_spi_add_host()
549 spi_master_put(master); in dw_spi_add_host()
558 spi_unregister_master(dws->master); in dw_spi_remove_host()
565 free_irq(dws->irq, dws->master); in dw_spi_remove_host()
573 ret = spi_master_suspend(dws->master); in dw_spi_suspend_host()
586 spi_hw_init(&dws->master->dev, dws); in dw_spi_resume_host()
587 ret = spi_master_resume(dws->master); in dw_spi_resume_host()
589 dev_err(&dws->master->dev, "fail to start queue (%d)\n", ret); in dw_spi_resume_host()