13 #include <linux/kernel.h>
14 #include <linux/module.h>
15 #include <linux/device.h>
17 #include <linux/i2c.h>
18 #include <linux/slab.h>
28 #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
30 #define TG_REG0_VQV 0x0001
31 #define TG_REG0_COLOR 0x0002
32 #define TG_REG0_UD 0x0004
33 #define TG_REG0_LR 0x0008
56 buf[0] = ((adrs & 0x07) << 5) | (data & 0x1f);
57 spi_message_init(&msg);
58 spi_message_add_tail(&xfer, &msg);
66 return tosa_tg_send(spi,
TG_GPODR2, enable? 0x01 : 0x00);
107 .platform_data = data->
spi,
135 tosa_lcd_tg_on(data);
138 tosa_lcd_tg_off(data);
155 if (mode->
xres == 320 || mode->
yres == 320)
161 tosa_lcd_tg_on(data);
166 static struct lcd_ops tosa_lcd_ops = {
168 .get_power = tosa_lcd_get_power,
169 .set_mode = tosa_lcd_set_mode,
207 tosa_lcd_tg_init(data);
209 tosa_lcd_tg_on(data);
214 if (IS_ERR(data->
lcd)) {
215 ret = PTR_ERR(data->
lcd);
223 tosa_lcd_tg_off(data);
238 tosa_lcd_tg_off(data);
250 tosa_lcd_tg_off(data);
259 tosa_lcd_tg_init(data);
261 tosa_lcd_tg_on(data);
263 tosa_lcd_tg_off(data);
268 #define tosa_lcd_suspend NULL
269 #define tosa_lcd_resume NULL
277 .probe = tosa_lcd_probe,