diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-am3517evm.c')
-rw-r--r-- | arch/arm/mach-omap2/board-am3517evm.c | 56 |
1 files changed, 17 insertions, 39 deletions
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index ff8c59be36e5..63af4171c043 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -174,19 +174,14 @@ static void __init am3517_evm_rtc_init(void) | |||
174 | int r; | 174 | int r; |
175 | 175 | ||
176 | omap_mux_init_gpio(GPIO_RTCS35390A_IRQ, OMAP_PIN_INPUT_PULLUP); | 176 | omap_mux_init_gpio(GPIO_RTCS35390A_IRQ, OMAP_PIN_INPUT_PULLUP); |
177 | r = gpio_request(GPIO_RTCS35390A_IRQ, "rtcs35390a-irq"); | 177 | |
178 | r = gpio_request_one(GPIO_RTCS35390A_IRQ, GPIOF_IN, "rtcs35390a-irq"); | ||
178 | if (r < 0) { | 179 | if (r < 0) { |
179 | printk(KERN_WARNING "failed to request GPIO#%d\n", | 180 | printk(KERN_WARNING "failed to request GPIO#%d\n", |
180 | GPIO_RTCS35390A_IRQ); | 181 | GPIO_RTCS35390A_IRQ); |
181 | return; | 182 | return; |
182 | } | 183 | } |
183 | r = gpio_direction_input(GPIO_RTCS35390A_IRQ); | 184 | |
184 | if (r < 0) { | ||
185 | printk(KERN_WARNING "GPIO#%d cannot be configured as input\n", | ||
186 | GPIO_RTCS35390A_IRQ); | ||
187 | gpio_free(GPIO_RTCS35390A_IRQ); | ||
188 | return; | ||
189 | } | ||
190 | am3517evm_i2c1_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ); | 185 | am3517evm_i2c1_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ); |
191 | } | 186 | } |
192 | 187 | ||
@@ -242,6 +237,15 @@ static int dvi_enabled; | |||
242 | 237 | ||
243 | #if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \ | 238 | #if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \ |
244 | defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE) | 239 | defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE) |
240 | static struct gpio am3517_evm_dss_gpios[] __initdata = { | ||
241 | /* GPIO 182 = LCD Backlight Power */ | ||
242 | { LCD_PANEL_BKLIGHT_PWR, GPIOF_OUT_INIT_HIGH, "lcd_backlight_pwr" }, | ||
243 | /* GPIO 181 = LCD Panel PWM */ | ||
244 | { LCD_PANEL_PWM, GPIOF_OUT_INIT_HIGH, "lcd bl enable" }, | ||
245 | /* GPIO 176 = LCD Panel Power enable pin */ | ||
246 | { LCD_PANEL_PWR, GPIOF_OUT_INIT_HIGH, "dvi enable" }, | ||
247 | }; | ||
248 | |||
245 | static void __init am3517_evm_display_init(void) | 249 | static void __init am3517_evm_display_init(void) |
246 | { | 250 | { |
247 | int r; | 251 | int r; |
@@ -249,41 +253,15 @@ static void __init am3517_evm_display_init(void) | |||
249 | omap_mux_init_gpio(LCD_PANEL_PWR, OMAP_PIN_INPUT_PULLUP); | 253 | omap_mux_init_gpio(LCD_PANEL_PWR, OMAP_PIN_INPUT_PULLUP); |
250 | omap_mux_init_gpio(LCD_PANEL_BKLIGHT_PWR, OMAP_PIN_INPUT_PULLDOWN); | 254 | omap_mux_init_gpio(LCD_PANEL_BKLIGHT_PWR, OMAP_PIN_INPUT_PULLDOWN); |
251 | omap_mux_init_gpio(LCD_PANEL_PWM, OMAP_PIN_INPUT_PULLDOWN); | 255 | omap_mux_init_gpio(LCD_PANEL_PWM, OMAP_PIN_INPUT_PULLDOWN); |
252 | /* | 256 | |
253 | * Enable GPIO 182 = LCD Backlight Power | 257 | r = gpio_request_array(am3517_evm_dss_gpios, |
254 | */ | 258 | ARRAY_SIZE(am3517_evm_dss_gpios)); |
255 | r = gpio_request(LCD_PANEL_BKLIGHT_PWR, "lcd_backlight_pwr"); | ||
256 | if (r) { | 259 | if (r) { |
257 | printk(KERN_ERR "failed to get lcd_backlight_pwr\n"); | 260 | printk(KERN_ERR "failed to get DSS panel control GPIOs\n"); |
258 | return; | 261 | return; |
259 | } | 262 | } |
260 | gpio_direction_output(LCD_PANEL_BKLIGHT_PWR, 1); | ||
261 | /* | ||
262 | * Enable GPIO 181 = LCD Panel PWM | ||
263 | */ | ||
264 | r = gpio_request(LCD_PANEL_PWM, "lcd_pwm"); | ||
265 | if (r) { | ||
266 | printk(KERN_ERR "failed to get lcd_pwm\n"); | ||
267 | goto err_1; | ||
268 | } | ||
269 | gpio_direction_output(LCD_PANEL_PWM, 1); | ||
270 | /* | ||
271 | * Enable GPIO 176 = LCD Panel Power enable pin | ||
272 | */ | ||
273 | r = gpio_request(LCD_PANEL_PWR, "lcd_panel_pwr"); | ||
274 | if (r) { | ||
275 | printk(KERN_ERR "failed to get lcd_panel_pwr\n"); | ||
276 | goto err_2; | ||
277 | } | ||
278 | gpio_direction_output(LCD_PANEL_PWR, 1); | ||
279 | 263 | ||
280 | printk(KERN_INFO "Display initialized successfully\n"); | 264 | printk(KERN_INFO "Display initialized successfully\n"); |
281 | return; | ||
282 | |||
283 | err_2: | ||
284 | gpio_free(LCD_PANEL_PWM); | ||
285 | err_1: | ||
286 | gpio_free(LCD_PANEL_BKLIGHT_PWR); | ||
287 | } | 265 | } |
288 | #else | 266 | #else |
289 | static void __init am3517_evm_display_init(void) {} | 267 | static void __init am3517_evm_display_init(void) {} |
@@ -396,7 +374,7 @@ static struct omap_musb_board_data musb_board_data = { | |||
396 | .power = 500, | 374 | .power = 500, |
397 | .set_phy_power = am35x_musb_phy_power, | 375 | .set_phy_power = am35x_musb_phy_power, |
398 | .clear_irq = am35x_musb_clear_irq, | 376 | .clear_irq = am35x_musb_clear_irq, |
399 | .set_mode = am35x_musb_set_mode, | 377 | .set_mode = am35x_set_mode, |
400 | .reset = am35x_musb_reset, | 378 | .reset = am35x_musb_reset, |
401 | }; | 379 | }; |
402 | 380 | ||