aboutsummaryrefslogtreecommitdiff
path: root/drivers/leds
AgeCommit message (Collapse)AuthorFilesLines
2008-04-29Remove duplicated unlikely() in IS_ERR()Hirofumi Nakagawa1-1/+1
Some drivers have duplicated unlikely() macros. IS_ERR() already has unlikely() in itself. This patch cleans up such pointless code. Signed-off-by: Hirofumi Nakagawa <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Jeff Garzik <[email protected]> Cc: Paul Clements <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: David Brownell <[email protected]> Cc: James Bottomley <[email protected]> Cc: Michael Halcrow <[email protected]> Cc: Anton Altaparmakov <[email protected]> Cc: Al Viro <[email protected]> Cc: Carsten Otte <[email protected]> Cc: Patrick McHardy <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-25leds: Add default-on triggerNick Forbes3-0/+53
Add a trigger which allows LEDs to default to the full brightness state. Signed-off-by: Nick Forbes <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-04-24leds: Add new driver for the LEDs on the Freecom FSG-3Rod Whitby3-0/+268
The LEDs on the Freecom FSG-3 are connected to an external memory-mapped latch on the ixp4xx expansion bus, and therefore cannot be supported by any of the existing LEDs drivers. Signed-off-by: Rod Whitby <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-04-24leds: Add support to leds with readable statusHenrique de Moraes Holschuh1-0/+9
Some led hardware allows drivers to query the led state, and this patch adds a hook to let the led class take advantage of that information when available. Without this functionality, when access to the led hardware is not exclusive (i.e. firmware or hardware might change its state behind the kernel's back), reality goes out of sync with the led class' idea of what the led is doing, which is annoying at best. Behaviour for drivers that do not or cannot read the led status is unchanged. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-04-24leds: enable support for blink_set() platform hook in leds-gpioHerbert Valerio Riedel1-0/+15
Enhance leds-gpio to provide hardware-based led flashing by passing through the blink_set() call to a optionally set platform-specific function pointer. Signed-off-by: Herbert Valerio Riedel <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-04-24leds: Cleanup various whitespace and code style issuesNémeth Márton13-118/+126
Break the lines which were more than 80 characters into more lines; replace SPACEs with TABs; correct ident at switch-case; change character encoding from ISO-8859-2 to UTF-8. The order of the functions in led-triggers.c changed in order the similar functions can still be together under titles "Used by LED Class", "LED Trigger Interface" and "Simple LED Tigger Interface" as was grouped before when exported with EXPORT_SYMBOL. Signed-off-by: Márton Németh <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-04-24leds: disable triggers on brightness setNémeth Márton4-7/+38
Disable any active triggers when the brightness attribute is set to zero. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Márton Németh <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-04-24leds: Add mail LED support for "Clevo D400P"Mrton Nmeth2-0/+14
The leds-clevo-mail module also works with model "Clevo D400P", add this model to the white list. Signed-off-by: Mrton Nmeth <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-04-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds1-1/+0
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: iwlwifi: Fix built-in compilation of iwlcore net: Unexport move_addr_to_{kernel,user} rt2x00: Select LEDS_CLASS. iwlwifi: Select LEDS_CLASS. leds: Do not guard NEW_LEDS with HAS_IOMEM [IPSEC]: Fix catch-22 with algorithm IDs above 31 time: Export set_normalized_timespec. tcp: Make use of before macro in tcp_input.c hamradio: Remove unneeded and deprecated cli()/sti() calls in dmascc.c [NETNS]: Remove empty ->init callback. [DCCP]: Convert do_gettimeofday() to getnstimeofday(). [NETNS]: Don't initialize err variable twice. [NETNS]: The ip6_fib_timer can work with garbage on net namespace stop. [IPV4]: Convert do_gettimeofday() to getnstimeofday(). [IPV4]: Make icmp_sk_init() static. [IPV6]: Make struct ip6_prohibit_entry_template static. tcp: Trivial fix to correct function name in a comment in net/ipv4/tcp.c [NET]: Expose netdevice dev_id through sysfs skbuff: fix missing kernel-doc notation [ROSE]: Fix soft lockup wrt. rose_node_list_lock
2008-04-23leds: Do not guard NEW_LEDS with HAS_IOMEMDavid S. Miller1-1/+0
The LEDS infrastructure itself does not require anything that a platform dependant upon HAS_IOMEM. The individual drivers do, but they are properly guarded with the necessary platform dependencies. One can even imagine a hypervisor based LED driver that a platform without HAS_IOMEM might have. Signed-off-by: David S. Miller <[email protected]>
2008-04-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds1-8/+3
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits) SCSI: convert struct class_device to struct device DRM: remove unused dev_class IB: rename "dev" to "srp_dev" in srp_host structure IB: convert struct class_device to struct device memstick: convert struct class_device to struct device driver core: replace remaining __FUNCTION__ occurrences sysfs: refill attribute buffer when reading from offset 0 PM: Remove destroy_suspended_device() Firmware: add iSCSI iBFT Support PM: Remove legacy PM (fix) Kobject: Replace list_for_each() with list_for_each_entry(). SYSFS: Explicitly include required header file slab.h. Driver core: make device_is_registered() work for class devices PM: Convert wakeup flag accessors to inline functions PM: Make wakeup flags available whenever CONFIG_PM is set PM: Fix misuse of wakeup flag accessors in serial core Driver core: Call device_pm_add() after bus_add_device() in device_add() PM: Handle device registrations during suspend/resume block: send disk "change" event for rescan_partitions() sysdev: detect multiple driver registrations ... Fixed trivial conflict in include/linux/memory.h due to semaphore header file change (made irrelevant by the change to mutex).
2008-04-19PM: Remove destroy_suspended_device()Rafael J. Wysocki1-8/+3
After 2.6.24 there was a plan to make the PM core acquire all device semaphores during a suspend/hibernation to protect itself from concurrent operations involving device objects. That proved to be too heavy-handed and we found a better way to achieve the goal, but before it happened, we had introduced the functions device_pm_schedule_removal() and destroy_suspended_device() to allow drivers to "safely" destroy a suspended device and we had adapted some drivers to use them. Now that these functions are no longer necessary, it seems reasonable to remove them and modify their users to use the normal device unregistration instead. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2008-04-19Merge branch 'merge-fixes' into develRussell King11-0/+23
2008-04-19Merge branch 'omap2-upstream' into develRussell King1-10/+10
2008-04-19[ARM] 4974/1: Drop unused leds-tosa.Dmitry Baryshkov3-138/+0
As now tosa uses leds-gpio, drop leds-tosa driver. Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Russell King <[email protected]>
2008-04-19[ARM] Remove leds-tosa.cRussell King1-132/+0
See f99ee0b99214cf5329e711859e3f5fd02c820a24 Signed-off-by: Russell King <[email protected]>
2008-04-15leds: fix platform driver hotplug/coldplugKay Sievers12-0/+25
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable platform LED drivers, to re-enable auto loading. [[email protected]: more drivers, registration fixes] Signed-off-by: Kay Sievers <[email protected]> Signed-off-by: David Brownell <[email protected]> Acked-by: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-03-31leds: Remove incorrect use of preempt_count() from leds-gpioDavid Brownell1-6/+6
It appears that we can't just check to see if we're in a task context ... so instead of trying that, just make the relevant leds always schedule a little worklet. Signed-off-by: David Brownell <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-03-31leds: Fix potential leds-gpio oopsUwe Kleine-König1-4/+4
Call gpio_cansleep only after gpio_request succeeded avoiding an oops. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: David Brownell <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-02-08PWM LED driverDavid Brownell3-0/+165
This is a LED driver using the PWM on newer SOCs from Atmel; brightness is controlled by changing the PWM duty cycle. So for example if you've set up two leds labeled "pwm0" and "pwm1": echo 0 > /sys/class/leds/pwm2/brightness # off (0%) echo 80 > /sys/class/leds/pwm2/brightness echo 255 > /sys/class/leds/pwm2/brightness # on (100%) Note that "brightness" here isn't linear; maybe that should change. Going from 4 to 8 probably doubles perceived brightness, while 244 to 248 is imperceptible. This is mostly intended to be a simple example of PWM, although it's realistic since LCD backlights are often driven with PWM to conserve battery power (and offer brightness options). Signed-off-by: David Brownell <[email protected]> Signed-off-by: Haavard Skinnemoen <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Andrew Victor <[email protected]> Cc: Nicolas Ferre <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-07leds: Add HP Jornada 6xx driverKristoffer Ericson3-0/+128
Add support for the LEDs on the HP Jornada 620/660/680/690 devices. Signed-off-by: Kristoffer Ericson <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-02-07leds: Remove the now uneeded ixp4xx driverRod Whitby3-224/+0
All boards using the IXP4XX-GPIO-LED driver have been updated to use the generic leds-gpio driver instead. Signed-off-by: Rod Whitby <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-02-07leds: Add power LED to the wrap driverMichael Loeffler1-6/+37
The 3rd LED on this board is something like a power-led, it is on all the time. With this change to the leds-wrap driver it is possible to use this LED too. Signed-off-by: Michael Loeffler <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-02-07leds: Fix led-gpio active_low default brightnessRaphael Assenat1-1/+1
When gpio_direction_output() is called, led_dat->active_low is used as default value. This means that the led will always be off by default. cdev.brightness should really have been set to LED_OFF unconditionally to reflect this behavior. Signed-off-by: Raphael Assenat <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-02-07leds: hw acceleration for Clevo mail LED driverMárton Németh2-3/+42
Add support for hardware accelerated LED blinking for the mail LED commonly found on Clevo notebooks. Signed-off-by: Márton Németh <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-02-07leds: Add support for hardware accelerated LED flashingMárton Németh2-5/+42
Extends the leds subsystem with a blink_set() callback function which can be optionally implemented by a LED driver. If implemented, the driver can use the hardware acceleration for blinking a LED. Signed-off-by: Márton Németh <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-02-07leds: Standardise LED naming schemeRichard Purdie8-19/+21
As discussed on LKML some notion of 'function' is needed in LED naming. This patch adds this to the documentation and standardises existing LED drivers. Signed-off-by: Richard Purdie <[email protected]>
2008-02-07leds: Add clevo notebook LED driverMárton Németh3-0/+207
The driver supports the mail LED commonly found on different Clevo notebooks. The driver access the LED through the i8042 hardware which is handled by the input subsystem. Signed-off-by: Márton Németh <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2008-02-05leds: add possibility to remove leds classdevs during suspend/resumeRafael J. Wysocki1-4/+9
Make it possible to unregister a led classdev object in a safe way during a suspend/resume cycle. Signed-off-by: Rafael J. Wysocki <[email protected]> Cc: Michael Buesch <[email protected]> Cc: Pavel Machek <[email protected]> Cc: "John W. Linville" <[email protected]> Cc: Alan Stern <[email protected]> Cc: Len Brown <[email protected]> Cc: Greg KH <[email protected]> Cc: Kay Sievers <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-12-31leds: Fix locomo LED driver oopsRichard Purdie1-1/+1
Fix locomo-leds to use the correct struct device to prevent an oops. Signed-off-by: Richard Purdie <[email protected]>
2007-12-31leds: Fix leds_list_lock locking issuesRichard Purdie4-11/+12
Covert leds_list_lock to a rw_sempahore to match previous LED trigger locking fixes, fixing lock ordering. Signed-off-by: Richard Purdie <[email protected]>
2007-12-07leds: Fix led trigger locking bugsRichard Purdie2-27/+28
Convert part of the led trigger core from rw spinlocks to rw semaphores. We're calling functions which can sleep from invalid contexts otherwise. Fixes bug #9264. Signed-off-by: Richard Purdie <[email protected]>
2007-11-05leds: bugfixes for leds-gpioDavid Brownell1-9/+11
Three bugfixes to the leds-gpio driver, plus minor whitespace tweaks: - Do the INIT_WORK() before registering each LED, so if its trigger becomes immediately active it can schedule work without oopsing.. - Use normal registration, not platform_driver_probe(), so that devices appearing "late" (hotplug type) can still be bound. - Mark the driver remove code as "__devexit", preventing oopses when the underlying device is removed. These issues came up when using this driver with some GPIO expanders living on serial busses, which act unlike "normal" platform devices: they can appear and vanish along with the serial bus driver. Signed-off-by: David Brownell <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2007-10-20fix typo "sort" -> "short"Uwe Kleine-König1-1/+1
Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Adrian Bunk <[email protected]>
2007-10-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds1-1/+1
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits) kbuild: introduce ccflags-y, asflags-y and ldflags-y kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP kbuild: enable use of AFLAGS and CFLAGS on commandline kbuild: enable 'make AFLAGS=...' to add additional options to AS kbuild: fix AFLAGS use in h8300 and m68knommu kbuild: check for wrong use of CFLAGS kbuild: enable 'make CFLAGS=...' to add additional options to CC kbuild: fix up CFLAGS usage kbuild: make modpost detect unterminated device id lists kbuild: call export_report from the Makefile kbuild: move Kai Germaschewski to CREDITS kconfig/menuconfig: distinguish between selected-by-another options and comments kconfig: tristate choices with mixed tristate and boolean values include/linux/Kbuild: remove duplicate entries kbuild: kill backward compatibility checks kbuild: kill EXTRA_ARFLAGS kbuild: fix documentation in makefiles.txt kbuild: call make once for all targets when O=.. is used kbuild: pass -g to assembler under CONFIG_DEBUG_INFO kbuild: update _shipped files for kconfig syntax cleanup ... Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.
2007-10-15[ARM] 4576/1: CM-X270 machine supportMike Rapoport3-0/+129
This patch provides core support for CM-X270 platform. Signed-off-by: Mike Rapoport <[email protected]> Signed-off-by: Russell King <[email protected]>
2007-10-12kconfig: syntax cleanup - drop support for "depends/requires/def_boolean"Adrian Bunk1-1/+1
Remove the following redundant and never or rarely used kconfig syntax: - "def_boolean" (same as "def_bool") - "requires" (same as "depends on") - "depends" (same as "depends on") This patch contains the code changes and Kconfig updates. The shipped files are in next patch to let actual codechange stand out. Signed-off-by: Adrian Bunk <[email protected]> Cc: "Randy.Dunlap" <[email protected]> Cc: Bryan Wu <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: "John W. Linville" <[email protected]> Cc: Roman Zippel <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-10-11leds: Update Cobalt Qube series front LED supportYoichi Yuasa1-18/+77
Update Cobalt Qube series front LED support. Signed-off-by: Yoichi Yuasa <[email protected]> Acked-by: Ralf Baechle <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2007-10-11leds: Add Cobalt Raq series LEDs supportYoichi Yuasa3-0/+146
Add Cobalt Raq series LEDs support. Signed-off-by: Yoichi Yuasa <[email protected]> Acked-by: Ralf Baechle <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2007-10-11leds: Rename leds-cobalt driverYoichi Yuasa3-4/+4
The leds-cobalt driver only supports the Coable Qube series (not included in Cobalt Raq series). Rename the driver and update Kconfig/Makefile. Signed-off-by: Yoichi Yuasa <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2007-07-16leds: Convert from struct class_device to struct deviceRichard Purdie5-63/+58
Convert the LEDs class from struct class_device to struct device since class_device is scheduled for removal. Signed-off-by: Richard Purdie <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]>
2007-07-16leds: Add warning printks in error pathsRichard Purdie1-2/+9
Add warning printks if led_trigger_register_simple() fails. Signed-off-by: Richard Purdie <[email protected]>
2007-07-16leds: Fix trigger unregister_simple if register_simple failsRichard Purdie1-1/+2
Fix led_trigger_unregister_simple to handle the case where led_trigger_register_simple fails, avoiding a NULL pointer dereference. Signed-off-by: Richard Purdie <[email protected]>
2007-07-16leds: Use menuconfig objects II - LEDJan Engelhardt1-9/+5
Change Kconfig objects from "menu, config" into "menuconfig" so that the user can disable the whole feature without having to enter the menu first. Signed-off-by: Jan Engelhardt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2007-07-16leds: Teach leds-gpio to handle timer-unsafe GPIOsDavid Brownell1-1/+26
Teach the new leds-gpio driver that some GPIOs can't be accessed from timer callbacks ... which is how all today's standard triggers use them. Signed-off-by: David Brownell <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2007-07-16leds: Add generic GPIO LED driverRaphael Assenat3-0/+183
This patch adds support for GPIO connected leds via the new GPIO framework. Information about leds (gpio, polarity, name, default trigger) is passed to the driver via platform_data. Signed-off-by: Raphael Assenat <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2007-05-10[S390] Kconfig: menus with depends on HAS_IOMEM.Martin Schwidefsky1-0/+1
Add "depends on HAS_IOMEM" to a number of menus to make them disappear for s390 which does not have I/O memory. Signed-off-by: Martin Schwidefsky <[email protected]>
2007-05-09fix file specification in commentsUwe Kleine-König1-1/+1
Many files include the filename at the beginning, serveral used a wrong one. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Adrian Bunk <[email protected]>
2007-02-15leds: Add support for Cobalt Server front LEDFlorian Fainelli3-0/+50
Add support for Cobalt Server front LED (MIPS) Signed-off-by: Florian Fainell <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
2007-02-15leds: Add IPAQ h1940 LEDs supportArnaud Patard3-0/+170
This patch adds the support for the IPAQ h1940 leds. In order to create the amber led (used for the battery charging), the red and green leds are set to the same default trigger. Due to hardware limitations, the blue led can only be set in blinking mode. Signed-off-by: Arnaud Patard <[email protected]> Signed-off-by: Richard Purdie <[email protected]>