Lines Matching refs:ctlr
129 static int mtk_spi_slave_prepare_message(struct spi_controller *ctlr, in mtk_spi_slave_prepare_message() argument
132 struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); in mtk_spi_slave_prepare_message()
162 static int mtk_spi_slave_fifo_transfer(struct spi_controller *ctlr, in mtk_spi_slave_fifo_transfer() argument
166 struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); in mtk_spi_slave_fifo_transfer()
199 static int mtk_spi_slave_dma_transfer(struct spi_controller *ctlr, in mtk_spi_slave_dma_transfer() argument
203 struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); in mtk_spi_slave_dma_transfer()
282 static int mtk_spi_slave_transfer_one(struct spi_controller *ctlr, in mtk_spi_slave_transfer_one() argument
286 struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); in mtk_spi_slave_transfer_one()
293 return mtk_spi_slave_dma_transfer(ctlr, spi, xfer); in mtk_spi_slave_transfer_one()
295 return mtk_spi_slave_fifo_transfer(ctlr, spi, xfer); in mtk_spi_slave_transfer_one()
317 static int mtk_slave_abort(struct spi_controller *ctlr) in mtk_slave_abort() argument
319 struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); in mtk_slave_abort()
329 struct spi_controller *ctlr = dev_id; in mtk_spi_slave_interrupt() local
330 struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); in mtk_spi_slave_interrupt()
374 dev_warn(&ctlr->dev, "cmd invalid\n"); in mtk_spi_slave_interrupt()
386 struct spi_controller *ctlr; in mtk_spi_slave_probe() local
391 ctlr = spi_alloc_slave(&pdev->dev, sizeof(*mdata)); in mtk_spi_slave_probe()
392 if (!ctlr) { in mtk_spi_slave_probe()
397 ctlr->auto_runtime_pm = true; in mtk_spi_slave_probe()
398 ctlr->dev.of_node = pdev->dev.of_node; in mtk_spi_slave_probe()
399 ctlr->mode_bits = SPI_CPOL | SPI_CPHA; in mtk_spi_slave_probe()
400 ctlr->mode_bits |= SPI_LSB_FIRST; in mtk_spi_slave_probe()
402 ctlr->prepare_message = mtk_spi_slave_prepare_message; in mtk_spi_slave_probe()
403 ctlr->transfer_one = mtk_spi_slave_transfer_one; in mtk_spi_slave_probe()
404 ctlr->setup = mtk_spi_slave_setup; in mtk_spi_slave_probe()
405 ctlr->slave_abort = mtk_slave_abort; in mtk_spi_slave_probe()
413 mdata = spi_controller_get_devdata(ctlr); in mtk_spi_slave_probe()
417 ctlr->flags = SPI_MASTER_MUST_RX; in mtk_spi_slave_probe()
419 platform_set_drvdata(pdev, ctlr); in mtk_spi_slave_probe()
436 IRQF_TRIGGER_NONE, dev_name(&pdev->dev), ctlr); in mtk_spi_slave_probe()
457 ret = devm_spi_register_controller(&pdev->dev, ctlr); in mtk_spi_slave_probe()
472 spi_controller_put(ctlr); in mtk_spi_slave_probe()
487 struct spi_controller *ctlr = dev_get_drvdata(dev); in mtk_spi_slave_suspend() local
488 struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); in mtk_spi_slave_suspend()
491 ret = spi_controller_suspend(ctlr); in mtk_spi_slave_suspend()
503 struct spi_controller *ctlr = dev_get_drvdata(dev); in mtk_spi_slave_resume() local
504 struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); in mtk_spi_slave_resume()
515 ret = spi_controller_resume(ctlr); in mtk_spi_slave_resume()
526 struct spi_controller *ctlr = dev_get_drvdata(dev); in mtk_spi_slave_runtime_suspend() local
527 struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); in mtk_spi_slave_runtime_suspend()
536 struct spi_controller *ctlr = dev_get_drvdata(dev); in mtk_spi_slave_runtime_resume() local
537 struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); in mtk_spi_slave_runtime_resume()