Lines Matching defs:spi
12 #include <linux/spi/spi.h>
47 struct spi_device *spi;
56 static int tosa_tg_send(struct spi_device *spi, int adrs, uint8_t data)
70 return spi_sync(spi, &msg);
73 int tosa_bl_enable(struct spi_device *spi, int enable)
76 return tosa_tg_send(spi, TG_GPODR2, enable ? 0x01 : 0x00);
88 tosa_tg_send(data->spi, TG_TPOSCTL, 0x00);
90 tosa_tg_send(data->spi, TG_GPOSR, 0x02);
95 struct spi_device *spi = data->spi;
101 tosa_tg_send(spi, TG_PNLCTL, value);
104 tosa_tg_send(spi, TG_PINICTL, 0x4);
108 tosa_tg_send(spi, TG_PINICTL, 0x0);
120 .platform_data = data->spi,
128 struct spi_device *spi = data->spi;
131 tosa_tg_send(spi, TG_PINICTL, 0x4);
135 tosa_tg_send(spi, TG_PINICTL, 0x6);
185 static int tosa_lcd_probe(struct spi_device *spi)
190 data = devm_kzalloc(&spi->dev, sizeof(struct tosa_lcd_data),
200 spi->bits_per_word = 8;
202 ret = spi_setup(spi);
206 data->spi = spi;
207 spi_set_drvdata(spi, data);
209 data->gpiod_tg = devm_gpiod_get(&spi->dev, "tg #pwr", GPIOD_OUT_LOW);
219 data->lcd = devm_lcd_device_register(&spi->dev, "tosa-lcd", &spi->dev,
235 static int tosa_lcd_remove(struct spi_device *spi)
237 struct tosa_lcd_data *data = spi_get_drvdata(spi);
286 MODULE_ALIAS("spi:tosa-lcd");