aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2013-02-13 04:37:38 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-04 04:51:00 -0400
commit20012c775a8fd369ccd9d6f83d46a8942f0ebb20 (patch)
tree5ba71023bc9b0222b655967158ae04704dc9147b /arch/arm/mach-omap2
parent3c803f40e8da044f5b66bf21a454315117c9ac17 (diff)
arm: omap: board-zoom: use NEC panel's gpio handling
The zoom board file currently requests gpios required by the nec-nl8048hl11-01 dpi panel, and provides dummy platform_enable/disable callbacks. gpio request and configuration have been moved to the nec-nl8048hl11-01 panel driver itself and shouldn't be done in the board files. Remove the gpio requests and the platform callbacks from the board file. Add the gpio information to panel_nec_nl8048_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')
-rw-r--r--arch/arm/mach-omap2/board-zoom-display.c38
1 files changed, 13 insertions, 25 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c
index 9a7174faac51..c2a079cb76fc 100644
--- a/arch/arm/mach-omap2/board-zoom-display.c
+++ b/arch/arm/mach-omap2/board-zoom-display.c
@@ -15,8 +15,9 @@
15#include <linux/spi/spi.h> 15#include <linux/spi/spi.h>
16#include <linux/platform_data/spi-omap2-mcspi.h> 16#include <linux/platform_data/spi-omap2-mcspi.h>
17#include <video/omapdss.h> 17#include <video/omapdss.h>
18#include "board-zoom.h" 18#include <video/omap-panel-data.h>
19 19
20#include "board-zoom.h"
20#include "soc.h" 21#include "soc.h"
21#include "common.h" 22#include "common.h"
22 23
@@ -24,37 +25,17 @@
24#define LCD_PANEL_RESET_GPIO_PILOT 55 25#define LCD_PANEL_RESET_GPIO_PILOT 55
25#define LCD_PANEL_QVGA_GPIO 56 26#define LCD_PANEL_QVGA_GPIO 56
26 27
27static struct gpio zoom_lcd_gpios[] __initdata = { 28static struct panel_nec_nl8048_data zoom_lcd_data = {
28 { -EINVAL, GPIOF_OUT_INIT_HIGH, "lcd reset" }, 29 /* res_gpio filled in code */
29 { LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "lcd qvga" }, 30 .qvga_gpio = LCD_PANEL_QVGA_GPIO,
30}; 31};
31 32
32static void __init zoom_lcd_panel_init(void)
33{
34 zoom_lcd_gpios[0].gpio = (omap_rev() > OMAP3430_REV_ES3_0) ?
35 LCD_PANEL_RESET_GPIO_PROD :
36 LCD_PANEL_RESET_GPIO_PILOT;
37
38 if (gpio_request_array(zoom_lcd_gpios, ARRAY_SIZE(zoom_lcd_gpios)))
39 pr_err("%s: Failed to get LCD GPIOs.\n", __func__);
40}
41
42static int zoom_panel_enable_lcd(struct omap_dss_device *dssdev)
43{
44 return 0;
45}
46
47static void zoom_panel_disable_lcd(struct omap_dss_device *dssdev)
48{
49}
50
51static struct omap_dss_device zoom_lcd_device = { 33static struct omap_dss_device zoom_lcd_device = {
52 .name = "lcd", 34 .name = "lcd",
53 .driver_name = "NEC_8048_panel", 35 .driver_name = "NEC_8048_panel",
54 .type = OMAP_DISPLAY_TYPE_DPI, 36 .type = OMAP_DISPLAY_TYPE_DPI,
55 .phy.dpi.data_lines = 24, 37 .phy.dpi.data_lines = 24,
56 .platform_enable = zoom_panel_enable_lcd, 38 .data = &zoom_lcd_data,
57 .platform_disable = zoom_panel_disable_lcd,
58}; 39};
59 40
60static struct omap_dss_device *zoom_dss_devices[] = { 41static struct omap_dss_device *zoom_dss_devices[] = {
@@ -67,6 +48,13 @@ static struct omap_dss_board_info zoom_dss_data = {
67 .default_device = &zoom_lcd_device, 48 .default_device = &zoom_lcd_device,
68}; 49};
69 50
51static void __init zoom_lcd_panel_init(void)
52{
53 zoom_lcd_data.res_gpio = (omap_rev() > OMAP3430_REV_ES3_0) ?
54 LCD_PANEL_RESET_GPIO_PROD :
55 LCD_PANEL_RESET_GPIO_PILOT;
56}
57
70static struct omap2_mcspi_device_config dss_lcd_mcspi_config = { 58static struct omap2_mcspi_device_config dss_lcd_mcspi_config = {
71 .turbo_mode = 1, 59 .turbo_mode = 1,
72}; 60};