};
#endif
+//LCDC
+#ifdef CONFIG_LCDC_RK2928
+static struct resource resource_lcdc[] = {
+ [0] = {
+ .name = "lcdc reg",
+ .start = RK2928_LCDC_PHYS,
+ .end = RK2928_LCDC_PHYS + RK2928_LCDC_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+
+ [1] = {
+ .name = "lcdc irq",
+ .start = IRQ_LCDC,
+ .end = IRQ_LCDC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device device_lcdc = {
+ .name = "rk2928-lcdc",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(resource_lcdc),
+ .resource = resource_lcdc,
+ .dev = {
+ .platform_data = &lcdc_screen_info,
+ },
+};
+#endif
+
#ifdef CONFIG_ION
#define ION_RESERVE_SIZE (80 * SZ_1M)
static struct ion_platform_data rk30_ion_pdata = {
#endif
static struct platform_device *devices[] __initdata = {
-#ifdef CONFIG_BACKLIGHT_RK29_BL
- &rk29_device_backlight,
-#endif
#ifdef CONFIG_FB_ROCKCHIP
&device_fb,
#endif
+#ifdef CONFIG_LCDC_RK2928
+ &device_lcdc,
+#endif
+#ifdef CONFIG_BACKLIGHT_RK29_BL
+ &rk29_device_backlight,
+#endif
#ifdef CONFIG_ION
&device_ion,
#endif
};
#endif
+//LCDC
+#ifdef CONFIG_LCDC_RK2928
+static struct resource resource_lcdc[] = {
+ [0] = {
+ .name = "lcdc reg",
+ .start = RK2928_LCDC_PHYS,
+ .end = RK2928_LCDC_PHYS + RK2928_LCDC_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+
+ [1] = {
+ .name = "lcdc irq",
+ .start = IRQ_LCDC,
+ .end = IRQ_LCDC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device device_lcdc = {
+ .name = "rk2928-lcdc",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(resource_lcdc),
+ .resource = resource_lcdc,
+ .dev = {
+ .platform_data = &lcdc_screen_info,
+ },
+};
+#endif
+
#ifdef CONFIG_ION
#define ION_RESERVE_SIZE (80 * SZ_1M)
static struct ion_platform_data rk30_ion_pdata = {
#endif
static struct platform_device *devices[] __initdata = {
-#ifdef CONFIG_BACKLIGHT_RK29_BL
- &rk29_device_backlight,
-#endif
#ifdef CONFIG_FB_ROCKCHIP
&device_fb,
#endif
+#ifdef CONFIG_LCDC_RK2928
+ &device_lcdc,
+#endif
+#ifdef CONFIG_BACKLIGHT_RK29_BL
+ &rk29_device_backlight,
+#endif
#ifdef CONFIG_ION
&device_ion,
#endif
#endif
}
-
-//LCDC
-#ifdef CONFIG_LCDC_RK2928
-extern struct rk29fb_info lcdc_screen_info;
-static struct resource resource_lcdc[] = {
- [0] = {
- .name = "lcdc reg",
- .start = RK2928_LCDC_PHYS,
- .end = RK2928_LCDC_PHYS + RK2928_LCDC_SIZE - 1,
- .flags = IORESOURCE_MEM,
- },
-
- [1] = {
- .name = "lcdc irq",
- .start = IRQ_LCDC,
- .end = IRQ_LCDC,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-static struct platform_device device_lcdc = {
- .name = "rk2928-lcdc",
- .id = 0,
- .num_resources = ARRAY_SIZE(resource_lcdc),
- .resource = resource_lcdc,
- .dev = {
- .platform_data = &lcdc_screen_info,
- },
-};
-#endif
-
// i2c
#ifdef CONFIG_I2C_RK30
#ifdef CONFIG_I2C0_CONTROLLER_RK29
#ifdef CONFIG_RGA_RK30
platform_device_register(&device_rga);
#endif
-#ifdef CONFIG_LCDC_RK2928
- platform_device_register(&device_lcdc);
-#endif
#ifdef CONFIG_USB20_OTG
platform_device_register(&device_usb20_otg);
#endif
static void rk2928_lcdc_shutdown(struct platform_device *pdev)
{
struct rk2928_lcdc_device *lcdc_dev = platform_get_drvdata(pdev);
+ if(lcdc_dev->driver.cur_screen->standby) //standby the screen if necessary
+ lcdc_dev->driver.cur_screen->standby(1);
+ if(lcdc_dev->driver.screen_ctr_info->io_disable) //power off the screen if necessary
+ lcdc_dev->driver.screen_ctr_info->io_disable();
+ if(lcdc_dev->driver.cur_screen->sscreen_set) //turn off lvds
+ lcdc_dev->driver.cur_screen->sscreen_set(lcdc_dev->driver.cur_screen , 0);
rk_fb_unregister(&(lcdc_dev->driver));
rk2928_lcdc_deinit(lcdc_dev);
/*iounmap(lcdc_dev->reg_vir_base);