Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100774
b: refs/heads/master
c: 2e1117d
h: refs/heads/master
v: v3
  • Loading branch information
Martin Michlmayr authored and Nicolas Pitre committed Jul 7, 2008
1 parent acefe60 commit 081f85d
Show file tree
Hide file tree
Showing 3 changed files with 48 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: 6b5cdf0f6d4dc3d98de20d6b0abe8500046f1cb1
refs/heads/master: 2e1117d307dba8185a72bac94e57f057e70590ca
4 changes: 2 additions & 2 deletions trunk/arch/arm/configs/orion5x_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1077,15 +1077,15 @@ CONFIG_LEDS_CLASS=y
#
# LED drivers
#
# CONFIG_LEDS_GPIO is not set
CONFIG_LEDS_GPIO=y

#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
Expand Down
45 changes: 45 additions & 0 deletions trunk/arch/arm/mach-orion5x/mv2120-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,50 @@ static struct i2c_board_info __initdata mv2120_i2c_rtc = {
.irq = 0,
};

static struct gpio_led mv2120_led_pins[] = {
{
.name = "mv2120:blue:health",
.gpio = 0,
},
{
.name = "mv2120:red:health",
.gpio = 1,
},
{
.name = "mv2120:led:bright",
.gpio = 4,
.default_trigger = "default-on",
},
{
.name = "mv2120:led:dimmed",
.gpio = 5,
},
{
.name = "mv2120:red:sata0",
.gpio = 8,
.active_low = 1,
},
{
.name = "mv2120:red:sata1",
.gpio = 9,
.active_low = 1,
},

};

static struct gpio_led_platform_data mv2120_led_data = {
.leds = mv2120_led_pins,
.num_leds = ARRAY_SIZE(mv2120_led_pins),
};

static struct platform_device mv2120_leds = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &mv2120_led_data,
}
};

static void mv2120_power_off(void)
{
pr_info("%s: triggering power-off...\n", __func__);
Expand Down Expand Up @@ -172,6 +216,7 @@ static void __init mv2120_init(void)
gpio_free(MV2120_GPIO_RTC_IRQ);
}
i2c_register_board_info(0, &mv2120_i2c_rtc, 1);
platform_device_register(&mv2120_leds);

/* register mv2120 specific power-off method */
if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 ||
Expand Down

0 comments on commit 081f85d

Please sign in to comment.