Lines Matching defs:spi
19 #include <linux/spi/spi.h>
20 #include <linux/spi/spi-mem.h>
23 #define DRIVER_NAME "mtk-spi-nor"
212 // prg mode is spi-only.
278 struct mtk_nor *sp = spi_controller_get_devdata(mem->spi->master);
539 // spi-mem won't try this op again with generic spi transfers.
601 struct mtk_nor *sp = spi_controller_get_devdata(mem->spi->master);
640 static int mtk_nor_setup(struct spi_device *spi)
642 struct mtk_nor *sp = spi_controller_get_devdata(spi->master);
644 if (spi->max_speed_hz && (spi->max_speed_hz < sp->spi_freq)) {
645 dev_err(&spi->dev, "spi clock should be %u Hz.\n",
649 spi->max_speed_hz = sp->spi_freq;
776 static size_t mtk_max_msg_size(struct spi_device *spi)
823 spi_clk = devm_clk_get(&pdev->dev, "spi");
849 dev_err(&pdev->dev, "failed to allocate spi controller\n");
924 dev_info(&pdev->dev, "spi frequency: %d Hz\n", sp->spi_freq);