aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-am3517evm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-07 14:22:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-07 14:22:14 -0400
commit1bf25e78af317e6d5d9b5594dfeb0036e0d589d6 (patch)
tree49dbd2d7bd6856b8ae1864c2dd0c0eb5e36d5398 /arch/arm/mach-omap2/board-am3517evm.c
parent38f56f33ca381751f9b8910f67e7a805ec0b68cb (diff)
parent0592c2189ece16f3e0c5a56245634aba93d0c9dd (diff)
Merge tag 'cleanup-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC late cleanups from Arnd Bergmann: "These are cleanups and smaller changes that either depend on earlier feature branches or came in late during the development cycle. We normally try to get all cleanups early, so these are the exceptions: - A follow-up on the clocksource reworks, hopefully the last time we need to merge clocksource subsystem changes through arm-soc. A first set of patches was part of the original 3.10 arm-soc cleanup series because of interdependencies with timer drivers now moved out of arch/arm. - Migrating the SPEAr13xx platform away from using auxdata for DMA channel descriptions towards using information in device tree, based on the earlier SPEAr multiplatform series - A few follow-ups on the Atmel SAMA5 support and other changes for Atmel at91 based on the larger at91 reworks. - Moving the armada irqchip implementation to drivers/irqchip - Several OMAP cleanups following up on the larger series already merged in 3.10." * tag 'cleanup-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (50 commits) ARM: OMAP4: change the device names in usb_bind_phy ARM: OMAP2+: Fix mismerge for timer.c between ff931c82 and da4a686a ARM: SPEAr: conditionalize SMP code ARM: arch_timer: Silence debug preempt warnings ARM: OMAP: remove unused variable serial: amba-pl011: fix !CONFIG_DMA_ENGINE case ata: arasan: remove the need for platform_data ARM: at91/sama5d34ek.dts: remove not needed compatibility string ARM: at91: dts: add MCI DMA support ARM: at91: dts: add i2c dma support ARM: at91: dts: set #dma-cells to the correct value ARM: at91: suspend both memory controllers on at91sam9263 irqchip: armada-370-xp: slightly cleanup irq controller driver irqchip: armada-370-xp: move IRQ handler to avoid forward declaration irqchip: move IRQ driver for Armada 370/XP ARM: mvebu: move L2 cache initialization in init_early() devtree: add binding documentation for sp804 ARM: integrator-cp: convert use CLKSRC_OF for timer init ARM: versatile: use OF init for sp804 timer ARM: versatile: add versatile dtbs to dtbs target ...
Diffstat (limited to 'arch/arm/mach-omap2/board-am3517evm.c')
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c74
1 files changed, 6 insertions, 68 deletions
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index c29d2e743688..d63f14b534b5 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -120,63 +120,14 @@ static int __init am3517_evm_i2c_init(void)
120 return 0; 120 return 0;
121} 121}
122 122
123static int lcd_enabled;
124static int dvi_enabled;
125
126#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
127 defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE)
128static struct gpio am3517_evm_dss_gpios[] __initdata = {
129 /* GPIO 182 = LCD Backlight Power */
130 { LCD_PANEL_BKLIGHT_PWR, GPIOF_OUT_INIT_HIGH, "lcd_backlight_pwr" },
131 /* GPIO 181 = LCD Panel PWM */
132 { LCD_PANEL_PWM, GPIOF_OUT_INIT_HIGH, "lcd bl enable" },
133 /* GPIO 176 = LCD Panel Power enable pin */
134 { LCD_PANEL_PWR, GPIOF_OUT_INIT_HIGH, "dvi enable" },
135};
136
137static void __init am3517_evm_display_init(void)
138{
139 int r;
140
141 omap_mux_init_gpio(LCD_PANEL_PWR, OMAP_PIN_INPUT_PULLUP);
142 omap_mux_init_gpio(LCD_PANEL_BKLIGHT_PWR, OMAP_PIN_INPUT_PULLDOWN);
143 omap_mux_init_gpio(LCD_PANEL_PWM, OMAP_PIN_INPUT_PULLDOWN);
144
145 r = gpio_request_array(am3517_evm_dss_gpios,
146 ARRAY_SIZE(am3517_evm_dss_gpios));
147 if (r) {
148 printk(KERN_ERR "failed to get DSS panel control GPIOs\n");
149 return;
150 }
151
152 printk(KERN_INFO "Display initialized successfully\n");
153}
154#else
155static void __init am3517_evm_display_init(void) {}
156#endif
157
158static int am3517_evm_panel_enable_lcd(struct omap_dss_device *dssdev)
159{
160 if (dvi_enabled) {
161 printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
162 return -EINVAL;
163 }
164 gpio_set_value(LCD_PANEL_PWR, 1);
165 lcd_enabled = 1;
166
167 return 0;
168}
169
170static void am3517_evm_panel_disable_lcd(struct omap_dss_device *dssdev)
171{
172 gpio_set_value(LCD_PANEL_PWR, 0);
173 lcd_enabled = 0;
174}
175
176static struct panel_generic_dpi_data lcd_panel = { 123static struct panel_generic_dpi_data lcd_panel = {
177 .name = "sharp_lq", 124 .name = "sharp_lq",
178 .platform_enable = am3517_evm_panel_enable_lcd, 125 .num_gpios = 3,
179 .platform_disable = am3517_evm_panel_disable_lcd, 126 .gpios = {
127 LCD_PANEL_PWR,
128 LCD_PANEL_BKLIGHT_PWR,
129 LCD_PANEL_PWM,
130 },
180}; 131};
181 132
182static struct omap_dss_device am3517_evm_lcd_device = { 133static struct omap_dss_device am3517_evm_lcd_device = {
@@ -187,22 +138,11 @@ static struct omap_dss_device am3517_evm_lcd_device = {
187 .phy.dpi.data_lines = 16, 138 .phy.dpi.data_lines = 16,
188}; 139};
189 140
190static int am3517_evm_panel_enable_tv(struct omap_dss_device *dssdev)
191{
192 return 0;
193}
194
195static void am3517_evm_panel_disable_tv(struct omap_dss_device *dssdev)
196{
197}
198
199static struct omap_dss_device am3517_evm_tv_device = { 141static struct omap_dss_device am3517_evm_tv_device = {
200 .type = OMAP_DISPLAY_TYPE_VENC, 142 .type = OMAP_DISPLAY_TYPE_VENC,
201 .name = "tv", 143 .name = "tv",
202 .driver_name = "venc", 144 .driver_name = "venc",
203 .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, 145 .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
204 .platform_enable = am3517_evm_panel_enable_tv,
205 .platform_disable = am3517_evm_panel_disable_tv,
206}; 146};
207 147
208static struct tfp410_platform_data dvi_panel = { 148static struct tfp410_platform_data dvi_panel = {
@@ -365,8 +305,6 @@ static void __init am3517_evm_init(void)
365 usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data)); 305 usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
366 usbhs_init(&usbhs_bdata); 306 usbhs_init(&usbhs_bdata);
367 am3517_evm_hecc_init(&am3517_evm_hecc_pdata); 307 am3517_evm_hecc_init(&am3517_evm_hecc_pdata);
368 /* DSS */
369 am3517_evm_display_init();
370 308
371 /* RTC - S35390A */ 309 /* RTC - S35390A */
372 am3517_evm_rtc_init(); 310 am3517_evm_rtc_init();