Lines Matching refs:spi
55 #include <linux/spi/spi.h>
501 /* Load a spi sub-device. */
503 void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi,
509 sd->owner = spi->dev.driver->owner;
511 v4l2_set_subdevdata(sd, spi);
512 spi_set_drvdata(spi, sd);
514 strlcpy(sd->name, spi->dev.driver->name, sizeof(sd->name));
522 struct spi_device *spi = NULL;
529 spi = spi_new_device(master, info);
531 if (spi == NULL || spi->dev.driver == NULL)
534 if (!try_module_get(spi->dev.driver->owner))
537 sd = spi_get_drvdata(spi);
545 module_put(spi->dev.driver->owner);
550 if (spi && sd == NULL)
551 spi_unregister_device(spi);