Lines Matching defs:spi
18 #include <linux/spi/spi.h>
19 #include <linux/spi/spi-mem.h>
22 #define DRIVER_NAME "mtk-spi-nor"
185 // prg mode is spi-only.
251 struct mtk_nor *sp = spi_controller_get_devdata(mem->spi->master);
519 // spi-mem won't try this op again with generic spi transfers.
576 struct mtk_nor *sp = spi_controller_get_devdata(mem->spi->master);
607 static int mtk_nor_setup(struct spi_device *spi)
609 struct mtk_nor *sp = spi_controller_get_devdata(spi->master);
611 if (spi->max_speed_hz && (spi->max_speed_hz < sp->spi_freq)) {
612 dev_err(&spi->dev, "spi clock should be %u Hz.\n",
616 spi->max_speed_hz = sp->spi_freq;
726 static size_t mtk_max_msg_size(struct spi_device *spi)
757 spi_clk = devm_clk_get(&pdev->dev, "spi");
773 dev_err(&pdev->dev, "failed to allocate spi controller\n");
845 dev_info(&pdev->dev, "spi frequency: %d Hz\n", sp->spi_freq);