linux 3.0: fix uLCD poweron for beagleboard
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-3.0 / ulcd / 0003-lcd-Set-LCD-power-enable-GPIO-in-board-file.patch
1 From 4b175ec2e08d1fa4a0bbaeb79ee2381164572fba Mon Sep 17 00:00:00 2001
2 From: Joel A Fernandes <agnel.joel@gmail.com>
3 Date: Thu, 18 Aug 2011 16:19:40 -0500
4 Subject: [PATCH 3/4] lcd: Set LCD power-enable GPIO in board file
6 With this, the ULCD-lite display works with the 3.0 kernel
8 v2 changes:
9 Fixed the beagle_config structure
11 Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com>
12 ---
13  arch/arm/mach-omap2/board-omap3beagle.c |    7 +++++++
14  1 files changed, 7 insertions(+), 0 deletions(-)
16 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
17 index b525a5e..6b0afda 100644
18 --- a/arch/arm/mach-omap2/board-omap3beagle.c
19 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
20 @@ -85,12 +85,14 @@ static struct {
21         int reset_gpio;
22         int usr_button_gpio;
23         char *lcd_driver_name;
24 +       int lcd_pwren;
25  } beagle_config = {
26         .mmc1_gpio_wp = -EINVAL,
27         .usb_pwr_level = GPIOF_OUT_INIT_LOW,
28         .reset_gpio = 129,
29         .usr_button_gpio = 4,
30         .lcd_driver_name = "",
31 +       .lcd_pwren = 156
32  };
33  
34  static struct gpio omap3_beagle_rev_gpios[] __initdata = {
35 @@ -423,6 +425,11 @@ static void __init beagle_display_init(void)
36  {
37         int r;
38  
39 +       r = gpio_request_one(beagle_config.lcd_pwren, GPIOF_OUT_INIT_LOW,
40 +                            "LCD power");
41 +       if (r < 0)
42 +               printk(KERN_ERR "Unable to get LCD power enable GPIO\n");
43 +
44         r = gpio_request_one(beagle_dvi_device.reset_gpio, GPIOF_OUT_INIT_LOW,
45                              "DVI reset");
46         if (r < 0)
47 -- 
48 1.6.6.1