LP5521 is a three channel led driver with support
for hardware accelerated patterns (currently used
via lp5521-only sysfs interface).
Currently, it's used on n810 device.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
ROHM BD2802GU is a RGB LED controller attached to i2c bus and specifically
engineered for decoration purposes. This RGB controller incorporates
lighting patterns and illuminates.
This driver is designed to minimize power consumption, so when there is no
emitting LED, it enters to reset state. And because the BD2802GU has lots
of features that can't be covered by the current LED framework, it
provides Advanced Configuration Function(ADF) mode, so that user
applications can set registers of BD2802GU directly.
Here are basic usage examples :
; to turn on LED (not blink)
$ echo 1 > /sys/class/leds/led1_R/brightness
; to blink LED
$ echo timer > /sys/class/leds/led1_R/trigger
$ echo 1 > /sys/class/leds/led1_R/delay_on
$ echo 1 > /sys/class/leds/led1_R/delay_off
; to turn off LED
$ echo 0 > /sys/class/leds/led1_R/brightness
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Kim Kyuwon <chammoru@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
The leds-clevo-mail driver is in the mainline kernel since 2.6.25 and works
without severe problems. Make this driver available for a larger audience.
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
The gpio led trigger will allow leds to be triggered by
gpio events.
When we give the led a gpio number, the trigger will
request_irq() on that so we don't have to keep polling
for gpio state.
It's useful for usecases as n810's keypad leds that could
be triggered by the gpio event generated when user slides
up to show the keypad.
We also provide means for userland to tell us what is the
desired brightness for that special led when it goes on
so userland could use information from ambient light sensors
and not set led brightness too high if it's not necessary.
Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Mikrotik built six LEDs into the Routerboard 532, from which one is
destined for custom use, the so called "User LED". This patch adds a
driver for it, based on the LEDs class.
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Add a simple driver for pwm driver LEDs. pwm_id and period can be defined
in board file. It is developed for pxa, however it is probably generic
enough to be used on other platforms with pwm.
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Add an LED driver using the DAC124S085 DAC from NatSemi
[randy.dunlap@oracle.com: use header files for interfaces]
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Add bindings to support LEDs defined as of_platform devices in addition to
the existing bindings for platform devices.
New options in Kconfig allow the platform binding code and/or the
of_platform code to be turned on. The of_platform code is of course only
available on archs that have OF support.
The existing probe and remove methods are refactored to use new functions
create_gpio_led(), to create and register one led, and delete_gpio_led(),
to unregister and free one led. The new probe and remove methods for the
of_platform driver can then share most of the common probe and remove code
with the platform driver.
The suspend and resume methods aren't shared, but they are very short. The
actual led driving code is the same for LEDs created by either binding.
The OF bindings are based on patch by Anton Vorontsov
<avorontsov@ru.mvista.com>. They have been extended to allow multiple LEDs
per device.
Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Kernel module providing implementation of LED netfilter target. Each
instance of the target appears as a led-trigger device, which can be
associated with one or more LEDs in /sys/class/leds/
Signed-off-by: Adam Nielsen <a.nielsen@shikadi.net>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Move the second part of the HP laptop disk protection functionality (a red
led) to the same driver. From a purely Linux developer's point of view,
the led and the accelerometer have nothing related. However, they
correspond to the same ACPI functionality, and so will always be used
together, moreover as they share the same ACPI PNP alias, there is no
other simple to allow to have same loaded at the same time if they are not
in the same module. Also make it requires the led class to compile and
update the Kconfig text.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The voltage and current regulators on the WM8350 AudioPlus PMIC can be
used in concert to provide a power efficient LED driver. This driver
implements support for this within the standard LED class.
Platform initialisation code should configure the LED hardware in the
init callback provided by the WM8350 core driver. The callback should
use wm8350_isink_set_flash(), wm8350_dcdc25_set_mode() and
wm8350_dcdc_set_slot() to configure the operating parameters of the
regulators for their hardware and then then use wm8350_register_led() to
instantiate the LED driver.
This driver was originally written by Liam Girdwood, though it has been
extensively modified since then.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Driver for PC Engines ALIX.2 and ALIX.3 LEDs.
Signed-off-by: Constantin Baranov <const@mimas.ru>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
HP notebooks contain accelerometer-based disk protection subsystem,
and LED that indicates hard disk is protected. This is driver for the
LED part.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
The cm-x270 board uses leds-gpio so remove the now unneeded driver.
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This allows LEDs to be controlled as a backlight device where
they turn off and on when the display is blanked and unblanked.
This is useful where you need various key backlight LEDs to
dim at the same time as the backlight.
Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Now as the scoop pins are covered by the generic gpio API,
we can use leds-gpio driver instead of special leds-spitz
Drop leds-spitz.c and the declarations of now un-referenced
spitzscoop_device, spitzscoop2_device.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Now as the scoop pins are covered by the generic gpio API,
we can use leds-gpio driver instead of special leds-corgi
Drop leds-corgi.c and remove the declaration of now un-referenced
corgiscoop_device.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This driver supports the PCA9550, PCA9551, PCA9552, and PCA9553
LED driver chips.
Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
NXP pca9532 is a LED dimmer/controller attached to i2c bus. It allows
attaching upto 16 leds which can either be on, off or dimmed and/or blinked
with the two PWM modulators available.
This driver is a "new-style" i2c driver that adheres to the driver model and
implements the led framework api. Since the leds connected to the driver are
platform specific, it is only useful when platform data is passed to the
driver to define what leds are connected to which pins.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Add a trigger which allows LEDs to default to the full
brightness state.
Signed-off-by: Nick Forbes <Nick.Forbes@huntsworth.com>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
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 <rod@whitby.id.au>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
The leds-clevo-mail module also works with model "Clevo D400P",
add this model to the white list.
Signed-off-by: Mrton Nmeth <nm127@freemail.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
* 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
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 <davem@davemloft.net>
As now tosa uses leds-gpio, drop leds-tosa driver.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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 <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add support for the LEDs on the HP Jornada 620/660/680/690 devices.
Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
All boards using the IXP4XX-GPIO-LED driver have been updated to use
the generic leds-gpio driver instead.
Signed-off-by: Rod Whitby <rod@whitby.id.au>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Add support for hardware accelerated LED blinking for the mail LED
commonly found on Clevo notebooks.
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
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 <nm127@freemail.hu>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
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 <nm127@freemail.hu>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
* 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.
This patch provides core support for CM-X270 platform.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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 <bunk@kernel.org>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
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 <yoichi_yuasa@tripeaks.co.jp>
Acked-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
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 <jengelh@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
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 <raph@8d.com>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
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 <schwidefsky@de.ibm.com>
Add support for Cobalt Server front LED (MIPS)
Signed-off-by: Florian Fainell <florian.fainelli@int-evry.fr>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
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 <arnaud.patard@rtp-net.org>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Standardize the miniscule percentage of occurrences of "depends" in
Kconfig files to "depends on", and update kconfig-language.txt to
reflect that.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
A driver for the PCEngines WRAP boards (http://www.pcengines.ch), which are
very similar to the Soekris net4801 (same NS SC1100 geode reference
design).
The LEDs on the WRAP are on different GPIO lines and I have modified and
copied the net48xx error led support for this. It also includes support
for an "extra" led (in addition to error). The three LEDs on the WRAP are
at GPIO lines 2,3,18 (WRAP LEDs from left to right). This driver gives
access to the second and third LEDs by twiddling GPIO lines 3 & 18.
Because these boards are so similar to the net48xx, I basically sed-ed that
driver to form the basis for leds-wrap.c. The only changes from
leds-net48xx.c are:
- #define WRAP_EXTRA_LED_GPIO
- name changes
- duplicate relevant sections to provide support for the "extra" led
- reverse the various *_led_set values. The WRAP is "backwards" from the
net48xx, and these needed to be updated for that.
[akpm@osdl.org: build fix]
Signed-off-by: Kristian Kielhofner <kris@krisk.org>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>