Lines Matching defs:spi
16 #include <linux/spi/spi.h>
38 struct spi_device *spi;
46 static int tosa_tg_send(struct spi_device *spi, int adrs, uint8_t data)
60 return spi_sync(spi, &msg);
63 int tosa_bl_enable(struct spi_device *spi, int enable)
66 return tosa_tg_send(spi, TG_GPODR2, enable? 0x01 : 0x00);
78 tosa_tg_send(data->spi, TG_TPOSCTL, 0x00);
80 tosa_tg_send(data->spi, TG_GPOSR, 0x02);
85 struct spi_device *spi = data->spi;
91 tosa_tg_send(spi, TG_PNLCTL, value);
94 tosa_tg_send(spi, TG_PINICTL,0x4);
98 tosa_tg_send(spi, TG_PINICTL,0x0);
107 .platform_data = data->spi,
115 struct spi_device *spi = data->spi;
118 tosa_tg_send(spi, TG_PINICTL,0x4);
122 tosa_tg_send(spi, TG_PINICTL,0x6);
172 static int __devinit tosa_lcd_probe(struct spi_device *spi)
186 spi->bits_per_word = 8;
188 ret = spi_setup(spi);
192 data->spi = spi;
193 dev_set_drvdata(&spi->dev, data);
210 data->lcd = lcd_device_register("tosa-lcd", &spi->dev, data,
226 dev_set_drvdata(&spi->dev, NULL);
232 static int __devexit tosa_lcd_remove(struct spi_device *spi)
234 struct tosa_lcd_data *data = dev_get_drvdata(&spi->dev);
244 dev_set_drvdata(&spi->dev, NULL);
251 static int tosa_lcd_suspend(struct spi_device *spi, pm_message_t state)
253 struct tosa_lcd_data *data = dev_get_drvdata(&spi->dev);
260 static int tosa_lcd_resume(struct spi_device *spi)
262 struct tosa_lcd_data *data = dev_get_drvdata(&spi->dev);
304 MODULE_ALIAS("spi:tosa-lcd");