From 807d261326e06903007c95457d6934588a483be0 Mon Sep 17 00:00:00 2001 From: Jason Kridner Date: Fri, 5 Aug 2011 18:07:09 +0000 Subject: [PATCH 2/3] omap3: beagle: added lcd driver This enables the tfc_s9700_panel by default. Needs to be extended to redefine the driver name at boot time. --- arch/arm/mach-omap2/board-omap3beagle.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 5e1d9f9..b525a5e 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -84,11 +84,13 @@ static struct { int usb_pwr_level; int reset_gpio; int usr_button_gpio; + char *lcd_driver_name; } beagle_config = { .mmc1_gpio_wp = -EINVAL, .usb_pwr_level = GPIOF_OUT_INIT_LOW, .reset_gpio = 129, .usr_button_gpio = 4, + .lcd_driver_name = "", }; static struct gpio omap3_beagle_rev_gpios[] __initdata = { @@ -387,9 +389,28 @@ static struct omap_dss_device beagle_tv_device = { .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, }; +static int beagle_enable_lcd(struct omap_dss_device *dssdev) +{ + return 0; +} + +static int beagle_disable_lcd(struct omap_dss_device *dssdev) +{ +} + +static struct omap_dss_device beagle_lcd_device = { + .name = "lcd", + .driver_name = "", + .type = OMAP_DISPLAY_TYPE_DPI, + .phy.dpi.data_lines = 24, + .platform_enable = beagle_enable_lcd, + .platform_disable = beagle_disable_lcd, +}; + static struct omap_dss_device *beagle_dss_devices[] = { &beagle_dvi_device, &beagle_tv_device, + &beagle_lcd_device, }; static struct omap_dss_board_info beagle_dss_data = { @@ -733,6 +754,10 @@ static void __init omap3_beagle_init(void) gpio_buttons[0].gpio = beagle_config.usr_button_gpio; + /* TODO: set lcd_driver_name by command line or device tree */ + beagle_config.lcd_driver_name = "tfc_s9700_panel"; + beagle_lcd_device.driver_name = beagle_config.lcd_driver_name; + platform_add_devices(omap3_beagle_devices, ARRAY_SIZE(omap3_beagle_devices)); omap_display_init(&beagle_dss_data); -- 1.6.6.1