Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172493
b: refs/heads/master
c: 81057f3
h: refs/heads/master
i:
  172491: 72a537e
v: v3
  • Loading branch information
Daniel Mack authored and Sascha Hauer committed Nov 19, 2009
1 parent 49ad6b9 commit 9797778
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a050c8e9b70b90a3e3b808a12d985a31e19c2f95
refs/heads/master: 81057f328618181f87b25571dd9f623c86fe960e
33 changes: 33 additions & 0 deletions trunk/arch/arm/mach-mx3/mx31lite-db.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <linux/leds.h>
#include <linux/platform_device.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand Down Expand Up @@ -153,6 +155,36 @@ static struct spi_imx_master spi0_pdata = {
.num_chipselect = ARRAY_SIZE(spi_internal_chipselect),
};

/* GPIO LEDs */

static struct gpio_led litekit_leds[] = {
{
.name = "GPIO0",
.gpio = IOMUX_TO_GPIO(MX31_PIN_COMPARE),
.active_low = 1,
.default_state = LEDS_GPIO_DEFSTATE_OFF,
},
{
.name = "GPIO1",
.gpio = IOMUX_TO_GPIO(MX31_PIN_CAPTURE),
.active_low = 1,
.default_state = LEDS_GPIO_DEFSTATE_OFF,
}
};

static struct gpio_led_platform_data litekit_led_platform_data = {
.leds = litekit_leds,
.num_leds = ARRAY_SIZE(litekit_leds),
};

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

void __init mx31lite_db_init(void)
{
mxc_iomux_setup_multiple_pins(litekit_db_board_pins,
Expand All @@ -161,5 +193,6 @@ void __init mx31lite_db_init(void)
mxc_register_device(&mxc_uart_device0, &uart_pdata);
mxc_register_device(&mxcsdhc_device0, &mmc_pdata);
mxc_register_device(&mxc_spi_device0, &spi0_pdata);
platform_device_register(&litekit_led_device);
}

0 comments on commit 9797778

Please sign in to comment.