Lines Matching defs:spi
7 // Based on spi-mt7621.c:
19 #include <linux/spi/spi.h>
21 #define DRIVER_NAME "spi-ar934x"
63 static int ar934x_spi_setup(struct spi_device *spi)
65 struct ar934x_spi *sp = spi_controller_get_devdata(spi->controller);
67 if ((spi->max_speed_hz == 0) ||
68 (spi->max_speed_hz > (sp->clk_freq / 2))) {
69 spi->max_speed_hz = sp->clk_freq / 2;
70 } else if (spi->max_speed_hz < (sp->clk_freq / 128)) {
71 dev_err(&spi->dev, "spi clock is too low\n");
83 struct spi_device *spi = m->spi;
102 div = ar934x_spi_clk_div(sp, spi->max_speed_hz);
129 reg = AR934X_SPI_SHIFT_VAL(spi_get_chipselect(spi, 0), term,
160 { .compatible = "qca,ar934x-spi" },
189 dev_info(&pdev->dev, "failed to allocate spi controller\n");
194 /* disable flash mapping and expose spi controller registers */