26 Jan, 2011
1 commit
-
Return PTR_ERR(led_dat->pwm) instead of 0 if pwm_request failed
Signed-off-by: Axel Lin
Cc: Richard Purdie
Cc: Luotao Fu
Cc: Reviewed-by: Dmitry Torokhov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
21 Jan, 2011
1 commit
-
Replicate changes made to drivers/leds/ledtrig-backlight.c.
Cc: Paul Mundt
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Jan, 2011
7 commits
-
Extend the LED backlight tirgger driver with an option that allows for
inverting the trigger output polarity.With the invertion option provided, I (ab)use the backlight trigger for
driving a LED that indicates LCD display blank condtition on my Amstrad
Delta videophone. Since the machine has no dedicated power LED, it was
not possible to distinguish if the display was blanked, or the machine was
turned off, without touching it.The invert sysfs control is patterned after a similiar function of the GPIO
trigger driver.[akpm@linux-foundation.org: make output match input, tighten input checking]
[akpm@linux-foundation.org: make output match input, tighten input checking]
Signed-off-by: Janusz Krzysztofik
Cc: Paul Mundt
Acked-by: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Currently the led device name is fetched from the device_type in
I2C_BOARD_INFO which comes from the platform data. This name is in turn
used to create an entry in sysfs.If there exists two or more lp5521 on a particular platform, the
device_type in I2C_BOARD_INFO has to be the same, else lp5521 driver probe
wont be called and if used so, results in run time warning "cannot create
sysfs with same name" and hence a failure.The name that is used to create sysfs entry is to be passed by the struct
led_platform_data. Hence adding an element of type const char * and
change in lp5521 driver to use this name in creating the led device if
present else use the name obtained by I2C_BOARD_INFO.Signed-off-by: Arun Murthy
Acked-by: Samu Onkalo
Cc: Ilkka Koskinen
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Driver contained possibility for circular locking.
One lock is held by sysfs-core and another one by the driver itself. This
happened when the driver created or removed sysfs entries dynamically.
There is no real need to do those operations. Now all the sysfs entries
are created at probe and removed at removal. Engine load sysfs entries
are now visible all the time. However, access to the entries fails if the
engine is disabled or running.Signed-off-by: Samu Onkalo
Cc: Arun Murthy
Reviewed-by: Ilkka Koskinen
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Driver contained possibility for circular locking.
One lock is held by sysfs-core and another one by the driver itself. This
happened when the driver created or removed sysfs entries dynamically.
There is no real need to do those operations. Now all the sysfs entries
are created at probe and removed at removal. Engine load and mux
configuration sysfs entries are now visible all the time. However, access
to the entries fails if the engine is disabled or running.Signed-off-by: Samu Onkalo
Cc: Arun Murthy
Reviewed-by: Ilkka Koskinen
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Currently all leds channels begins with string lp5523. Patch adds a
possibility to provide name via platform data. This makes it possible to
have several chips without overlapping sysfs names.Signed-off-by: Samu Onkalo
Cc: Arun Murthy
Cc: Ilkka Koskinen
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
- Remove unneeded input_free_device() after input_unregister_device().
- Add pca9532_destroy_devices() function for destroy devices.
Signed-off-by: Axel Lin
Acked-by: Dmitry Torokhov
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The code doesn't check first sscanf() return value. If first sscanf()
failed then c contains some garbage. It might lead to reading
uninitialised stack data in the second sscanf() call.Signed-off-by: Vasiliy Kulikov
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Jan, 2011
1 commit
-
* 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (33 commits)
usb: don't use flush_scheduled_work()
speedtch: don't abuse struct delayed_work
media/video: don't use flush_scheduled_work()
media/video: explicitly flush request_module work
ioc4: use static work_struct for ioc4_load_modules()
init: don't call flush_scheduled_work() from do_initcalls()
s390: don't use flush_scheduled_work()
rtc: don't use flush_scheduled_work()
mmc: update workqueue usages
mfd: update workqueue usages
dvb: don't use flush_scheduled_work()
leds-wm8350: don't use flush_scheduled_work()
mISDN: don't use flush_scheduled_work()
macintosh/ams: don't use flush_scheduled_work()
vmwgfx: don't use flush_scheduled_work()
tpm: don't use flush_scheduled_work()
sonypi: don't use flush_scheduled_work()
hvsi: don't use flush_scheduled_work()
xen: don't use flush_scheduled_work()
gdrom: don't use flush_scheduled_work()
...Fixed up trivial conflict in drivers/media/video/bt8xx/bttv-input.c
as per Tejun.
24 Dec, 2010
1 commit
-
flush_scheduled_work() is deprecated and scheduled to be removed.
Directly flush led->work on removal instead.Signed-off-by: Tejun Heo
Cc: Richard Purdie
23 Dec, 2010
1 commit
-
When I added led_blink_set I had a typo: the return value of the hw
offload is a regular error code that is zero when succesful, and in that
case software emulation should not be used, rather than the other way
around.Signed-off-by: Johannes Berg
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Dec, 2010
1 commit
-
It's not useful to build LED triggers when there's no LEDs that can be
triggered by them. Therefore, fix up the dependencies so that this
cannot happen, and fix a few users that select triggers to depend on
LEDS_CLASS as well (there is also one user that also selects LEDS_CLASS,
which is OK).Signed-off-by: Johannes Berg
Reported-by: Randy Dunlap
Acked-by: Randy Dunlap
Tested-by: Ingo Molnar
Cc: Arnd Hannemann
Cc: Michal Hocko
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Nov, 2010
7 commits
-
Chip detection may fail if the chip is in some odd state for example after
system restart. Chip doesn't have HW reset line.Signed-off-by: Samu Onkalo
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Chip detection may fail if the chip is in some odd state for example after
system restart. Chip doesn't have HW reset line.Signed-off-by: Samu Onkalo
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Delays were little bit too long. Adjust delay times and add some comments
to them.Signed-off-by: Samu Onkalo
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Delays were little bit too long. Adjust delay times and add some comments
to them.Signed-off-by: Samu Onkalo
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A small macro changed to inline function to have proper type checking.
Inline added to two similar small functions.Signed-off-by: Samu Onkalo
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Some small macros changed to inline functions to have proper type
checking.Signed-off-by: Samu Onkalo
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
While running randconfg with ktest.pl I stumbled upon this bug:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000003
IP: [] strstr+0x39/0x86
PGD 0
Oops: 0000 [#1] SMP
last sysfs file:
CPU 0
Modules linked in:Pid: 1, comm: swapper Not tainted 2.6.37-rc1-test+ #6 DG965MQ/
RIP: 0010:[] [] strstr+0x39/0x86
RSP: 0018:ffff8800797cbd80 EFLAGS: 00010213
RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffffffffffffff
RDX: 0000000000000000 RSI: ffffffff82eb7ac9 RDI: 0000000000000003
RBP: ffff8800797cbda0 R08: ffff880000000003 R09: 0000000000030725
R10: ffff88007d294c00 R11: 0000000000014c00 R12: 0000000000000020
R13: ffffffff82eb7ac9 R14: ffffffffffffffff R15: ffffffff82eb7b08
FS: 0000000000000000(0000) GS:ffff88007d200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000003 CR3: 0000000002a1d000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 1, threadinfo ffff8800797ca000, task ffff8800797d0000)
Stack:
00000000000000ba ffffffff82eb7ac9 ffffffff82eb7ab8 00000000000000ba
ffff8800797cbdf0 ffffffff81e2050f ffff8800797cbdc0 00000000815f913b
ffff8800797cbe00 ffffffff82eb7ab8 0000000000000000 0000000000000000
Call Trace:
[] dmi_matches+0x117/0x154
[] dmi_check_system+0x3d/0x8d
[] ? nas_gpio_init+0x0/0x2c8
[] nas_gpio_init+0x24/0x2c8
[] ? wm8350_led_init+0x0/0x20
[] ? nas_gpio_init+0x0/0x2c8
[] do_one_initcall+0xab/0x1b2
[] kernel_init+0x248/0x331
[] kernel_thread_helper+0x4/0x10
[] ? kernel_init+0x0/0x331Found that the nas_led_whitelist dmi_system_id structure array had no
NULL end delimiter, causing the dmi_check_system() loop to read an
undefined entry.Signed-off-by: Steven Rostedt
Acked-by: Dave Hansen
Acked-by: Richard Purdie
Acked-by: Arjan van de Ven
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Nov, 2010
5 commits
-
In the event that none of the configs are set (CONFIG_LEDS_GPIO_PLATFORM,
CONFIG_LEDS_GPIO_OF, CONFIG_LEDS_GPIO_PLATFORM), we will return a bogus
value when initializing the module.Signed-off-by: Davidlohr Bueso
Acked-by: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Provide configuration and compilation support for LP5521 and LP5523
Signed-off-by: Samu Onkalo
Cc: Richard Purdie
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
LP5523 chip is nine channel led driver with programmable engines. Driver
provides support for that chip for direct access via led class or via
programmable engines.Signed-off-by: Samu Onkalo
Cc: Richard Purdie
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patchset provides support for LP5521 and LP5523 LED driver chips from
National Semicondutor. Both drivers supports programmable engines and
naturally LED class features.Documentation is provided as a part of the patchset. I created "leds"
subdirectory under Documentation. Perhaps the rest of the leds*
documentation should be moved there.Datasheets are freely available at National Semiconductor www pages.
This patch:
LP5521 chip is three channel led driver with programmable engines. Driver
provides support for that chip for direct access via led class or via
programmable engines.Signed-off-by: Samu Onkalo
Cc: Richard Purdie
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Currently, blinking LEDs can be awkward because it is not guaranteed that
all LEDs implement blinking. The trigger that wants it to blink then
needs to implement its own timer solution.Rather than require that, add led_blink_set() API that triggers can use.
This function will attempt to use hw blinking, but if that fails
implements a timer for it. To stop blinking again, brightness_set() also
needs to be wrapped into API that will stop the software blink.As a result of this, the timer trigger becomes a very trivial one, and
hopefully we can finally see triggers using blinking as well because it's
always easy to use.Signed-off-by: Johannes Berg
Acked-by: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
06 Nov, 2010
1 commit
-
Add MODULE_LICENSE() that matches file comments so that kernel
is not tainted.leds_net5501: module license 'unspecified' taints kernel.
Signed-off-by: Randy Dunlap
Acked-by: Richard Purdie
Signed-off-by: Linus Torvalds
29 Oct, 2010
1 commit
-
88pm860x supports auto-blink LED in hardware. It messed with
timer trigger. Now disable the auto-blink function.Signed-off-by: Haojian Zhuang
Cc: Richard Purdie
Signed-off-by: Samuel Ortiz
08 Oct, 2010
2 commits
-
This patch add a LED class driver for LEDs found on the LaCie 2Big and
5Big Network v2 boards. The LEDs are wired to a CPLD and are controlled
through a GPIO extension bus.Signed-off-by: Simon Guinot
Signed-off-by: Nicolas Pitre -
dev_set_drvdata() can't be used to set the driver private data pointer.
This would overwrite the led classdev object previously registered by
led_classdev_register().Note that despite this mistake, the driver work fine because led_dat and
led_dat->cdev are at the same memory address.Signed-off-by: Simon Guinot
Signed-off-by: Nicolas Pitre
20 Sep, 2010
2 commits
-
Signed-off-by: Simon Guinot
Signed-off-by: Nicolas Pitre -
This patch replace all the lock functions with the irq safe variant.
The ns2_led_{set,get}_mode() functions must be safe in all context.For example, the trigger timer call led_set_brightness() in a softirq
context.Signed-off-by: Simon Guinot
Signed-off-by: Nicolas Pitre
13 Aug, 2010
1 commit
-
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
mmc_spi: Fix unterminated of_match_table
of/sparc: fix build regression from of_device changes
of/device: Replace struct of_device with struct platform_device
06 Aug, 2010
2 commits
-
of_device is just an alias for platform_device, so remove it entirely. Also
replace to_of_device() with to_platform_device() and update comment blocks.This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.@@
@@
-struct of_device
+struct platform_deviceSigned-off-by: Grant Likely
Reviewed-by: David S. Miller -
Signed-off-by: Guenter Roeck
Acked-by: Tejun Heo
Signed-off-by: Greg Kroah-Hartman
17 Jul, 2010
1 commit
-
This patch add a LED class driver for the dual-GPIO LEDs found on the
Network Space v2 board (and parents). This include Internet Space v2,
Network Space (Max) v2 and d2 Network v2 boards.This dual-GPIO LED is wired to a CPLD and can blink in relation with the
SATA activity. The driver expose this capability through a "sata" sysfs
attribute.Signed-off-by: Simon Guinot
Signed-off-by: Nicolas Pitre
03 Jun, 2010
1 commit
-
I2C drivers can use the clientdata-pointer to point to private data. As I2C
devices are not really unregistered, but merely detached from their driver, it
used to be the drivers obligation to clear this pointer during remove() or a
failed probe(). As a couple of drivers forgot to do this, it was agreed that it
was cleaner if the i2c-core does this clearance when appropriate, as there is
no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
This feature was added to the core with commit
e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers.As there is no need anymore to clear the clientdata-pointer, remove all current
occurrences in the drivers to simplify the code and prevent confusion.Signed-off-by: Wolfram Sang
Acked-by: Mark Brown
Acked-by: Greg Kroah-Hartman
Acked-by: Richard Purdie
Acked-by: Dmitry Torokhov
Signed-off-by: Jean Delvare
28 May, 2010
2 commits
-
Fix a compile issue when openfirmware is enabled from commit
2146325df2c2640059a9e064890c30c6e259b458.Signed-off-by: Richard Purdie
-
Soekris net5501 is x86 only and cleanup some undeeded dependencies
Signed-off-by: Richard Purdie
26 May, 2010
2 commits
-
This add basic led support for Freescale MC13783 PMIC.
Signed-off-by: Philippe Rétornaz
Signed-off-by: Richard Purdie -
In current implementation, if device_create_file failed in register_nasgpio_led,
led_classdev_unregister will be executed twice.
( in register_nasgpio_led it calls led_classdev_unregister before return and in nas_gpio_init out_err )This patch fixes it by only unregistering those that were successfully registered in out_err.
( not including last failed register_nasgpio_led call )Signed-off-by: Axel Lin
Acked-by: Dave Hansen
Signed-off-by: Richard Purdie