Lines Matching defs:spi
7 // Based on spi-mt7621.c:
18 #include <linux/spi/spi.h>
20 #define DRIVER_NAME "spi-ar934x"
62 static int ar934x_spi_setup(struct spi_device *spi)
64 struct ar934x_spi *sp = spi_controller_get_devdata(spi->master);
66 if ((spi->max_speed_hz == 0) ||
67 (spi->max_speed_hz > (sp->clk_freq / 2))) {
68 spi->max_speed_hz = sp->clk_freq / 2;
69 } else if (spi->max_speed_hz < (sp->clk_freq / 128)) {
70 dev_err(&spi->dev, "spi clock is too low\n");
82 struct spi_device *spi = m->spi;
96 div = ar934x_spi_clk_div(sp, spi->max_speed_hz);
123 reg = AR934X_SPI_SHIFT_VAL(spi->chip_select, term,
152 { .compatible = "qca,ar934x-spi" },
181 dev_info(&pdev->dev, "failed to allocate spi controller\n");
186 /* disable flash mapping and expose spi controller registers */