Commit Graph

76 Commits

Author SHA1 Message Date
Daniel Mack 9360340262 leds: ALIX2: Add dependency to !GPIO_CS5335
The ALIX2 LED driver and the CS5535 GPIO drivers share the same I/O
range which causes a conflict if they're both enabled. Fix this for now
by adding Kconfig dependencies. While at it, also drop the EXPERIMENTAL
flag, as the code has been around for awhile already.

Note that this is a hack. At some point, a real platform support for
this board should be added which handles the LEDs via the leds-gpio
driver.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-16 19:49:20 +00:00
Haojian Zhuang 0a2f915b40 led: Enable led in 88pm860x
Enable led sub device in Marvell 88PM860x. Two LED arrays can be supported.
Each LED array can be used for R,G,B leds.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07 22:17:05 +01:00
Antonio Ospite d4cc6a2eee leds: Add LED class driver for regulator driven LEDs.
This driver provides an interface for controlling LEDs (or vibrators)
connected to PMICs for which there is a regulator framework driver.

This driver can be used, for instance, to control vibrator on all Motorola EZX
phones using the pcap-regulator driver services.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-17 11:27:09 +00:00
Michael Hennerich ed4a10b47f leds: Add driver for ADP5520/ADP5501 MFD PMICs
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-16 11:30:10 +00:00
Daniel Mack a8dd18feb6 leds: Add driver for LT3593 controlled LEDs
The LT3593 is a step-up DC/DC converter designed to drive up to ten
white LEDs in series. The current flow can be set with a control pin.

This driver controls any number of such devices connected on generic
GPIOs and exports the function as as platform_driver.

The gpio_led platform data struct definition is reused for this purpose.

Successfully tested on a PXA embedded board.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-16 11:30:09 +00:00
Dave Hansen a328e95b82 leds: LED driver for Intel NAS SS4200 series (v5)
This code is based on a driver that came in the "Open-source
and GPL components" download here:

http://downloadcenter.intel.com/SearchResult.aspx?lang=eng&ProductFamily=Server+Products&ProductLine=Intel%C2%AE+Storage+Systems&ProductProduct=Intel%C2%AE+Entry+Storage+System+SS4200-E&OSVersion=OS+Independent

It was in a file called nasgpio.c inside of a second zip file
called SS4200-E_Linux_SIO_Driver-v1.4.zip and is based on this
updated to use the LED subsystem with the ioctl and hardware
monitor support removed.

I don't have any need for brightness
control, and its code is *completely* separate from the on/off
controls implemented here.  If anyone else wants it, I'd be
happy to look into adding it, but I don't care enough for now.

Except for the probe routines, I rewrote most of it.  I also
Note that I don't have any hardware documentation except for
the original driver.

Thanks go to Arjan for his help in getting the original source
for this released and for chasing down some licensing issues.

Signed-off-by: Dave Hansen <dave@sr71.net>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-16 11:30:09 +00:00
Antonio Ospite 7f1be819cc leds: Fix indentation in LEDS_LP3944 Kconfig entry
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-09-07 14:38:04 +01:00
Mark Brown c746b5519a leds: Add WM831x status LED driver
The WM831x devices feature two software controlled status LEDs with
hardware assisted blinking.

The device can also autonomously control the LEDs based on a selection
of sources.  This can be configured at boot time using either platform
data or the chip OTP.  A sysfs file in the style of that for triggers
allowing the control source to be configured at run time.  Triggers
can't be used here since they can't depend on the implementation details
of a specific LED type.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-09-07 14:33:33 +01:00
Antonio Ospite 5054d39e32 leds: LED driver for National Semiconductor LP3944 Funlight Chip
LEDs driver for National Semiconductor LP3944 Funlight Chip
http://www.national.com/pf/LP/LP3944.html

This helper chip can drive up to 8 leds, with two programmable DIM
modes; it could even be used as a gpio expander but this driver assumes
it is used as a led controller.

The DIM modes are used to set _blink_ patterns for leds, the pattern is
specified supplying two parameters:
  - period: from 0s to 1.6s
  - duty cycle: percentage of the period the led is on, from 0 to 100

LP3944 can be found on Motorola A910 smartphone, where it drives the rgb
leds, the camera flash light and the displays backlights.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:21:38 +01:00
Richard Purdie 34abdf2526 leds: Remove an orphan Kconfig entry
Remove an orphan Kconfig entry (LEDS_LP5521)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:20:36 +01:00
Tobias Mueller 2216c6e83c leds: alix-leds2 fixed for Award BIOS
Add initialisation of GPIO ports for compatibility with boards with Award
BIOS (e.g.  ALIX.3D3).

