lkml.org 
[lkml]   [2009]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH 001/001] leds: alix-leds2 fixed for Award BIOS
From
2009/5/14 Constantin Baranov <const@mimas.ru>:
> OK, 'double' initialization seems good.
> I will test it on my ALIX.2c3 later.
Did you get some results>

> It should be stated in the Kconfig help message that the 'force' is
> required for boards with Award BIOS.
I added this.

From: Tobias Mueller <Tobias_Mueller@twam.info>

Added initialisation of GPIO ports for compatibility with boards with Award
BIOS (e.g. ALIX.3D3).
Signed-off-by: Tobias Mueller <Tobias_Mueller@twam.info>
---
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 7427136..ecf1b9c 100644
--- a/linux-2.6.29.3-org/drivers/leds/Kconfig
+++ b/linux-2.6.29.3/drivers/leds/Kconfig
@@ -68,6 +68,7 @@ config LEDS_ALIX2
depends on LEDS_CLASS && X86 && EXPERIMENTAL
help
This option enables support for the PCEngines ALIX.2 and ALIX.3 LEDs.
+ You have to set leds.alix2.force=1 for boards with Award BIOS.

config LEDS_H1940
tristate "LED Support for iPAQ H1940 device"
diff --git a/drivers/leds/leds-alix2.c b/drivers/leds/leds-alix2.c
index ddbd773..731d4ee 100644
--- a/linux-2.6.29.3-org/drivers/leds/leds-alix2.c
+++ b/linux-2.6.29.3/drivers/leds/leds-alix2.c
@@ -14,7 +14,7 @@

static int force = 0;
module_param(force, bool, 0444);
-MODULE_PARM_DESC(force, "Assume system has ALIX.2 style LEDs");
+MODULE_PARM_DESC(force, "Assume system has ALIX.2/ALIX.3 style LEDs");

struct alix_led {
struct led_classdev cdev;
@@ -155,6 +155,11 @@ static int __init alix_led_init(void)
goto out;
}

+ /* enable output on GPIO for LED 1,2,3 */
+ outl(1 << 6, 0x6104);
+ outl(1 << 9, 0x6184);
+ outl(1 << 11, 0x6184);
+
pdev = platform_device_register_simple(KBUILD_MODNAME, -1, NULL, 0);
if (!IS_ERR(pdev)) {
ret = platform_driver_probe(&alix_led_driver, alix_led_probe);

\
 
 \ /
  Last update: 2009-05-16 11:55    [W:0.564 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site