dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/Documentation
Richard Purdie 75c1d31d9e [PATCH] LED: class documentation
The LED class/subsystem takes John Lenz's work and extends and alters it to
give what I think should be a fairly universal LED implementation.

The series consists of several logical units:

* LED Core + Class implementation
* LED Trigger Core implementation
* LED timer trigger (example of a complex trigger)
* LED device drivers for corgi, spitz and tosa Zaurus models
* LED device driver for locomo LEDs
* LED device driver for ARM ixp4xx LEDs
* Zaurus charging LED trigger
* IDE disk activity LED trigger
* NAND MTD activity LED trigger

Why?
====

LEDs are really simple devices usually amounting to a GPIO that can be turned
on and off so why do we need all this code?  On handheld or embedded devices
they're an important part of an often limited user interface.  Both users and
developers want to be able to control and configure what the LED does and the
number of different things they'd potentially want the LED to show is large.

A subsystem is needed to try and provide all this different functionality in
an architecture independent, simple but complete, generic and scalable manner.

The alternative is for everyone to implement just what they need hidden away
in different corners of the kernel source tree and to provide an inconsistent
interface to userspace.

Other Implementations
=====================

I'm aware of the existing arm led implementation.  Currently the new subsystem
and the arm code can coexist quite happily.  Its up to the arm community to
decide whether this new interface is acceptable to them.  As far as I can see,
the new interface can do everything the existing arm implementation can with
the advantage that the new code is architecture independent and much more
generic, configurable and scalable.

I'm prepared to make the conversion to the LED subsystem (or assist with it)
if appropriate.

Implementation Details
======================

I've stripped a lot of code out of John's original LED class.  Colours were
removed as LED colour is now part of the device name.  Multiple colours are to
be handled as multiple led devices.  This means you get full control over each
colour.  I also removed the LED hardware timer code as the generic timer isn't
going to add much overhead and is just as useful.  I also decided to have the
LED core track the current LED status (to ease suspend/resume handling)
removing the need for brightness_get implementations in the LED drivers.

An underlying design philosophy is simplicity.  The aim is to keep a small
amount of code giving as much functionality as possible.

The major new idea is the led "trigger".  A trigger is a source of led events.
 Triggers can either be simple or complex.  A simple trigger isn't
configurable and is designed to slot into existing subsystems with minimal
additional code.  Examples are the ide-disk, nand-disk and zaurus-charging
triggers.  With leds disabled, the code optimises away.  Examples are
nand-disk and ide-disk.

Complex triggers whilst available to all LEDs have LED specific parameters and
work on a per LED basis.  The timer trigger is an example.

You can change triggers in a similar manner to the way an IO scheduler is
chosen (via /sys/class/leds/somedevice/trigger).

So far there are only a handful of examples but it should easy to add further
LED triggers without too much interference into other subsystems.

Known Issues
============

The LED Trigger core cannot be a module as the simple trigger functions would
cause nightmare dependency issues.  I see this as a minor issue compared to
the benefits the simple trigger functionality brings.  The rest of the LED
subsystem can be modular.

Some leds can be programmed to flash in hardware.  As this isn't a generic LED
device property, I think this should be exported as a device specific sysfs
attribute rather than part of the class if this functionality is required (eg.
 to keep the led flashing whilst the device is suspended).

Future Development
==================

At the moment, a trigger can't be created specifically for a single LED.
There are a number of cases where a trigger might only be mappable to a
particular LED.  The addition of triggers provided by the LED driver should
cover this option and be possible to add without breaking the current
interface.

A CPU activity trigger similar to that found in the arm led implementation
should be trivial to add.

This patch:

