Lines Matching defs:spi

61 #include <linux/spi/spi.h>
344 struct spi_device *spi = to_spi_device(hcd->self.controller);
361 spi_sync(spi, &msg);
369 struct spi_device *spi = to_spi_device(hcd->self.controller);
387 spi_sync(spi, &msg);
393 struct spi_device *spi = to_spi_device(hcd->self.controller);
413 spi_sync(spi, &msg);
419 struct spi_device *spi = to_spi_device(hcd->self.controller);
440 spi_sync(spi, &msg);
525 struct spi_device *spi = to_spi_device(hcd->self.controller);
550 dev_err(&spi->dev,
631 struct spi_device *spi = to_spi_device(hcd->self.controller);
672 dev_dbg(&spi->dev, "%s: URB %p unlinked=%d",
766 struct spi_device *spi = to_spi_device(hcd->self.controller);
780 dev_dbg(&spi->dev, "%s: URB %p unlinked=%d",
846 struct spi_device *spi = to_spi_device(hcd->self.controller);
877 dev_dbg(&spi->dev, "%s: unexpected error HRSL=0x%02x",
905 dev_dbg(&spi->dev, "%s: unexpected error HRSL=0x%02x",
911 dev_dbg(&spi->dev, "%s: unexpected error HRSL=0x%02x",
935 struct spi_device *spi = to_spi_device(hcd->self.controller);
952 dev_err(&spi->dev,
1130 struct spi_device *spi = to_spi_device(hcd->self.controller);
1136 disable_irq_nosync(spi->irq);
1279 struct spi_device *spi = to_spi_device(hcd->self.controller);
1293 dev_err(&spi->dev,
1368 struct spi_device *spi = to_spi_device(hcd->self.controller);
1381 dev_err(&spi->dev, "bad rev 0x%02x", max3421_hcd->rev);
1384 dev_info(&spi->dev, "rev 0x%x, SPI clk %dHz, bpw %u, irq %d\n",
1385 max3421_hcd->rev, spi->max_speed_hz, spi->bits_per_word,
1386 spi->irq);
1399 enable_irq(spi->irq);
1441 dev_info(&spi->dev, "SPI thread exiting");
1495 struct spi_device *spi = to_spi_device(hcd->self.controller);
1505 dev_err(&spi->dev,
1668 struct spi_device *spi = to_spi_device(hcd->self.controller);
1674 pdata = spi->dev.platform_data;
1815 max3421_probe(struct spi_device *spi)
1817 struct device *dev = &spi->dev;
1823 if (spi_setup(spi) < 0) {
1824 dev_err(&spi->dev, "Unable to setup SPI bus");
1828 if (!spi->irq) {
1834 pdata = devm_kzalloc(&spi->dev, sizeof(*pdata), GFP_KERNEL);
1843 spi->dev.platform_data = pdata;
1846 pdata = spi->dev.platform_data;
1848 dev_err(&spi->dev, "driver configuration data is not provided\n");
1853 dev_err(&spi->dev, "vbus active level value %d is out of range (0/1)\n", pdata->vbus_active_level);
1858 dev_err(&spi->dev, "vbus gpout value %d is out of range (1..8)\n", pdata->vbus_gpout);
1864 hcd = usb_create_hcd(&max3421_hcd_desc, &spi->dev,
1865 dev_name(&spi->dev));
1867 dev_err(&spi->dev, "failed to create HCD structure\n");
1873 spi_set_drvdata(spi, max3421_hcd);
1885 dev_err(&spi->dev,
1892 dev_err(&spi->dev, "failed to add HCD\n");
1896 retval = request_irq(spi->irq, max3421_irq_handler,
1899 dev_err(&spi->dev, "failed to request irq %d\n", spi->irq);
1906 devm_kfree(&spi->dev, pdata);
1907 spi->dev.platform_data = NULL;
1921 max3421_remove(struct spi_device *spi)
1927 max3421_hcd = spi_get_drvdata(spi);
1938 free_irq(spi->irq, hcd);