13 Sep, 2012
2 commits
-
The last attribute should be terminated as NULL because any member of
attribute structure is accessed while adding the sysfs file.
If not, invalid address may cause the page fault problem.Signed-off-by: Milo(Woogyom) Kim
Signed-off-by: Bryan Wu -
The LP5523 has 3 engines which are used for running LED patterns.
These engines should be off while unloading the driver.
Obviously, LP5523 platform data are used for releasing the resource
such like enable()/release_resource(), but these are not mandatory.
Therefore this patch is required without the platform data dependency.Signed-off-by: Milo(Woogyom) Kim
Signed-off-by: Bryan Wu
11 Sep, 2012
6 commits
-
LP5523 driver supports both LP5523 and LP55231. The i2c device id
is one of the two - lp5523 or lp55231. So it's better to use
matching i2c device id while enumerating the device and naming LED
channels.Signed-off-by: Milo(Woogyom) Kim
Signed-off-by: Bryan Wu -
To support LP55231 device, the device id is added. Additionally,
the i2c driver name is changed from lp5523 to lp5523x.Signed-off-by: Milo(Woogyom) Kim
Signed-off-by: Bryan Wu -
(a) use LP5523_ENABLE rather than magic number 0x40
(b) use min_t() in lp5523_mux_parse()
(c) skip while loop and just return if invalid commandSigned-off-by: Milo(Woogyom) Kim
Signed-off-by: Bryan Wu -
The return value of this function is not handled any place, so
make it as void type.And three if-statements are replaced with switch-statements.
Signed-off-by: Milo(Woogyom) Kim
Signed-off-by: Bryan Wu -
Turning off the brightness of each channel is required
when removing the driver.So use flush_work() rather than cancel_work_sync() to execute
remaining brightness works.Signed-off-by: Milo(Woogyom) Kim
Signed-off-by: Bryan Wu -
The name of each led channel is configurable.
If the name is NULL, just use the channel id for making the channel nameSigned-off-by: Milo(Woogyom) Kim
Signed-off-by: Bryan Wu
24 Jul, 2012
2 commits
-
Cc: Mathias Nyman
Signed-off-by: Bryan Wu -
Inside the error handling in lp5523_init_led(), there is a place that
calls to led_classdev_unregister(). When we unregister the LED drivers,
it tries to set the brightness to OFF. In this driver setting the
brightness is done through a work queue and the work queue hasn't been
initialized yet.The result is that we trigger a WARN_ON() in the __queue_work().
The fix is to move the INIT_WORK() in front of the call to
lp5523_init_led().Matt Renzelmann found this using a bug finding tool.
Reported-by: Matt Renzelmann
Signed-off-by: Dan Carpenter
Signed-off-by: Bryan Wu
24 Mar, 2012
1 commit
-
Saves ~50 bytes text and speeds things up.
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Jan, 2012
2 commits
-
Signed-off-by: Axel Lin
Cc: Samu Onkalo
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Factor out some boilerplate code for i2c driver registration
into module_i2c_driver.Signed-off-by: Axel Lin
Cc: Haojian Zhuang
Cc: Mark Brown
Cc: Richard Purdie
Cc: Michael Hennerich
Cc: Mike Rapoport
Cc: Guennadi Liakhovetski
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Jun, 2011
1 commit
-
Fix this section mismatch:
WARNING: drivers/leds/leds-lp5523.o(.text+0x12f4): Section mismatch in reference from the function lp5523_probe() to the function .init.text:lp5523_init_led()
The function lp5523_probe() references
the function __init lp5523_init_led().
This is often because lp5523_probe lacks a __init
annotation or the annotation of lp5523_init_led is wrong.Fixing this one triggers one more mismatch, fix that one as well.
Signed-off-by: Ralf Baechle
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Mar, 2011
1 commit
-
Don't allow everybody to change LED settings.
Signed-off-by: Vasiliy Kulikov
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Jan, 2011
2 commits
-
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
25 Nov, 2010
3 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 -
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
12 Nov, 2010
1 commit
-
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