aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-rx51-video.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2013-02-12 03:35:37 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-04 04:50:56 -0400
commit3c803f40e8da044f5b66bf21a454315117c9ac17 (patch)
treeadef68ad76c32257be1e6202b49e447646898e97 /arch/arm/mach-omap2/board-rx51-video.c
parenta05f92b70205df5927d767e9e0afecd2e5fde6d2 (diff)
arm: omap: board-rx-51: use acx565akm panel's gpio handling
The rx-51 board file currently requests gpios required by the acx565akm panel, and provides platform_enable/disable callbacks to configure them. These tasks have been moved to the acx565akm panel driver itself and shouldn't be done in the board files. Remove the gpio requests and the platform callbacks from the board file. Pass the panel_acx565akm_data instance 'lcd_data' to omap_dss_device instead of passing the gpio number in omap_dss_device's reset_gpio. Add the gpio information to panel_acx565akm_data so that it's passed to the panel driver. Signed-off-by: Archit Taneja <archit@ti.com> Cc: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51-video.c')
-rw-r--r--arch/arm/mach-omap2/board-rx51-video.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
index eb667261df08..bd74f9f6063b 100644
--- a/arch/arm/mach-omap2/board-rx51-video.c
+++ b/arch/arm/mach-omap2/board-rx51-video.c
@@ -16,6 +16,8 @@
16#include <linux/mm.h> 16#include <linux/mm.h>
17#include <asm/mach-types.h> 17#include <asm/mach-types.h>
18#include <video/omapdss.h> 18#include <video/omapdss.h>
19#include <video/omap-panel-data.h>
20
19#include <linux/platform_data/spi-omap2-mcspi.h> 21#include <linux/platform_data/spi-omap2-mcspi.h>
20 22
21#include "soc.h" 23#include "soc.h"
@@ -27,25 +29,16 @@
27 29
28#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) 30#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
29 31
30static int rx51_lcd_enable(struct omap_dss_device *dssdev) 32static struct panel_acx565akm_data lcd_data = {
31{ 33 .reset_gpio = RX51_LCD_RESET_GPIO,
32 gpio_set_value(dssdev->reset_gpio, 1); 34};
33 return 0;
34}
35
36static void rx51_lcd_disable(struct omap_dss_device *dssdev)
37{
38 gpio_set_value(dssdev->reset_gpio, 0);
39}
40 35
41static struct omap_dss_device rx51_lcd_device = { 36static struct omap_dss_device rx51_lcd_device = {
42 .name = "lcd", 37 .name = "lcd",
43 .driver_name = "panel-acx565akm", 38 .driver_name = "panel-acx565akm",
44 .type = OMAP_DISPLAY_TYPE_SDI, 39 .type = OMAP_DISPLAY_TYPE_SDI,
45 .phy.sdi.datapairs = 2, 40 .phy.sdi.datapairs = 2,
46 .reset_gpio = RX51_LCD_RESET_GPIO, 41 .data = &lcd_data,
47 .platform_enable = rx51_lcd_enable,
48 .platform_disable = rx51_lcd_disable,
49}; 42};
50 43
51static struct omap_dss_device rx51_tv_device = { 44static struct omap_dss_device rx51_tv_device = {
@@ -76,13 +69,8 @@ static int __init rx51_video_init(void)
76 return 0; 69 return 0;
77 } 70 }
78 71
79 if (gpio_request_one(RX51_LCD_RESET_GPIO, GPIOF_OUT_INIT_HIGH,
80 "LCD ACX565AKM reset")) {
81 pr_err("%s failed to get LCD Reset GPIO\n", __func__);
82 return 0;
83 }
84
85 omap_display_init(&rx51_dss_board_info); 72 omap_display_init(&rx51_dss_board_info);
73
86 return 0; 74 return 0;
87} 75}
88 76