diff options
author | Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> | 2011-12-19 18:08:56 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-12-22 12:00:46 -0500 |
commit | a218d19f6a91c076c7ed8a7c0082f777248c5394 (patch) | |
tree | 5506a689551166dd05412612fc660ce6b7b56849 /drivers/video/omap | |
parent | 68f0676699fb0e0b18feb8459c35ecdfe3127b3d (diff) |
omapfb: lcd_ams_delta: drive control lines over GPIO
Don't use Amstrad Delta custom I/O functions any longer, use GPIO API
instead.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/video/omap')
-rw-r--r-- | drivers/video/omap/lcd_ams_delta.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/video/omap/lcd_ams_delta.c b/drivers/video/omap/lcd_ams_delta.c index 6978ae4ef83a..73b211b92a39 100644 --- a/drivers/video/omap/lcd_ams_delta.c +++ b/drivers/video/omap/lcd_ams_delta.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/lcd.h> | 27 | #include <linux/lcd.h> |
28 | #include <linux/gpio.h> | ||
28 | 29 | ||
29 | #include <plat/board-ams-delta.h> | 30 | #include <plat/board-ams-delta.h> |
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
@@ -98,29 +99,41 @@ static struct lcd_ops ams_delta_lcd_ops = { | |||
98 | 99 | ||
99 | /* omapfb panel section */ | 100 | /* omapfb panel section */ |
100 | 101 | ||
102 | static struct gpio _gpios[] __initconst_or_module = { | ||
103 | { | ||
104 | .gpio = AMS_DELTA_GPIO_PIN_LCD_VBLEN, | ||
105 | .flags = GPIOF_OUT_INIT_LOW, | ||
106 | .label = "lcd_vblen", | ||
107 | }, | ||
108 | { | ||
109 | .gpio = AMS_DELTA_GPIO_PIN_LCD_NDISP, | ||
110 | .flags = GPIOF_OUT_INIT_LOW, | ||
111 | .label = "lcd_ndisp", | ||
112 | }, | ||
113 | }; | ||
114 | |||
101 | static int ams_delta_panel_init(struct lcd_panel *panel, | 115 | static int ams_delta_panel_init(struct lcd_panel *panel, |
102 | struct omapfb_device *fbdev) | 116 | struct omapfb_device *fbdev) |
103 | { | 117 | { |
104 | return 0; | 118 | return gpio_request_array(_gpios, ARRAY_SIZE(_gpios)); |
105 | } | 119 | } |
106 | 120 | ||
107 | static void ams_delta_panel_cleanup(struct lcd_panel *panel) | 121 | static void ams_delta_panel_cleanup(struct lcd_panel *panel) |
108 | { | 122 | { |
123 | gpio_free_array(_gpios, ARRAY_SIZE(_gpios)); | ||
109 | } | 124 | } |
110 | 125 | ||
111 | static int ams_delta_panel_enable(struct lcd_panel *panel) | 126 | static int ams_delta_panel_enable(struct lcd_panel *panel) |
112 | { | 127 | { |
113 | ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_NDISP, | 128 | gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_NDISP, 1); |
114 | AMS_DELTA_LATCH2_LCD_NDISP); | 129 | gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_VBLEN, 1); |
115 | ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_VBLEN, | ||
116 | AMS_DELTA_LATCH2_LCD_VBLEN); | ||
117 | return 0; | 130 | return 0; |
118 | } | 131 | } |
119 | 132 | ||
120 | static void ams_delta_panel_disable(struct lcd_panel *panel) | 133 | static void ams_delta_panel_disable(struct lcd_panel *panel) |
121 | { | 134 | { |
122 | ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_VBLEN, 0); | 135 | gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_VBLEN, 0); |
123 | ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_NDISP, 0); | 136 | gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_NDISP, 0); |
124 | } | 137 | } |
125 | 138 | ||
126 | static unsigned long ams_delta_panel_get_caps(struct lcd_panel *panel) | 139 | static unsigned long ams_delta_panel_get_caps(struct lcd_panel *panel) |