diff options
| author | Eric Bénard <eric@eukrea.com> | 2012-03-08 14:20:53 +0100 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2012-03-08 15:25:08 +0000 |
| commit | 24459dc1cf29f1427a9b2a02e51af4e2bce4a7b4 (patch) | |
| tree | bed8df98d8505febc11a56dcf21e2a0bbb0d7ec8 | |
| parent | d922fe2e3ed510eccdd0f63e55caf49f2d7c0dd4 (diff) | |
| download | meta-freescale-24459dc1cf29f1427a9b2a02e51af4e2bce4a7b4.tar.gz | |
linux-imx-2.6.35: add USR led support to imx53qsb
this allows to have an heartbeat trigger on this led for example
Signed-off-by: Eric Bénard <eric@eukrea.com>
| -rw-r--r-- | meta-fsl-arm/recipes-kernel/linux/linux-imx/0001-mx53_loco-add-USR-led-support.patch | 68 | ||||
| -rw-r--r-- | meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb | 3 |
2 files changed, 70 insertions, 1 deletions
diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx/0001-mx53_loco-add-USR-led-support.patch b/meta-fsl-arm/recipes-kernel/linux/linux-imx/0001-mx53_loco-add-USR-led-support.patch new file mode 100644 index 000000000..1eff49447 --- /dev/null +++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx/0001-mx53_loco-add-USR-led-support.patch | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | From 564ac4b9d7da4cc8e6fdca33ca45d19649dc3366 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com> | ||
| 3 | Date: Wed, 7 Mar 2012 23:24:54 +0100 | ||
| 4 | Subject: [PATCH] mx53_loco: add USR led support | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Signed-off-by: Eric Bénard <eric@eukrea.com> | ||
| 10 | --- | ||
| 11 | arch/arm/mach-mx5/mx53_loco.c | 27 +++++++++++++++++++++++++++ | ||
| 12 | 1 files changed, 27 insertions(+), 0 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/arch/arm/mach-mx5/mx53_loco.c b/arch/arm/mach-mx5/mx53_loco.c | ||
| 15 | index c8417da..c91952b 100644 | ||
| 16 | --- a/arch/arm/mach-mx5/mx53_loco.c | ||
| 17 | +++ b/arch/arm/mach-mx5/mx53_loco.c | ||
| 18 | @@ -835,6 +835,28 @@ static void __init fixup_mxc_board(struct machine_desc *desc, struct tag *tags, | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | +static struct gpio_led gpio_leds[] = { | ||
| 23 | + { | ||
| 24 | + .name = "USR", | ||
| 25 | + .default_trigger = "heartbeat", | ||
| 26 | + .active_low = 0, | ||
| 27 | + .gpio = USER_LED_EN, | ||
| 28 | + }, | ||
| 29 | +}; | ||
| 30 | + | ||
| 31 | +static struct gpio_led_platform_data gpio_led_info = { | ||
| 32 | + .leds = gpio_leds, | ||
| 33 | + .num_leds = ARRAY_SIZE(gpio_leds), | ||
| 34 | +}; | ||
| 35 | + | ||
| 36 | +static struct platform_device leds_gpio = { | ||
| 37 | + .name = "leds-gpio", | ||
| 38 | + .id = -1, | ||
| 39 | + .dev = { | ||
| 40 | + .platform_data = &gpio_led_info, | ||
| 41 | + }, | ||
| 42 | +}; | ||
| 43 | + | ||
| 44 | static void __init mx53_loco_io_init(void) | ||
| 45 | { | ||
| 46 | mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, | ||
| 47 | @@ -865,6 +887,10 @@ static void __init mx53_loco_io_init(void) | ||
| 48 | gpio_request(DISP0_POWER_EN, "disp0-power-en"); | ||
| 49 | gpio_direction_output(DISP0_POWER_EN, 1); | ||
| 50 | |||
| 51 | + /* USR LED */ | ||
| 52 | + gpio_request(USER_LED_EN, "user-led-en"); | ||
| 53 | + gpio_direction_output(USER_LED_EN, 1); | ||
| 54 | + gpio_free(USER_LED_EN); | ||
| 55 | } | ||
| 56 | |||
| 57 | /*! | ||
| 58 | @@ -979,6 +1005,7 @@ static void __init mxc_board_init(void) | ||
| 59 | loco_add_device_buttons(); | ||
| 60 | pm_power_off = da9053_power_off; | ||
| 61 | pm_i2c_init(I2C1_BASE_ADDR - MX53_OFFSET); | ||
| 62 | + platform_device_register(&leds_gpio); | ||
| 63 | } | ||
| 64 | |||
| 65 | static void __init mx53_loco_timer_init(void) | ||
| 66 | -- | ||
| 67 | 1.7.7.6 | ||
| 68 | |||
diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb b/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb index dd3e71f46..a7f081211 100644 --- a/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb +++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | DESCRIPTION = "Linux kernel for imx platforms" | 4 | DESCRIPTION = "Linux kernel for imx platforms" |
| 5 | LICENSE = "GPLv2" | 5 | LICENSE = "GPLv2" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" |
| 7 | PR = "r10" | 7 | PR = "r11" |
| 8 | 8 | ||
| 9 | inherit kernel | 9 | inherit kernel |
| 10 | COMPATIBLE_MACHINE = "(imx53qsb|imx53ard|imx51evk)" | 10 | COMPATIBLE_MACHINE = "(imx53qsb|imx53ard|imx51evk)" |
| @@ -26,6 +26,7 @@ SRC_URI = "git://opensource.freescale.com/pub/scm/imx/linux-2.6-imx.git;tag=rel_ | |||
| 26 | file://1146-ENGR00170244-1-ARM-AHCI-Enable-PDDQ-mode-when-no-d.patch \ | 26 | file://1146-ENGR00170244-1-ARM-AHCI-Enable-PDDQ-mode-when-no-d.patch \ |
| 27 | file://1147-ENGR00170244-2-ARM-AHCI-Enable-PDDQ-mode-when-no-d.patch \ | 27 | file://1147-ENGR00170244-2-ARM-AHCI-Enable-PDDQ-mode-when-no-d.patch \ |
| 28 | file://no-unaligned-access.patch \ | 28 | file://no-unaligned-access.patch \ |
| 29 | file://0001-mx53_loco-add-USR-led-support.patch \ | ||
| 29 | file://defconfig \ | 30 | file://defconfig \ |
| 30 | " | 31 | " |
| 31 | 32 | ||
