[ARM] 4981/1: [KS8695] Simple LED driver

Previous thread: iop: unconditionally initialize the ATU on platforms known to be 'hosts' by Linux Kernel Mailing List on Monday, April 21, 2008 - 9:22 pm. (1 message)

Next thread: [ARM] 4852/1: Add timerfd_create, timerfd_settime and timerfd_gettime syscall entries by Linux Kernel Mailing List on Monday, April 21, 2008 - 9:22 pm. (1 message)
To: <git-commits-head@...>
Date: Monday, April 21, 2008 - 9:22 pm

Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=c...
Commit: fdb72fd84c26438a7dd754a1cc74890aca7f1b77
Parent: 05dda977f2574c3341abef9b74c27d2b362e1e3a
Author: Andrew Victor <linux@maxim.org.za>
AuthorDate: Tue Apr 15 21:13:33 2008 +0100
Committer: Russell King <rmk+kernel@arm.linux.org.uk>
CommitDate: Thu Apr 17 15:58:25 2008 +0100

[ARM] 4981/1: [KS8695] Simple LED driver

Simple gpio-connected LED driver for KS8695 platforms.
(Based on old AT91 LED driver)

Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-ks8695/Makefile | 3 +
arch/arm/mach-ks8695/devices.c | 21 +++++++
arch/arm/mach-ks8695/leds.c | 94 +++++++++++++++++++++++++++++++++
include/asm-arm/arch-ks8695/devices.h | 5 ++
4 files changed, 123 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-ks8695/Makefile b/arch/arm/mach-ks8695/Makefile
index 730a3af..ade42b7 100644
--- a/arch/arm/mach-ks8695/Makefile
+++ b/arch/arm/mach-ks8695/Makefile
@@ -11,5 +11,8 @@ obj- :=
# PCI support is optional
obj-$(CONFIG_PCI) += pci.o

+# LEDs
+obj-$(CONFIG_LEDS) += leds.o
+
# Board-specific support
obj-$(CONFIG_MACH_KS8695) += board-micrel.o
diff --git a/arch/arm/mach-ks8695/devices.c b/arch/arm/mach-ks8695/devices.c
index 386593f..3db2ec6 100644
--- a/arch/arm/mach-ks8695/devices.c
+++ b/arch/arm/mach-ks8695/devices.c
@@ -176,6 +176,27 @@ static void __init ks8695_add_device_watchdog(void) {}
#endif

+/* --------------------------------------------------------------------
+ * LEDs
+ * -------------------------------------------------------------------- */
+
+#if defined(CONFIG_LEDS)
+short ks8695_leds_cpu = -1;
+short ks8695_leds_timer = -1;
+
+void __init ks8695_init_leds(u8 cpu_led, u8 timer_led)
+{
+ /* Enable GPIO to access the LEDs *...

Previous thread: iop: unconditionally initialize the ATU on platforms known to be 'hosts' by Linux Kernel Mailing List on Monday, April 21, 2008 - 9:22 pm. (1 message)

Next thread: [ARM] 4852/1: Add timerfd_create, timerfd_settime and timerfd_gettime syscall entries by Linux Kernel Mailing List on Monday, April 21, 2008 - 9:22 pm. (1 message)