Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184745
b: refs/heads/master
c: b344d87
h: refs/heads/master
i:
  184743: 75ec1cb
v: v3
  • Loading branch information
Jonas Zetterberg authored and Tony Lindgren committed Feb 19, 2010
1 parent 5fa0241 commit e1c19ed
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c67b0d987088ae0339edc66de63aea5ac3d76c0d
refs/heads/master: b344d87a28d5684ad9b6c4f880e70c48e23215f1
30 changes: 28 additions & 2 deletions trunk/arch/arm/mach-omap2/board-igep0020.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/leds.h>
#include <linux/interrupt.h>

#include <linux/regulator/machine.h>
Expand Down Expand Up @@ -354,9 +355,34 @@ static void __init igep2_display_init(void)
gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1))
pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n");
}
#ifdef CONFIG_LEDS_TRIGGERS
static struct gpio_led gpio_leds[] = {
{
.name = "GPIO_LED1_RED",
.default_trigger = "heartbeat",
.gpio = IGEP2_GPIO_LED1_RED,
},
};

static struct gpio_led_platform_data gpio_leds_info = {
.leds = gpio_leds,
.num_leds = ARRAY_SIZE(gpio_leds),
};

static struct platform_device leds_gpio = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &gpio_leds_info,
},
};
#endif

static struct platform_device *igep2_devices[] __initdata = {
&igep2_dss_device,
#ifdef CONFIG_LEDS_TRIGGERS
&leds_gpio,
#endif
};

static void __init igep2_init_irq(void)
Expand Down Expand Up @@ -456,14 +482,14 @@ static void __init igep2_init(void)
gpio_set_value(IGEP2_GPIO_LED0_GREEN, 0);
} else
pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n");

#ifndef CONFIG_LEDS_TRIGGERS
if ((gpio_request(IGEP2_GPIO_LED1_RED, "GPIO_LED1_RED") == 0) &&
(gpio_direction_output(IGEP2_GPIO_LED1_RED, 1) == 0)) {
gpio_export(IGEP2_GPIO_LED1_RED, 0);
gpio_set_value(IGEP2_GPIO_LED1_RED, 0);
} else
pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_RED\n");

#endif
/* GPIO W-LAN + Bluetooth combo module */
if ((gpio_request(IGEP2_GPIO_WIFI_NPD, "GPIO_WIFI_NPD") == 0) &&
(gpio_direction_output(IGEP2_GPIO_WIFI_NPD, 1) == 0)) {
Expand Down

0 comments on commit e1c19ed

Please sign in to comment.