Lines Matching defs:spi
24 #include <linux/spi/spi.h>
25 #include <linux/spi/flash.h>
47 struct spi_device *spi;
83 err = spi_sync(flash->spi, &m);
97 err = spi_write(flash->spi, command, 1);
102 err = spi_write(flash->spi, command, 1);
108 err = spi_write(flash->spi, command, 2);
155 err = spi_write(flash->spi, command, 4);
194 dev_err(&flash->spi->dev, "Erase failed\n");
240 spi_sync(flash->spi, &message);
276 ret = spi_write(flash->spi, command, 5);
292 ret = spi_write(flash->spi, command, 2);
308 static struct flash_info *sst25l_match_device(struct spi_device *spi)
330 err = spi_sync(spi, &m);
332 dev_err(&spi->dev, "error reading device id\n");
343 dev_err(&spi->dev, "unknown id %.4x\n", id);
348 static int sst25l_probe(struct spi_device *spi)
355 flash_info = sst25l_match_device(spi);
359 flash = devm_kzalloc(&spi->dev, sizeof(*flash), GFP_KERNEL);
363 flash->spi = spi;
365 spi_set_drvdata(spi, flash);
367 data = dev_get_platdata(&spi->dev);
371 flash->mtd.dev.parent = &spi->dev;
382 dev_info(&spi->dev, "%s (%lld KiB)\n", flash_info->name,
401 static void sst25l_remove(struct spi_device *spi)
403 struct sst25l_flash *flash = spi_get_drvdata(spi);