Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166091
b: refs/heads/master
c: e2c509c
h: refs/heads/master
i:
  166089: 506108d
  166087: fc2bd13
v: v3
  • Loading branch information
Philipp Zabel authored and Eric Miao committed Sep 10, 2009
1 parent 8e9bed2 commit 7c67060
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6cf4442feba5af93a09cadfc5a6512a971f7825d
refs/heads/master: e2c509c7e63ffdeef21f292441c3d4ce73db9250
56 changes: 22 additions & 34 deletions trunk/arch/arm/mach-pxa/hx4700.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <mach/irda.h>
#include <mach/pxa2xx_spi.h>

#include <video/platform_lcd.h>
#include <video/w100fb.h>

#include "devices.h"
Expand Down Expand Up @@ -368,8 +369,6 @@ static struct platform_device egpio = {
* LCD - Sony display connected to ATI Imageon w3220
*/

static int lcd_power;

static void sony_lcd_init(void)
{
gpio_set_value(GPIO84_HX4700_LCD_SQN, 1);
Expand Down Expand Up @@ -410,35 +409,6 @@ static void sony_lcd_off(void)
gpio_set_value(GPIO110_HX4700_LCD_LVDD_3V3_ON, 0);
}

static int hx4700_lcd_set_power(struct lcd_device *ldev, int level)
{
switch (level) {
case FB_BLANK_UNBLANK:
sony_lcd_init();
break;
case FB_BLANK_NORMAL:
case FB_BLANK_VSYNC_SUSPEND:
case FB_BLANK_HSYNC_SUSPEND:
case FB_BLANK_POWERDOWN:
sony_lcd_off();
break;
}
lcd_power = level;
return 0;
}

static int hx4700_lcd_get_power(struct lcd_device *lm)
{
return lcd_power;
}

static struct lcd_ops hx4700_lcd_ops = {
.get_power = hx4700_lcd_get_power,
.set_power = hx4700_lcd_set_power,
};

static struct lcd_device *hx4700_lcd_device;

#ifdef CONFIG_PM
static void w3220_lcd_suspend(struct w100fb_par *wfb)
{
Expand Down Expand Up @@ -573,6 +543,27 @@ static struct platform_device w3220 = {
.resource = w3220_resources,
};

static void hx4700_lcd_set_power(struct plat_lcd_data *pd, unsigned int power)
{
if (power)
sony_lcd_init();
else
sony_lcd_off();
}

static struct plat_lcd_data hx4700_lcd_data = {
.set_power = hx4700_lcd_set_power,
};

static struct platform_device hx4700_lcd = {
.name = "platform-lcd",
.id = -1,
.dev = {
.platform_data = &hx4700_lcd_data,
.parent = &w3220.dev,
},
};

/*
* Backlight
*/
Expand Down Expand Up @@ -872,9 +863,6 @@ static void __init hx4700_init(void)
pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info));

hx4700_lcd_device = lcd_device_register("w100fb", NULL,
(void *)&w3220_info, &hx4700_lcd_ops);

gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 0);
mdelay(10);
gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 1);
Expand Down

0 comments on commit 7c67060

Please sign in to comment.