]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-3.0/ulcd/0002-omap3-beagle-added-lcd-driver.patch
linux-3.0: add support for 'uLCD' expansionboard
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-3.0 / ulcd / 0002-omap3-beagle-added-lcd-driver.patch
1 From 1fc2bd36acf09d22db63b59985eab1a663855581 Mon Sep 17 00:00:00 2001
2 From: Jason Kridner <jkridner@beagleboard.org>
3 Date: Fri, 5 Aug 2011 18:07:09 +0000
4 Subject: [PATCH 2/3] omap3: beagle: added lcd driver
6 This enables the tfc_s9700_panel by default.  Needs to be extended to
7 redefine the driver name at boot time.
8 ---
9  arch/arm/mach-omap2/board-omap3beagle.c |   25 +++++++++++++++++++++++++
10  1 files changed, 25 insertions(+), 0 deletions(-)
12 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
13 index 5e1d9f9..b525a5e 100644
14 --- a/arch/arm/mach-omap2/board-omap3beagle.c
15 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
16 @@ -84,11 +84,13 @@ static struct {
17         int usb_pwr_level;
18         int reset_gpio;
19         int usr_button_gpio;
20 +       char *lcd_driver_name;
21  } beagle_config = {
22         .mmc1_gpio_wp = -EINVAL,
23         .usb_pwr_level = GPIOF_OUT_INIT_LOW,
24         .reset_gpio = 129,
25         .usr_button_gpio = 4,
26 +       .lcd_driver_name = "",
27  };
28  
29  static struct gpio omap3_beagle_rev_gpios[] __initdata = {
30 @@ -387,9 +389,28 @@ static struct omap_dss_device beagle_tv_device = {
31         .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
32  };
33  
34 +static int beagle_enable_lcd(struct omap_dss_device *dssdev)
35 +{
36 +       return 0;
37 +}
38 +
39 +static int beagle_disable_lcd(struct omap_dss_device *dssdev)
40 +{
41 +}
42 +
43 +static struct omap_dss_device beagle_lcd_device = {
44 +       .name                   = "lcd",
45 +       .driver_name            = "",
46 +       .type                   = OMAP_DISPLAY_TYPE_DPI,
47 +       .phy.dpi.data_lines     = 24,
48 +       .platform_enable        = beagle_enable_lcd,
49 +       .platform_disable       = beagle_disable_lcd,
50 +};
51 +
52  static struct omap_dss_device *beagle_dss_devices[] = {
53         &beagle_dvi_device,
54         &beagle_tv_device,
55 +       &beagle_lcd_device,
56  };
57  
58  static struct omap_dss_board_info beagle_dss_data = {
59 @@ -733,6 +754,10 @@ static void __init omap3_beagle_init(void)
60  
61         gpio_buttons[0].gpio = beagle_config.usr_button_gpio;
62  
63 +       /* TODO: set lcd_driver_name by command line or device tree */
64 +       beagle_config.lcd_driver_name = "tfc_s9700_panel";
65 +       beagle_lcd_device.driver_name = beagle_config.lcd_driver_name;
66 +
67         platform_add_devices(omap3_beagle_devices,
68                         ARRAY_SIZE(omap3_beagle_devices));
69         omap_display_init(&beagle_dss_data);
70 -- 
71 1.6.6.1