diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-display.c')
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-display.c | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c index 37b84c2b850f..ce53e82ba136 100644 --- a/arch/arm/mach-omap2/board-zoom-display.c +++ b/arch/arm/mach-omap2/board-zoom-display.c | |||
@@ -21,34 +21,19 @@ | |||
21 | #define LCD_PANEL_RESET_GPIO_PILOT 55 | 21 | #define LCD_PANEL_RESET_GPIO_PILOT 55 |
22 | #define LCD_PANEL_QVGA_GPIO 56 | 22 | #define LCD_PANEL_QVGA_GPIO 56 |
23 | 23 | ||
24 | static struct gpio zoom_lcd_gpios[] __initdata = { | ||
25 | { -EINVAL, GPIOF_OUT_INIT_HIGH, "lcd reset" }, | ||
26 | { LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "lcd qvga" }, | ||
27 | }; | ||
28 | |||
24 | static void zoom_lcd_panel_init(void) | 29 | static void zoom_lcd_panel_init(void) |
25 | { | 30 | { |
26 | int ret; | 31 | zoom_lcd_gpios[0].gpio = (omap_rev() > OMAP3430_REV_ES3_0) ? |
27 | unsigned char lcd_panel_reset_gpio; | ||
28 | |||
29 | lcd_panel_reset_gpio = (omap_rev() > OMAP3430_REV_ES3_0) ? | ||
30 | LCD_PANEL_RESET_GPIO_PROD : | 32 | LCD_PANEL_RESET_GPIO_PROD : |
31 | LCD_PANEL_RESET_GPIO_PILOT; | 33 | LCD_PANEL_RESET_GPIO_PILOT; |
32 | 34 | ||
33 | ret = gpio_request(lcd_panel_reset_gpio, "lcd reset"); | 35 | if (gpio_request_array(zoom_lcd_gpios, ARRAY_SIZE(zoom_lcd_gpios))) |
34 | if (ret) { | 36 | pr_err("%s: Failed to get LCD GPIOs.\n", __func__); |
35 | pr_err("Failed to get LCD reset GPIO (gpio%d).\n", | ||
36 | lcd_panel_reset_gpio); | ||
37 | return; | ||
38 | } | ||
39 | gpio_direction_output(lcd_panel_reset_gpio, 1); | ||
40 | |||
41 | ret = gpio_request(LCD_PANEL_QVGA_GPIO, "lcd qvga"); | ||
42 | if (ret) { | ||
43 | pr_err("Failed to get LCD_PANEL_QVGA_GPIO (gpio%d).\n", | ||
44 | LCD_PANEL_QVGA_GPIO); | ||
45 | goto err0; | ||
46 | } | ||
47 | gpio_direction_output(LCD_PANEL_QVGA_GPIO, 1); | ||
48 | |||
49 | return; | ||
50 | err0: | ||
51 | gpio_free(lcd_panel_reset_gpio); | ||
52 | } | 37 | } |
53 | 38 | ||
54 | static int zoom_panel_enable_lcd(struct omap_dss_device *dssdev) | 39 | static int zoom_panel_enable_lcd(struct omap_dss_device *dssdev) |