Add some brief documentation of the design decisions behind the LED class and
how it appears to users.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-31 12:18:56 -08:00
..
DocBook [PATCH] libata: Simplex and other mode filtering logic 2006-03-29 19:30:28 -05:00
RCU [PATCH] for_each_possible_cpu: documentaion 2006-03-28 09:16:05 -08:00
aoe [PATCH] aoe [2/8]: support dynamic resizing of AoE devices 2006-03-23 22:01:55 -08:00
arm [ARM] 3416/1: Update LART site URL 2006-03-27 15:32:30 +01:00
block [PATCH] update max_sectors documentation 2006-03-27 09:29:01 +02:00
cdrom [PATCH] remove verify_area(): remove or edit references to verify_area in Documentation/ 2005-09-07 16:57:35 -07:00
connector [CONNECTOR]: Use netlink_has_listeners() to avoind unnecessary allocations. 2006-03-20 22:21:40 -08:00
cpu-freq [PATCH] cpufreq: documentation for 'ondemand' and 'conservative' 2005-12-01 01:23:23 -08:00
cris Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
crypto [PATCH] Spelling fixes for Documentation/ 2005-09-10 10:06:28 -07:00
device-mapper [PATCH] Fix dm-snapshot tutorial in Documentation 2005-11-07 07:53:54 -08:00
driver-model [PATCH] Clean up Documentation/driver-model/overview.txt 2006-02-03 08:31:59 -08:00
drivers/edac [PATCH] EDAC: documentation spelling fixes 2006-03-26 08:57:08 -08:00
dvb Documentation/dvb/get_dvb_firmware: fix firmware URL 2006-03-22 00:43:59 +01:00
early-userspace earlyuserspace/README: fix homonym err 2005-11-08 17:16:50 +01:00
fb [PATCH] Update cyblafb driver 2006-01-09 10:00:36 -08:00
filesystems [PATCH] Docs update: missing files and descriptions for filesystems/00-INDEX 2006-03-28 09:16:06 -08:00
firmware_class [PATCH] Doc: fix example firmware source code 2006-03-25 08:23:01 -08:00
fujitsu/frv [PATCH] FRV: Use virtual interrupt disablement 2006-02-14 16:09:35 -08:00
hwmon [PATCH] w83781d: Don't reset the chip by default 2006-03-23 14:21:53 -08:00
i2c [PATCH] I2C: i2c-piix4: Add Broadcom HT-1000 support 2006-03-23 14:21:55 -08:00
i2o spelling: s/retreive/retrieve/ 2006-01-10 00:10:13 +01:00
i386 [PATCH] Make the bzImage format self-terminating 2005-09-07 16:57:29 -07:00
ia64 [IA64] Add Documentation/ia64/mca.txt 2005-09-16 10:34:16 -07:00
infiniband [PATCH] IB: Add core locking documentation to Infiniband 2005-07-27 16:26:15 -07:00
input Fix "stuct", "strut", "struc" typos 2006-01-15 02:12:54 +01:00
ioctl spelling: s/appropiate/appropriate/ 2006-01-15 02:00:17 +01:00
isdn Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kbuild kbuild: in makefile.txt note that Makefile is preferred name for kbuild files 2006-03-10 00:23:32 +01:00
kdump [PATCH] kdump: add dmesg gdbmacro into document 2006-01-11 18:42:10 -08:00
m68k [PATCH] Typo fixes 2006-03-28 09:16:08 -08:00
mips [MIPS] Update docs to reflect the latest status of the Alchemy IDE driver. 2006-02-14 19:13:23 +00:00
networking Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2006-03-29 17:30:19 -05:00
parisc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pcmcia [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback 2006-01-06 00:03:24 +01:00
power [PATCH] swsusp: userland interface 2006-03-23 07:38:07 -08:00
powerpc [PATCH] powerpc: Kill _machine and hard-coded platform numbers 2006-03-28 23:15:54 +11:00
s390 [PATCH] s390: cio documentation update 2006-03-24 07:33:15 -08:00
scsi [SCSI] megaraid_sas: support for 1078 type controller added 2006-02-04 16:38:41 -06:00
serial [SERIAL] Update serial_core documentation 2005-10-31 11:53:19 +00:00
sh Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sound [PATCH] more s/fucn/func/ typo fixes 2006-03-26 08:57:09 -08:00
sparc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
spi [PATCH] SPI: spi_butterfly, restore lost deltas 2006-02-06 12:17:17 -08:00
sysctl [PATCH] suspend-to-ram: allow video options to be set at runtime 2006-02-20 20:00:10 -08:00
telephony Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
uml [PATCH] Spelling fixes for Documentation/ 2005-09-10 10:06:28 -07:00
usb [PATCH] USB: ZC0301 driver bugfix 2006-03-20 14:50:01 -08:00
video4linux V4L/DVB (3599c): Whitespace cleanups under Documentation/video4linux 2006-03-25 09:29:32 -03:00
vm [PATCH] Page migration documentation update 2006-03-14 21:43:02 -08:00
w1 [PATCH] W1: Add the DS2482 I2C-to-w1 bridge driver. 2006-03-23 17:28:12 -08:00
watchdog [PATCH] ppc32: Added support for the Book-E style Watchdog Timer 2005-09-05 00:05:56 -07:00
x86_64 [PATCH] x86_64: Better ATI timer fix 2006-02-26 09:53:31 -08:00
00-INDEX [PATCH] update Documentation/00-INDEX 2005-11-18 10:51:22 -08:00
BUG-HUNTING Documentation: Update to BUG-HUNTING 2006-03-22 00:37:42 +01:00
Changes Documentation/Changes: remove outdated translation references 2006-03-20 20:28:13 +01:00
CodingStyle [PATCH] CodingStyle correction 2006-01-10 08:01:52 -08:00
DMA-API.txt [PATCH] Spelling fixes for Documentation/ 2005-09-10 10:06:28 -07:00
DMA-ISA-LPC.txt [PATCH] ISA DMA API documentation 2005-09-09 14:03:42 -07:00
DMA-mapping.txt [PATCH] Replace 0xff.. with correct DMA_xBIT_MASK 2006-03-28 09:16:07 -08:00
HOWTO [PATCH] Add HOWTO do kernel development document to the Documentation directory 2005-11-18 10:51:21 -08:00
IO-mapping.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
IPMI.txt [PATCH] ipmi poweroff: fix chassis control 2005-09-07 16:57:49 -07:00
IRQ-affinity.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
MSI-HOWTO.txt [PATCH] Doc/MSI-HOWTO: cleanups 2005-11-07 07:53:55 -08:00
ManagementStyle Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
PCIEBUS-HOWTO.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
README.DAC960 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
README.cycladesZ Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
SAK.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
SecurityBugs Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
SubmittingDrivers [PATCH] docs: update some updated code docs 2006-01-14 10:39:53 -08:00
SubmittingPatches [PATCH] docs: update some updated code docs 2006-01-14 10:39:53 -08:00
VGA-softcursor.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
acpi-hotkey.txt Merge to-linus-stable into to-akpm 2005-08-15 15:52:00 -04:00
applying-patches.txt [PATCH] Docs update: typos, corrections and additions to applying-patches.txt 2006-01-10 08:01:54 -08:00
atomic_ops.txt [PATCH] atomic: inc_not_zero 2005-11-13 18:14:16 -08:00
basic_profiling.txt [PATCH] oprofile: report anonymous region samples 2005-06-24 00:06:27 -07:00
binfmt_misc.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cachetlb.txt [PATCH] Add flush_kernel_dcache_page() API 2006-03-26 08:56:53 -08:00
cciss.txt [SCSI] cciss: scsi error handling 2005-11-06 14:12:49 -06:00
cli-sti-removal.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
computone.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cpqarray.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cpu-hotplug.txt [PATCH] for_each_possible_cpu: documentaion 2006-03-28 09:16:05 -08:00
cpusets.txt [PATCH] cpuset memory spread basic implementation 2006-03-24 07:33:22 -08:00
cputopology.txt [PATCH] trivial typos in Documentation/cputopology.txt 2006-03-28 09:16:08 -08:00
dcdbas.txt [PATCH] dcdbas: add Dell Systems Management Base Driver with sysfs support 2005-09-07 16:57:27 -07:00
debugging-modules.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dell_rbu.txt [PATCH] dell_rbu: changes in packet update mechanism 2005-10-11 09:46:53 -07:00
devices.txt [PATCH] USB: Delete leftovers from bluetty driver 2005-11-17 11:29:53 -08:00
digiepca.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dnotify.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dontdiff [PATCH] dontdiff: add asm_offsets 2005-09-13 08:22:29 -07:00
eisa.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
exception.txt [PATCH] remove verify_area(): remove or edit references to verify_area in Documentation/ 2005-09-07 16:57:35 -07:00
feature-removal-schedule.txt [PATCH] mm: schedule find_trylock_page() removal 2006-03-31 12:18:49 -08:00
floppy.txt [PATCH] kernel Doc/ URL corrections 2005-11-22 09:14:30 -08:00
ftape.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hayes-esp.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
highuid.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hpet.txt Documentation/hpet.txt typo 2006-01-15 02:09:54 +01:00
hrtimers.txt [PATCH] hrtimer: hrtimer documentation 2006-01-10 08:01:37 -08:00
hw_random.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ibm-acpi.txt [ACPI] IBM ThinkPad ACPI Extras Driver v0.12 2005-08-25 17:37:51 -04:00
ide.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
initrd.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
io_ordering.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ioctl-number.txt [PATCH] arch/i386/kernel/microcode.c: remove the obsolete microcode_ioctl 2006-03-28 09:16:06 -08:00
iostats.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
isapnp.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
java.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kernel-doc-nano-HOWTO.txt [PATCH] Doc/kernel-doc: add more usage info 2006-02-01 08:53:27 -08:00
kernel-docs.txt [PATCH] kernel Doc/ URL corrections 2005-11-22 09:14:30 -08:00
kernel-parameters.txt [PATCH] doc: more serial-console info 2006-03-25 08:23:00 -08:00
keys-request-key.txt [PATCH] keys: Permit running process to instantiate keys 2006-01-08 20:13:53 -08:00
keys.txt [PATCH] keys: Permit running process to instantiate keys 2006-01-08 20:13:53 -08:00
kobject.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kprobes.txt [PATCH] kprobes: Update Documentation/kprobes.txt 2006-02-14 16:09:34 -08:00
kref.txt [PATCH] kref: add link to original documentation to the kref documentation. 2005-04-18 21:57:30 -07:00
laptop-mode.txt spelling: s/appropiate/appropriate/ 2006-01-15 02:00:17 +01:00
ldm.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
leds-class.txt [PATCH] LED: class documentation 2006-03-31 12:18:56 -08:00
locks.txt [PATCH] Docs update: remove obsolete patch from locks.txt 2006-01-10 08:01:54 -08:00
logo.gif Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
logo.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
magic-number.txt [PATCH] mm: rename kmem_cache_s to kmem_cache 2005-11-07 07:53:24 -08:00
mandatory.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mca.txt [PATCH] kernel Doc/ URL corrections 2005-11-22 09:14:30 -08:00
md.txt [PATCH] md: allow sync-speed to be controlled per-device 2006-01-06 08:34:10 -08:00
memory.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mono.txt [PATCH] merge some from Rusty's trivial patches 2005-09-10 10:06:30 -07:00
moxa-smartio Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mtrr.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mutex-design.txt [PATCH] mutex subsystem, documentation 2006-01-09 15:59:20 -08:00
nbd.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
nfsroot.txt [PATCH] Updated Documentation/nfsroot.txt 2006-03-24 07:33:27 -08:00
nmi_watchdog.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
nommu-mmap.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
numastat.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
oops-tracing.txt [PATCH] doc: refer to kdump in oops-tracing.txt 2006-01-11 18:42:10 -08:00
paride.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
parport-lowlevel.txt [PATCH] parport: fix documentation 2006-02-03 08:32:06 -08:00
parport.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci-error-recovery.txt [PATCH] Documentation: Updated PCI Error Recovery 2006-02-03 08:32:00 -08:00
pci.txt [PATCH] merge some from Rusty's trivial patches 2005-09-10 10:06:30 -07:00
pm.txt [ACPI] linux-acpi@vger.kernel.org replaces acpi-devel@lists.sourceforge.net 2006-01-06 16:19:26 -05:00
pnp.txt [PATCH] pnp: PNP: adjust pnp_register_driver signature 2006-03-27 08:44:53 -08:00
preempt-locking.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
prio_tree.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ramdisk.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
riscom8.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
robust-futex-ABI.txt [PATCH] lightweight robust futexes updates 2006-03-27 08:44:49 -08:00
robust-futexes.txt [PATCH] lightweight robust futexes updates 2006-03-27 08:44:49 -08:00
rocket.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
rpc-cache.txt [PATCH] knfsd: Update rpc-cache.txt to match recent changes 2006-03-27 08:44:43 -08:00
rtc.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sched-arch.txt [PATCH] sched: resched and cpu_idle rework 2005-11-09 07:56:33 -08:00
sched-coding.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sched-design.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sched-domains.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sched-stats.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
seclvl.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
serial-console.txt [PATCH] doc: more serial-console info 2006-03-25 08:23:00 -08:00
sgi-ioc4.txt [PATCH] ioc4: Core driver rewrite 2005-06-21 18:46:32 -07:00
sgi-visws.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sharedsubtree.txt [PATCH] Complete description of shared subtrees. 2005-11-07 18:18:11 -08:00
smart-config.txt kbuild: remove checkconfig.pl 2006-02-19 09:51:22 +01:00
smp.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sonypi.txt [PATCH] sonypi SPIC initialisation fix 2005-09-07 16:57:24 -07:00
sparse.txt [PATCH] Documentation/sparse.txt: mention CF=-Wbitwise 2005-11-07 07:53:54 -08:00
specialix.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
spinlocks.txt fix rwlock usage example 2006-03-22 00:19:39 +01:00
stable_api_nonsense.txt [PATCH] stable_api_nonsense.txt fixes 2005-07-29 13:12:49 -07:00
stable_kernel_rules.txt [PATCH] Docs update: small fixes to stable_kernel_rules.txt 2006-01-10 08:01:55 -08:00
stallion.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
svga.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sx.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sysrq.txt update for Documentation/sysrq.txt 2006-01-03 13:31:01 +01:00
time_interpolators.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
tipar.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
tty.txt [PATCH] Introduce tty_unregister_ldisc() 2005-06-23 09:45:35 -07:00
unicode.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
unshare.txt [PATCH] unshare system call -v5: Documentation file 2006-02-07 16:12:34 -08:00
voyager.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
xterm-linux.xpm Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
zorro.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00

README.cycladesZ

The Cyclades-Z must have firmware loaded onto the card before it will
operate.  This operation should be performed during system startup,

The firmware, loader program and the latest device driver code are
available from Cyclades at
    ftp://ftp.cyclades.com/pub/cyclades/cyclades-z/linux/