summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-zoom-display.c
diff options
context:
space:
mode:
authorLinus Torvalds2011-05-26 21:11:54 +0200
committerLinus Torvalds2011-05-26 21:11:54 +0200
commit829ae2732998e628d762b97627e4e5cc6c1b5625 (patch)
tree7ffdfa365ab54df4fd1742673289621b3f5de2f5 /arch/arm/mach-omap2/board-zoom-display.c
parentMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/po... (diff)
parentMerge branch 'for_2.6.40/pm-cleanup' of ssh://master.kernel.org/pub/scm/linux... (diff)
downloadkernel-qcow2-linux-829ae2732998e628d762b97627e4e5cc6c1b5625.tar.gz
kernel-qcow2-linux-829ae2732998e628d762b97627e4e5cc6c1b5625.tar.xz
kernel-qcow2-linux-829ae2732998e628d762b97627e4e5cc6c1b5625.zip
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (33 commits) OMAP3: PM: Boot message is not an error, and not helpful, remove it OMAP3: cpuidle: change the power domains modes determination logic OMAP3: cpuidle: code rework for improved readability OMAP3: cpuidle: re-organize the C-states data OMAP3: clean-up mach specific cpuidle data structures OMAP3 cpuidle: remove useless SDP specific timings usb: otg: OMAP4430: Powerdown the internal PHY when USB is disabled usb: otg: OMAP4430: Fixing the omap4430_phy_init function usb: musb: am35x: fix compile error when building am35x usb: musb: OMAP4430: Power down the PHY during board init omap: drop board-igep0030.c omap: igep0020: add support for IGEP3 omap: igep0020: minor refactoring omap: igep0020: name refactoring for future merge with IGEP3 omap: Remove support for omap2evm arm: omap2plus: GPIO cleanup omap: musb: introduce default board config omap: move detection of NAND CS to common-board-devices omap: use common initialization for PMIC i2c bus omap: consolidate touch screen initialization among different boards ...
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-display.c')
-rw-r--r--arch/arm/mach-omap2/board-zoom-display.c31
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 60e8645db59d..c7c6beb1ec24 100644
--- a/arch/arm/mach-omap2/board-zoom-display.c
+++ b/arch/arm/mach-omap2/board-zoom-display.c
@@ -21,34 +21,19 @@
#define LCD_PANEL_RESET_GPIO_PILOT 55
#define LCD_PANEL_QVGA_GPIO 56
+static struct gpio zoom_lcd_gpios[] __initdata = {
+ { -EINVAL, GPIOF_OUT_INIT_HIGH, "lcd reset" },
+ { LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "lcd qvga" },
+};
+
static void zoom_lcd_panel_init(void)
{
- int ret;
- unsigned char lcd_panel_reset_gpio;
-
- lcd_panel_reset_gpio = (omap_rev() > OMAP3430_REV_ES3_0) ?
+ zoom_lcd_gpios[0].gpio = (omap_rev() > OMAP3430_REV_ES3_0) ?
LCD_PANEL_RESET_GPIO_PROD :
LCD_PANEL_RESET_GPIO_PILOT;
- ret = gpio_request(lcd_panel_reset_gpio, "lcd reset");
- if (ret) {
- pr_err("Failed to get LCD reset GPIO (gpio%d).\n",
- lcd_panel_reset_gpio);
- return;
- }
- gpio_direction_output(lcd_panel_reset_gpio, 1);
-
- ret = gpio_request(LCD_PANEL_QVGA_GPIO, "lcd qvga");
- if (ret) {
- pr_err("Failed to get LCD_PANEL_QVGA_GPIO (gpio%d).\n",
- LCD_PANEL_QVGA_GPIO);
- goto err0;
- }
- gpio_direction_output(LCD_PANEL_QVGA_GPIO, 1);
-
- return;
-err0:
- gpio_free(lcd_panel_reset_gpio);
+ if (gpio_request_array(zoom_lcd_gpios, ARRAY_SIZE(zoom_lcd_gpios)))
+ pr_err("%s: Failed to get LCD GPIOs.\n", __func__);
}
static int zoom_panel_enable_lcd(struct omap_dss_device *dssdev)