Signed-off-by: Tobias Mueller <Tobias_Mueller@twam.info>
Reviewed-by: Constantin Baranov <const@mimas.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:20:34 +01:00
Felipe Balbi 67a32ec750 leds: introduce lp5521 led driver
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>
2009-04-06 16:06:27 +01:00
Kim Kyuwon 0b56129be7 leds: add BD2802GU LED driver
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>
2009-04-06 16:06:26 +01:00
Németh Márton 95dc5768c9 leds: remove experimental flag from leds-clevo-mail
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>
2009-04-06 16:06:26 +01:00
Felipe Balbi 17354bfe85 leds: Add gpio-led trigger
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>
2009-04-06 16:06:26 +01:00
Phil Sutter ac67e23bed leds: Add rb532 LED driver for the User LED
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>
2009-04-06 16:06:26 +01:00
Luotao Fu 41c42ff5db leds: simple driver for pwm driven LEDs
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>
2009-04-06 16:06:26 +01:00
Guennadi Liakhovetski ac2dd0f110 leds: Add dac124s085 driver
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>
2009-04-06 16:06:25 +01:00
Trent Piepho a7d878af94 leds: Add openfirmware platform device support
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>
2009-04-06 16:06:25 +01:00
Matt LaPlante 692105b8ac trivial: fix typos/grammar errors in Kconfig texts
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30 15:22:01 +02:00
Adam Nielsen 268cb38e18 netfilter: x_tables: add LED trigger target
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>
2009-02-20 10:55:14 +01:00
Eric Piel 9e0c797821 lis3lv02d: merge with leds hp disk
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>
2009-01-15 16:39:40 -08:00
Mark Brown 0081e8020e leds: Add WM8350 LED driver
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>
2009-01-08 12:38:58 +00:00
Yoichi Yuasa ec1496193d leds: fix Cobalt Raq LED dependency
Cobalt Raq LEDs require LEDS_CLASS=y.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-01-08 12:38:57 +00:00
Constantin Baranov ec9a943ce9 leds: ALIX.2 LEDs driver
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>
2009-01-08 12:38:57 +00:00
Linus Torvalds ea541686d8 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds/acpi: Fix merge fallout from acpi_driver_data change
  leds: Simplify logic in leds-ams-delta
  leds: Fix trigger registration race
  leds: Fix leds-class.c comment
  leds: Add driver for HP harddisk protection LEDs
  leds: leds-pca955x - Mark pca955x_led_set() static
  leds: Remove uneeded leds-cm-x270 driver
  leds: Remove uneeded strlen calls
  leds: Add leds-wrap default-trigger
  leds: Make default trigger fields const
  leds: Add backlight LED trigger
  leds: da903x: Add support for LEDs found on DA9030/DA9034
2008-10-23 16:07:32 -07:00
Pavel Machek 9c78ff6e65 leds: Add driver for HP harddisk protection LEDs
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>
2008-10-20 23:02:43 +01:00
Richard Purdie 85b064b664 leds: Remove uneeded leds-cm-x270 driver
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>
2008-10-20 22:55:00 +01:00
Rodolfo Giometti 132e9306be leds: Add backlight LED trigger
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>
2008-10-20 22:34:12 +01:00
Mike Rapoport 9e84561c8c leds: da903x: Add support for LEDs found on DA9030/DA9034
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>
2008-10-20 22:34:11 +01:00
Bartlomiej Zolnierkiewicz 806f80a6fc ide: add generic ATA/ATAPI disk driver
* Add struct ide_disk_ops containing protocol specific methods.

* Add 'struct ide_disk_ops *' to ide_drive_t.

* Convert ide-{disk,floppy} drivers to use struct ide_disk_ops.

* Merge ide-{disk,floppy} drivers into generic ide-gd driver.

While at it:
- ide_disk_init_capacity() -> ide_disk_get_capacity()

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-17 18:09:14 +02:00
David S. Miller 56c5d900db Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	sound/core/memalloc.c
2008-10-11 12:39:35 -07:00
Eric Miao 4fe3224fff [ARM] pxa/spitz: use leds-gpio for led driving and drop leds-spitz
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>
2008-09-23 22:04:40 +01:00
Eric Miao 60cf711d47 [ARM] pxa/corgi: use leds-gpio for led driving and drop leds-corgi
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>
2008-09-23 22:04:39 +01:00
David S. Miller 5843492ccc leds: Add driver for Sunfire UltraSPARC server LEDs.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 20:26:48 -07:00
Nate Case f46e9203d9 leds: Add support for Philips PCA955x I2C LED drivers
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>
2008-07-23 09:49:56 +01:00
Riku Voipio e14fa82439 leds: Add pca9532 led driver
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>
2008-07-23 09:49:56 +01:00
Nick Forbes 060856c799 leds: Add default-on trigger
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>
2008-04-25 00:06:52 +01:00
Rod Whitby 3b2e46f8c4 leds: Add new driver for the LEDs on the Freecom FSG-3
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>
2008-04-24 23:43:09 +01:00
Mrton Nmeth b3ba31f84e leds: Add mail LED support for "Clevo D400P"
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>
2008-04-24 23:34:18 +01:00
Linus Torvalds b0d19a378a Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* 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-23 12:23:45 -07:00
David S. Miller 00713e224e leds: Do not guard NEW_LEDS with HAS_IOMEM
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>
2008-04-23 03:33:32 -07:00
Dmitry Baryshkov 507012f0a5 [ARM] 4974/1: Drop unused leds-tosa.
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>
2008-04-19 11:29:09 +01:00
David Brownell de5c9edee7 PWM LED driver
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>
2008-02-08 09:22:38 -08:00
Kristoffer Ericson d39a7a63eb leds: Add HP Jornada 6xx driver
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>
2008-02-07 10:10:28 +00:00
Rod Whitby 8fe217e7b6 leds: Remove the now uneeded ixp4xx driver
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>
2008-02-07 10:02:39 +00:00
Márton Németh 92e015cb31 leds: hw acceleration for Clevo mail LED driver
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>
2008-02-07 09:52:02 +00:00
Márton Németh 4c79141d28 leds: Add support for hardware accelerated LED flashing
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>
2008-02-07 09:49:38 +00:00
Márton Németh cec035de82 leds: Add clevo notebook LED driver
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>
2008-02-07 09:22:17 +00:00
Linus Torvalds 821f3eff7c Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* 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-16 11:23:06 -07:00