[kernel] r15258 - in dists/sid/linux-2.6/debian: . patches/features/arm patches/series
Martin Michlmayr
tbm at alioth.debian.org
Mon Feb 22 23:05:58 UTC 2010
Author: tbm
Date: Mon Feb 22 23:05:50 2010
New Revision: 15258
Log:
D-Link DNS-323 revision A1: implement power LED (Closes: 503172).
Added:
dists/sid/linux-2.6/debian/patches/features/arm/dns323-rev-a1-powerled.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/9
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Mon Feb 22 21:13:36 2010 (r15257)
+++ dists/sid/linux-2.6/debian/changelog Mon Feb 22 23:05:50 2010 (r15258)
@@ -42,6 +42,7 @@
* [armel/kirkwood] Disable MTD_NAND_VERIFY_WRITE to avoid errors
with ubifs on OpenRD (Thanks Gert Doering) (Closes: #570407)
* OpenRD-Base: allow SD/UART1 selection (Closes: #571019)
+ * D-Link DNS-323 revision A1: implement power LED (Closes: 503172).
-- Ben Hutchings <ben at decadent.org.uk> Fri, 12 Feb 2010 02:59:33 +0000
Added: dists/sid/linux-2.6/debian/patches/features/arm/dns323-rev-a1-powerled.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/features/arm/dns323-rev-a1-powerled.patch Mon Feb 22 23:05:50 2010 (r15258)
@@ -0,0 +1,94 @@
+From: Laurie Bradshaw <bradshaw.laurie at googlemail.com>
+Date: Wed, 10 Feb 2010 16:10:43 +0000 (+0000)
+Subject: [ARM] orion5x: D-link DNS-323 revision A1 power LED
+X-Git-Url: http://git.marvell.com/?p=orion.git;a=commitdiff_plain;h=b2a731aa5cbca7e0252da75e16de7ae5feb1313a
+
+[ARM] orion5x: D-link DNS-323 revision A1 power LED
+
+This patch fixes the power LED on DNS-323 revision A1, and adds timer
+support for (hopefully) both A1 and B1 revisions.
+
+Power LED on revision A1 is active low and also requires GPIO 4 to be
+low to work.
+
+Tested on my DNS-323 revision A1.
+
+I have set the default trigger to timer as that replicates the
+behaviour of the original firmware, userspace can change the trigger
+at the end of the boot process providing a useful indication that
+booting has completed.
+
+Signed-off-by: Nicolas Pitre <nico at marvell.com>
+---
+
+diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
+index 8f159db..421b82f 100644
+--- a/arch/arm/mach-orion5x/dns323-setup.c
++++ b/arch/arm/mach-orion5x/dns323-setup.c
+@@ -34,7 +34,8 @@
+ #define DNS323_GPIO_LED_RIGHT_AMBER 1
+ #define DNS323_GPIO_LED_LEFT_AMBER 2
+ #define DNS323_GPIO_SYSTEM_UP 3
+-#define DNS323_GPIO_LED_POWER 5
++#define DNS323_GPIO_LED_POWER1 4
++#define DNS323_GPIO_LED_POWER2 5
+ #define DNS323_GPIO_OVERTEMP 6
+ #define DNS323_GPIO_RTC 7
+ #define DNS323_GPIO_POWER_OFF 8
+@@ -237,11 +238,31 @@ error_fail:
+ * GPIO LEDs (simple - doesn't use hardware blinking support)
+ */
+
++#define ORION_BLINK_HALF_PERIOD 100 /* ms */
++
++static int dns323_gpio_blink_set(unsigned gpio,
++ unsigned long *delay_on, unsigned long *delay_off)
++{
++ static int value = 0;
++
++ if (!*delay_on && !*delay_off)
++ *delay_on = *delay_off = ORION_BLINK_HALF_PERIOD;
++
++ if (ORION_BLINK_HALF_PERIOD == *delay_on
++ && ORION_BLINK_HALF_PERIOD == *delay_off) {
++ value = !value;
++ orion_gpio_set_blink(gpio, value);
++ return 0;
++ }
++
++ return -EINVAL;
++}
++
+ static struct gpio_led dns323_leds[] = {
+ {
+ .name = "power:blue",
+- .gpio = DNS323_GPIO_LED_POWER,
+- .default_state = LEDS_GPIO_DEFSTATE_ON,
++ .gpio = DNS323_GPIO_LED_POWER2,
++ .default_trigger = "default-on",
+ }, {
+ .name = "right:amber",
+ .gpio = DNS323_GPIO_LED_RIGHT_AMBER,
+@@ -256,6 +277,7 @@ static struct gpio_led dns323_leds[] = {
+ static struct gpio_led_platform_data dns323_led_data = {
+ .num_leds = ARRAY_SIZE(dns323_leds),
+ .leds = dns323_leds,
++ .gpio_blink_set = dns323_gpio_blink_set,
+ };
+
+ static struct platform_device dns323_gpio_leds = {
+@@ -412,6 +434,14 @@ static void __init dns323_init(void)
+ orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE);
+ platform_device_register(&dns323_nor_flash);
+
++ /* The 5181 power LED is active low and requires
++ * DNS323_GPIO_LED_POWER1 to also be low.
++ */
++ if (dns323_dev_id() == MV88F5181_DEV_ID) {
++ dns323_leds[0].active_low = 1;
++ gpio_direction_output(DNS323_GPIO_LED_POWER1, 0);
++ }
++
+ platform_device_register(&dns323_gpio_leds);
+
+ platform_device_register(&dns323_button_device);
Modified: dists/sid/linux-2.6/debian/patches/series/9
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/9 Mon Feb 22 21:13:36 2010 (r15257)
+++ dists/sid/linux-2.6/debian/patches/series/9 Mon Feb 22 23:05:50 2010 (r15258)
@@ -20,3 +20,4 @@
+ features/all/ath9k-add-support-for-802.11n-bonded-out-AR2427.patch
+ bugfix/all/drm-i915-give-up-on-8xx-lid-status.patch
+ features/arm/openrd-base-uart.patch
++ features/arm/dns323-rev-a1-powerled.patch
More information about the Kernel-svn-changes
mailing list