15 #include <linux/module.h>
16 #include <linux/slab.h>
21 #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
51 spi_message_init(&msg);
56 lcd->
buffer[2] = reg & 0x7f;
58 spi_message_add_tail(&index_xfer, &msg);
65 spi_message_add_tail(&value_xfer, &msg);
109 ret |= ltv350qv_write_reg(lcd,
LTV_VBP, 0x000a);
110 ret |= ltv350qv_write_reg(lcd,
LTV_HBP, 0x0021);
112 ret |= ltv350qv_write_reg(lcd,
LTV_GAMMA(0), 0x0103);
113 ret |= ltv350qv_write_reg(lcd,
LTV_GAMMA(1), 0x0301);
114 ret |= ltv350qv_write_reg(lcd,
LTV_GAMMA(2), 0x1f0f);
115 ret |= ltv350qv_write_reg(lcd,
LTV_GAMMA(3), 0x1f0f);
116 ret |= ltv350qv_write_reg(lcd,
LTV_GAMMA(4), 0x0707);
117 ret |= ltv350qv_write_reg(lcd,
LTV_GAMMA(5), 0x0307);
118 ret |= ltv350qv_write_reg(lcd,
LTV_GAMMA(6), 0x0707);
119 ret |= ltv350qv_write_reg(lcd,
LTV_GAMMA(7), 0x0000);
120 ret |= ltv350qv_write_reg(lcd,
LTV_GAMMA(8), 0x0004);
121 ret |= ltv350qv_write_reg(lcd,
LTV_GAMMA(9), 0x0000);
162 static int ltv350qv_power_off(
struct ltv350qv *lcd)
175 ret |= ltv350qv_write_reg(lcd,
LTV_PWRCTL2, 0x0000);
195 static int ltv350qv_power(
struct ltv350qv *lcd,
int power)
200 ret = ltv350qv_power_on(lcd);
202 ret = ltv350qv_power_off(lcd);
210 static int ltv350qv_set_power(
struct lcd_device *
ld,
int power)
212 struct ltv350qv *lcd = lcd_get_data(ld);
214 return ltv350qv_power(lcd, power);
219 struct ltv350qv *lcd = lcd_get_data(ld);
224 static struct lcd_ops ltv_ops = {
225 .get_power = ltv350qv_get_power,
226 .set_power = ltv350qv_set_power,
289 #define ltv350qv_suspend NULL
290 #define ltv350qv_resume NULL
294 static void ltv350qv_shutdown(
struct spi_device *spi)
307 .probe = ltv350qv_probe,
309 .shutdown = ltv350qv_shutdown,