Commit Graph

12 Commits

Author SHA1 Message Date
Krzysztof Kozlowski 44ab901f91 leds: Drop owner assignment from i2c_driver
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-08-28 14:06:02 +02:00
Johan Hovold 0d25376c32 leds: lm355x: fix attribute-creation race
Use the attribute groups of the led-class to create the indicator-LED
attributes during probe in order to avoid racing with userspace.

Note that the comment about the pattern attribute only being for LM3554
was incorrect and did not match the code (the original leds-lm3556
driver had the attribute before LM3554 support was added).

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-06-25 15:10:54 -07:00
Jingoo Han 87aae1ea82 leds: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-08-26 17:22:11 -07:00
Kim, Milo 313bf0b1a0 leds: lm355x, lm3642: support camera LED triggers for flash and torch
LM355x and LM3642 support flash and torch functionality.

 (Camera driver)          (LED trigger for camera)       (LED driver)
 Turn on the flash  ...>  ledtrig_flash_ctrl(true) ...>  LM355x or LM3642
                                                         brightness ctrl
                                                       <actual driving here>

Flash/torch LEDs are controlled by other driver using LED camera trigger
APIs, ledtrig_flash_ctrl()/ledtrig_torch_ctrl().
Then, actual device control is activated by each LED driver such like
LM355x or LM3642.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-04-01 11:04:50 -07:00
Jingoo Han 0c0d9067ac leds: lm355x: rename devAttr to avoid CamelCase
Fixed the checkpatch warning as below:

  WARNING: Avoid CamelCase: <devAttr>

Rename devAttr to attr.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-02-01 17:47:06 -08:00
Linus Torvalds e81d372ff9 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem update from Bryan Wu.

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (47 commits)
  leds: leds-lp5521: return an error code on error in probe()
  leds: leds-clevo-mail: Use pr_* instead of printks
  leds: leds-rb532: Fix checkpatch errors
  leds: led-triggers: Fix checkpatch warnings
  leds: ledtrig-backlight: Fix checkpatch error
  leds: leds-wrap: Use <linux/io.h> instead of <asm/io.h>
  leds: leds-wm8350: Use dev_err instead of printk
  leds: leds-pwm: Fix checkpatch warning
  leds: leds-pca955x: Use dev_info instead of printk
  leds: leds-net48xx: Use linux/io.h instead of asm/io.h
  leds: leds-lt3593: Fix checkpatch warnings
  leds: leds-gpio: Use dev_info instead of printk
  leds: leds-da903x: Fix checkpatch error and warnings
  leds: leds-bd2802: Fix checkpatch warnings
  leds: leds-adp5520: Fix checkpatch warnings
  leds: led-class: Fix checkpatch warning
  leds: leds-ns2: use devm_gpio_request_one
  leds: leds-lt3593: use devm_gpio_request_one
  leds: leds-gpio: use devm_gpio_request_one
  leds: lp3944: Fix return value
  ...
2012-12-15 12:52:42 -08:00
Bill Pemberton 678e8a6be9 leds: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Jan-Simon Moeller <jansimon.moeller@gmx.de>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28 12:35:06 -08:00
Bill Pemberton 98ea1ea20c leds: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Jan-Simon Moeller <jansimon.moeller@gmx.de>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28 12:34:57 -08:00
Bill Pemberton df07cf8126 leds: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Jan-Simon Moeller <jansimon.moeller@gmx.de>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28 12:33:20 -08:00
Axel Lin 5bbf150cca leds: lm355x: Fix up world writable sysfs file
We don't need the sysfs file to be world writable or group writable.
This file is write-only, change it to S_IWUSR (0200).

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: G.Shark Jeong <gshark.jeong@gmail.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2012-11-26 14:28:49 -08:00
Axel Lin 14ce82e536 leds: lm355x: Return proper error for lm3556_indicator_pattern_store error path
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: G.Shark Jeong <gshark.jeong@gmail.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2012-11-26 14:28:42 -08:00
G.Shark Jeong b98d13c725 leds: Add new LED driver for lm355x chips
This driver is a general version for LM355x,lm3554 and lm3556,led chips of TI.

LM3554 :
The LM3554 is a 2 MHz fixed-frequency synchronous boost
converter with 1.2A dual high side led drivers.
Datasheet: www.ti.com/lit/ds/symlink/lm3554.pdf

LM3556 :
The LM3556 is a 4 MHz fixed-frequency synchronous boost
converter plus 1.5A constant current driver for a high-current white LED.
Datasheet: www.national.com/ds/LM/LM3556.pdf

(bryan.wu@canonical.com: use flush_work() to replace flush_work_sync() which is
deprecated)

Signed-off-by: G.Shark Jeong <gshark.jeong@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
2012-09-11 18:32:43 +08:00