Commit graph

294 commits

Author SHA1 Message Date
Bartosz Golaszewski
5be102eb16 leds: max77650: Add LEDs support
This adds basic support for LEDs for the max77650 PMIC. The device has
three current sinks for driving LEDs.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-05-08 12:07:02 +01:00
Jacek Anaszewski
174c9526ac LM3532 backlight driver improvements and relocation
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQUwxxKyE5l/npt8ARiEGxRG/Sl2wUCXKpGTgAKCRBiEGxRG/Sl
 2/NgAP9OKSCZsbOAaZNgoyNf9x0biGQ2tPHqbx7tIvkE/i76RAEA2GWer+DBBx9x
 V2/96RAtP/xTV9UMY2DwIUTwTEAbDwQ=
 =4jHV
 -----END PGP SIGNATURE-----

Merge tag 'lm3532-driver-improvements' into for-next

Merge immutable branch between LEDs, MFD and OMAP Device Tree due to
LM3532 backlight driver improvements and relocation.

* tag 'lm3532-driver-improvements':
  leds: lm3532: Introduce the lm3532 LED driver
  mfd: ti-lmu: Remove LM3532 backlight driver references
  ARM: dts: omap4-droid4: Update backlight dt properties
  dt: lm3532: Add lm3532 dt doc and update ti_lmu doc
2019-04-07 20:55:14 +02:00
Dan Murphy
bc1b8492c7 leds: lm3532: Introduce the lm3532 LED driver
Introduce the Texas Instruments LM3532 White LED driver.
The driver supports ALS configurability or manual brightness
control.

The driver also supports associating LED strings with specific
control banks in a group or as individually controlled strings.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-04-07 20:45:49 +02:00
Dan Murphy
6e6c214f16 leds: Small fixes for Flash class description
Fix misspelling and capitalization of LED in the Kconfig.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-04-03 22:18:27 +02:00
Daniel Mack
dd08e136f7 leds: lt3593: drop pdata handling code
The only user of this driver in mainline has now moved to DTS, so the pdata
code is no longer in use by anyone. Let's drop some dead code, and make the
driver depend on CONFIG_OF.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-03-31 20:12:30 +02:00
Enrico Weigelt, metux IT consult
0eae60583f drivers: leds: Kconfig: pedantic cleanups
Clean up spaces before tabs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-03-31 20:11:43 +02:00
Simon Shields
2d00f35c55 leds: add Panasonic AN30259A support
AN30259A is a 3-channel LED driver which uses I2C. It supports timed
operation via an internal PWM clock, and variable brightness. This
driver offers support for basic hardware-based blinking and brightness
control.

The datasheet is freely available:
https://www.alliedelec.com/m/d/a9d2b3ee87c2d1a535a41dd747b1c247.pdf

Signed-off-by: Simon Shields <simon@lineageos.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-09-10 21:31:11 +02:00
Raffaello D. Di Napoli
8cb21086cc leds: Modify PC Engines apu/apu2 driver to support apu3
PC Engines apu3 is an improved version of the apu2, using the same SoC
and almost everything else.

This patch reuses as much as possible from the apu2 definitions, to
avoid redundancy.

Signed-off-by: Raffaello D. Di Napoli <rafdev@dinapo.li>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-06-28 21:34:43 +02:00
Dan Murphy
57a53297cc leds: lm3601x: Introduce the lm3601x LED driver
Introduce the family of LED devices that can
drive a torch, strobe or IR LED.

The LED driver can be configured with a strobe
timer to execute a strobe flash.  The IR LED
brightness is controlled via the torch brightness
register.

The data sheet for each the LM36010 and LM36011
LED drivers can be found here:
http://www.ti.com/product/LM36010
http://www.ti.com/product/LM36011

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-05-23 21:44:47 +02:00
Baolin Wang
e081c49e30 leds: Add Spreadtrum SC27xx breathing light controller driver
This patch adds Spreadtrum SC27xx PMIC series breathing light controller
driver, which can support 3 LEDs. Each LED can work at normal PWM mode
and breathing mode.

Signed-off-by: Xiaotong Lu <xiaotong.lu@spreadtrum.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-05-14 22:18:34 +02:00
Oleh Kravchenko
9e50d5fb0d leds: add LED driver for CR0014114 board
This patch adds a LED class driver for the RGB LEDs found on
the Crane Merchandising System CR0014114 LEDs board.

Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-04-16 20:16:24 +02:00
Vadim Pasternak
386570d76f leds: add driver for support Mellanox regmap LEDs for BMC and x86 platform
Driver obtains LED devices according to system configuration and creates
devices in form: "devicename:color:function", like
The full path is to be:
/sys/class/leds/mlxreg\:status\:amber/brightness
After timer trigger activation:
echo timer > /sys/class/leds/mlxreg\:status\:amber/trigger
Attributes for LED blinking will appaer in sysfs infrastructure:
/sys/class/leds/mlxreg\:status\:amber/delay_off
/sys/class/leds/mlxreg\:status\:amber/delay_on

LED setting is controlled through the on-board programmable devices,
which exports its register map. This device could be attached to any
bus type, for which register mapping is supported.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-02-19 21:09:20 +01:00
Vadim Pasternak
54b6c12724 leds: fix Kconfig text for MLXCPLD, SYSCON, MC13783, NETXBIG
It fixes grammatical errors in Kconfig file for LEDS_SYSCON,
LEDS_MLXCPLD, LEDS_MC13783, LEDS_NETXBIG.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-02-15 22:03:32 +01:00
Pavel Machek
6204f03d3f leds: Clarify supported chips by LM355x driver
Clarify which controllers are supported by which driver.

Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-02-12 20:49:38 +01:00
Vadim Pasternak
8f886de18a leds: leds-mlxcpld: Allow compilation for 32 bit arch
It makes leds-mlxcpld available for 32 bit architecture.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Reported-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-02-12 20:49:09 +01:00
Dan Murphy
a2169c9b76 leds: lp8860: Various fixes to align with LED framework
Update the driver to conform with the LED framework:
 - use devm_led_classdev_register
 - destroy mutex on exit
 - remove dependency on CONFIG_OF in the driver and move
   to the Kconfig
 - update the MODULE_LICENSE to GPL v2
 - remove setting of MAX brightness as the LED framework
   does this.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-01-08 21:28:12 +01:00
Dan Murphy
9699cb6bbe leds: lm3692x: Introduce LM3692x dual string driver
Introducing the LM3692x Dual-String white LED driver.

Data sheet is located
http://www.ti.com/lit/ds/snvsa29/snvsa29.pdf

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-01-08 21:28:11 +01:00
Alan Mizrahi
3faee9423c leds: Add driver for PC Engines APU/APU2 LEDs
This patch implements the driver to support the front panel LEDs
for PC Engines APU and APU2 boards.

Signed-off-by: Alan Mizrahi <alan@mizrahi.com.ve>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-11-06 22:05:00 +01:00
Linus Torvalds
5f9cc57036 LED updates for 4.14
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJZsZswAAoJEL1qUBy3i3wm2cwQANp9Hufui0BYxD7X9bB3sBvX
 LJ2lbwQlZ93gmQo176fvE22wYw90wmf4CG12pdx8CB4TIBOuaEl1EUptaIxHjBkP
 +MOmiGxT0YZgUDmSo+sCL+LHEDWU8gcs8MI5ZkAxgALUb0kYiQySH5UlCJJOJIJv
 ww1A4K1bo6VONli+y8ZDa3eKgkArg1/pXYl2VejNMSkr88fyzf35fOKD44lMUGos
 5KFVWdPMnz1OuVbh199x9vAPZygb4PNzJL1Tf2ntklBfU3mX+582e6uvIPqh4Tuy
 D5ZianpBNtA0IBV4G0UE+n/9rOy9oAr34+Tq9Gv0BRLlQXsC8FMEM5xcCDd1kFCI
 L6FeiGc1YnEtJpUVEhcWzmpww2EBBRKIB9lJK5c8VUlWf/yZME72Al5R8c7uffcE
 hc78eUVwM2fHNmBhmCmK49flC67/LMzHMiaEQ/lSGtGnd8ratclshFuooiPzsJN/
 MSTX2B3yxWvBjwmZMNixY6WasduKKJs4K5xHnHJzyLt0mvClLiwgOvi1Dks0t+Ko
 imE6cdU3LCUeJJb4I9SgHTTjp33CTqq5ZBhbFsgqjNsfj4o/6GmnWxvSZ4ywqJMW
 HwU4iyBKlx2AVfhzIPozuoE67+HJyRYIexsUZi4vt0Pw2qHxwp1RvH+BMQbXGLLg
 rJ/H9ef5BAPRkPWxe1HM
 =E1ff
 -----END PGP SIGNATURE-----

Merge tag 'leds_for_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds

Pull LED updates from Jacek Anaszewski:
 "LED class drivers improvements:

  leds-pca955x:
   - add Device Tree support and bindings
   - use devm_led_classdev_register()
   - add GPIO support
   - prevent crippled LED class device name
   - check for I2C errors

  leds-gpio:
   - add optional retain-state-shutdown DT property
   - allow LED to retain state at shutdown

  leds-tlc591xx:
   - merge conditional tests
   - add missing of_node_put

  leds-powernv:
   - delete an error message for a failed memory allocation in
     powernv_led_create()

  leds-is31fl32xx.c
   - convert to using custom %pOF printf format specifier

  Constify attribute_group structures in:
   - leds-blinkm
   - leds-lm3533

  Make several arrays static const in:
   - leds-aat1290
   - leds-lp5521
   - leds-lp5562
   - leds-lp8501"

* tag 'leds_for_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
  leds: pca955x: check for I2C errors
  leds: gpio: Allow LED to retain state at shutdown
  dt-bindings: leds: gpio: Add optional retain-state-shutdown property
  leds: powernv: Delete an error message for a failed memory allocation in powernv_led_create()
  leds: lp8501: make several arrays static const
  leds: lp5562: make several arrays static const
  leds: lp5521: make several arrays static const
  leds: aat1290: make array max_mm_current_percent static const
  leds: pca955x: Prevent crippled LED device name
  leds: lm3533: constify attribute_group structure
  dt-bindings: leds: add pca955x
  leds: pca955x: add GPIO support
  leds: pca955x: use devm_led_classdev_register
  leds: pca955x: add device tree support
  leds: Convert to using %pOF instead of full_name
  leds: blinkm: constify attribute_group structures.
  leds: tlc591xx: add missing of_node_put
  leds: tlc591xx: merge conditional tests
2017-09-07 14:33:13 -07:00
Arnd Bergmann
1efdf1776e media: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency
We get a link error when V4L2_FLASH_LED_CLASS=m and AS3645A is built-in:

drivers/leds/leds-as3645a.o: In function `as3645a_v4l2_setup':
leds-as3645a.c:(.text+0x258): undefined reference to `v4l2_flash_init'
leds-as3645a.c:(.text+0x284): undefined reference to `v4l2_flash_indicator_init'
leds-as3645a.c:(.text+0x2a4): undefined reference to `v4l2_flash_release'
drivers/leds/leds-as3645a.o: In function `as3645a_remove':
leds-as3645a.c:(.text+0x784): undefined reference to `v4l2_flash_release'

This adds the same Kconfig dependency that the other V4L2 flash
drivers in drivers/leds use, to avoid that broken configuration.

Fixes: a56ba8fbcb ("media: leds: as3645a: Add LED flash class driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-09-05 16:32:45 -04:00
Sakari Ailus
a56ba8fbcb media: leds: as3645a: Add LED flash class driver
Add a LED flash class driver for the as3654a flash controller. A V4L2 flash
driver for it already exists (drivers/media/i2c/as3645a.c), and this driver
is based on that.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26 20:30:12 -04:00
Cédric Le Goater
561099a1a2 leds: pca955x: add GPIO support
The PCA955x family of chips are I2C LED blinkers whose pins not used
to control LEDs can be used as general purpose I/Os (GPIOs).

The following adds such a support by defining different operation
modes for the pins (See bindings documentation for more details). The
pca955x driver is then extended with a gpio_chip when some of pins are
operating as GPIOs. The default operating mode is to behave as a LED.

The GPIO support is conditioned by CONFIG_LEDS_PCA955X_GPIO.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-08-14 22:22:37 +02:00
Paul Burton
64601cb134 leds: Remove SEAD-3 driver
SEAD3 is using the generic syscon & regmap based register-bit-led
driver as of commit c764583f40 ("MIPS: SEAD3: Use register-bit-led
driver via DT for LEDs") merged in the v4.9 cycle. As such the custom
SEAD-3 LED driver is now unused, so remove it.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: linux-leds@vger.kernel.org
Cc: linux-mips@linux-mips.org
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-06-19 20:56:47 +02:00
Linus Walleij
7678da8ee6 leds: Delete obsolete Versatile driver
All users of the Versatile LED driver are deleted and replaced
with the very generic leds-syscon. Delete the old driver.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-05-14 13:01:29 +02:00
Sebastian Reichel
cd3b0b0532 leds: cpcap: new driver
Motorola CPCAP is a PMIC (power management integrated circuit) found
in multiple smartphones. This driver adds support for the chip's LED
controllers. This introduces support for all controllers used by the
Droid 4. According to Motorola's driver (no datasheets available)
there a couple of more LED controllers. I did not add support for
them, since I cannot verify that they work with my modifications.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-03-29 21:02:27 +02:00
Andy Shevchenko
9696217847 leds: lp3952: Remove ACPI support for lp3952
In ACPI world any ID should be carefully chosen and registered
officially. The discussion [1] as I read it gets to wilful assignment
an ID for non-existing real DSDT example.

Rafael already told [2] how this device would be enumerated using
compatible string. To be more precise look at the possible DSDT excerpt
below:

	Device (LDX0) {
		Name (_HID, "PRP0001")
		Name (_DDN, "TI LP3952 compatible led driver")
		...
	})

	Name (_DSD, Package () {
		ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
		Package () {
			Package () {"compatible", "ti,lp3952"},
			...
		}
	})

Based on above, remove non-official ACPI IDs and enumeration from the
driver.

Note: currently driver has no compatible strings at all, to make above
working one should add at least one.

[1] https://e2e.ti.com/support/power_management/led_driver/f/192/t/524926
[2] https://www.spinics.net/lists/linux-acpi/msg67125.html

Cc: Tony Makkiel <tony.makkiel@daqri.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-03-23 20:33:51 +01:00
Sean Wang
216ec6cc4c leds: Add LED support for MT6323 PMIC
MT6323 PMIC is a multi-function device that includes LED function.
It allows attaching up to 4 LEDs which can either be on, off or dimmed
and/or blinked with the controller.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-03-21 20:13:19 +01:00
Michał Kępień
7a3319c1cd dell-led: move driver to drivers/platform/x86/dell-wmi-led.c
The dell-led driver handles a specific WMI GUID present on some Dell
laptops and as such it belongs in the x86 platform driver subsystem.
Source code is moved along with the relevant Kconfig and Makefile
entries, with some minor modifications:

  - Kconfig option is renamed from CONFIG_LEDS_DELL_NETBOOKS to
    CONFIG_DELL_WMI_LED,

  - the X86 Kconfig dependency is removed as the whole
    drivers/platform/x86 menu depends on it, so there is no need to
    duplicate it,

  - the name of the module's source file is removed from the header
    comment to avoid the need to update it in the future.

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Tested-by: Alex Hung <alex.hung@canonical.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-03-06 22:07:09 +01:00
Michał Kępień
e5aa482a8a dell-led: remove code related to mic mute LED
With dell_micmute_led_set() moved to drivers/platform/x86/dell-laptop.c,
all remnants of the mic mute LED handling code can be removed from
drivers/leds/dell-led.c, restoring it back to the state it was in before
commit db6d8cc007 ("dell-led: add mic mute led interface").

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Tested-by: Alex Hung <alex.hung@canonical.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-03-06 22:07:07 +01:00
Hans de Goede
0cb8eb30d4 leds: class: Add new optional brightness_hw_changed attribute
Some LEDs may have their brightness level changed autonomously
(outside of kernel control) by hardware / firmware. This commit
adds support for an optional brightness_hw_changed attribute to
signal such changes to userspace (if a driver can detect them):

What:		/sys/class/leds/<led>/brightness_hw_changed
Date:		January 2017
KernelVersion:	4.11
Description:
		Last hardware set brightness level for this LED. Some LEDs
		may be changed autonomously by hardware/firmware. Only LEDs
		where this happens and the driver can detect this, will
		have this file.

		This file supports poll() to detect when the hardware
		changes the brightness.

		Reading this file will return the last brightness level set
		by the hardware, this may be different from the current
		brightness.

Drivers which want to support this, simply add LED_BRIGHT_HW_CHANGED to
their flags field and call led_classdev_notify_brightness_hw_changed()
with the hardware set brightness when they detect a hardware / firmware
triggered brightness change.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-01-29 19:59:42 +01:00
Jacek Anaszewski
2a4f8114f2 Immutable branch between MFD, ARM and LED due for the v4.10 merge window
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJYMu7NAAoJEFGvii+H/HdhUgcP/i7Ii38BIAr4W3VpERGrukmm
 8+KgMDi8gtsIudgsAZTYYqPWk4XAGKXMm0rOgG7p4ivUAEKaRvfSQ6Of510IMoq8
 M8HofvyWZurdCHptsRGU13qp8pyfkz1WW+iYzNP7KKGqA4dcOVfCxNwc3zYZ4Mi+
 7YTC1UPb0hKinhwWULOxKwdncspH54EgHxgiDJeVaowQh6p1fKYzxf7cTcypwPdR
 ZhcP5zuvgaV765h/v4jBcsu6e6pCWBHoCSRrS3IxDm0OMbe/fig9AB1QoJ/M0SE9
 oDK6ejrbdN7+HWPWR0Zx3i7dJFPxqqvg8/cwwAynDz3O/rKi1sJ/uFd95mWLWmXu
 FuWxgwtCRMd8s0OoHuMvI0NEA9n6CUvaFhg4TpI6MDLW1s+8nW7WpTRGiXlTBOol
 UjiODJtnHzHRkiWFy8O+7s2Kqa7/IR36ExqSscl812oYBNeR2nLLDSAVlbHvXVil
 TLa1Y6noGoBvHK/zmaxFux7bQcmNwBOimCNNkGI4KdGYcDnBCJHpXYRqit4tUt+H
 dKI0BLvOWP4Jq2jvMCb9zjfhRLzezc2lMHr0dxOymTuAqSaRta7qt3nSFQb1KTxw
 6rXZm6YYNIRX/8h7gEGSEmGjubYKmMLzehGRT/njhbJvl1rNE5brdjH6l6eDzT3v
 UngwPP3SL/eAWBqX8NqO
 =BIXN
 -----END PGP SIGNATURE-----

Merge tag 'ib-mfd-arm-leds-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into linux-leds/for-next

Pull PM8XXX namespace cleanup from Lee Jones.

* tag 'ib-mfd-arm-leds-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
  mfd: qcom-pm8xxx: Clean up PM8XXX namespace
2016-11-22 13:52:06 +01:00
Hui Chun Ong
8338eab50f leds: Add user LED driver for NIC78bx device
Add the driver to support User LEDs on PXI Embedded Controller.

Signed-off-by: Hui Chun Ong <hui.chun.ong@ni.com>
Signed-off-by: Brad Mouring <brad.mouring@ni.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-11-22 12:07:04 +01:00
David Lechner
e381322b01 leds: Introduce userspace LED class driver
This driver creates a userspace leds driver similar to uinput.

New LEDs are created by opening /dev/uleds and writing a uleds_user_dev
struct. A new LED class device is registered with the name given in the
struct. Reading will return a single byte that is the current brightness.
The poll() syscall is also supported. It will be triggered whenever the
brightness changes. Closing the file handle to /dev/uleds will remove
the leds class device.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-11-22 12:07:02 +01:00
Linus Walleij
40a3a0f2ba mfd: qcom-pm8xxx: Clean up PM8XXX namespace
The Kconfig and file naming for the PM8xxx driver is totally
confusing:

- Kconfig options MFD_PM8XXX and MFD_PM8921_CORE, some in-kernel
  users depending on or selecting either at random.
- A driver file named pm8921-core.c even if it is indeed
  used by the whole PM8xxx family of chips.
- An irqchip named pm8xxx since it was (I guess) realized that
  the driver was generic for all pm8xxx PMICs.

As I may want to add support for PM8901 this is starting to get
really messy. Fix this situation by:

- Remove the MFD_PM8921_CORE symbol and rely solely on MFD_PM8XXX
  and convert all users, including LEDs Kconfig and ARM defconfigs
  for qcom and multi_v7 to use that single symbol.
- Renaming the driver to qcom-pm8xxx.c to fit along the two
  other qcom* prefixed drivers.
- Rename functions withing the driver from 8921 to 8xxx to
  indicate it is generic.
- Just drop the =m config from the pxa_defconfig, I have no clue
  why it is even there, it is not a Qualcomm platform. (Possibly
  older Kconfig noise from saveconfig.)

Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Gross <andy.gross@linaro.org>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-11-21 12:54:28 +00:00
Vadim Pasternak
be4fdf99fa leds: add driver for Mellanox systems LEDs
This makes it possible to create a set of LEDs for Mellanox systems:
"msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
"msb7800", "msn2740", "msn2100".

Driver obtains LED devices according to system configuration, provided
through system DMI data, like mlxcpld:fan1:green, mlxcpld:fan1:red and
creates devices in form: "devicename:colour:function".

LED setting is controlled through on board CPLD Lattice device.
For setting particular LED off, solid, blink:
echo 0 > /sys/class/leds/mlxcpld\:status\:green/brightness
echo 1 > /sys/class/leds/mlxcpld\:status\:green/brightness
echo timer > /sys/class/leds/mlxcpld\:status\:green/trigger

On module probing all LEDs are set green, on removing - off.

Last setting overwrites previous, f.e. sequence for
changing LED from green - red - green:
echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness
echo 1 > /sys/class/leds/mlxcpld\:psu\:red/brightness
echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness
Note: LEDs cannot be turned on/off simultaneously.

The Kconfig currently controlling compilation of this code is:
drivers/leds/Kconfig:config LEDS_MLXCPLD

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-09-15 16:49:39 +02:00
Linus Walleij
7f866986e7 leds: add PM8058 LEDs driver
This adds a driver for the six PM8058 LEDs, three ordinary LEDs,
two "flash" LEDs and one "keypad" LED.

The "keypad" and "flash" LEDs are not really hard-wired to these
usecases: for example on the APQ8060 Dragonboard, the "keypad"
LED is instead used to drive an IR LED used for the proximity
sensor. The "flash" LEDs are just ordinary high-current LED
drivers.

Cc: linux-arm-msm@vger.kernel.org
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-08-16 22:37:26 +02:00
H. Nikolaus Schaller
8c40b7d09e leds: is31fl319x: 1/3/6/9-channel light effect led driver
This is a driver for the Integrated Silicon Solution Inc. LED driver
chips series IS31FL319x. They can drive 1, 3, 6  or up to 9
LEDs.

Each LED is individually controllable in brightness (through pwm)
in 256 steps so that RGB LEDs can show any of ca. 16 Mio colors.

The maximum current of the LEDs can be programmed and limited to
5 .. 40mA through a device tree property.

The chip is connected through I2C and can have one of 4 addresses
in the range 0x64 .. 0x67 depending on how the AD pin is connected. The
address is defined by the reg property as usual.

The chip also has a shutdown input which could be connected to a GPIO,
but this driver uses software shutdown if all LEDs are inactivated.

The chip also has breathing and audio features which are not fully
supported by this driver.

Tested-on: OMAP5 based Pyra handheld prototype.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Andrey Utkin <andrey_utkin@fastmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-08-15 14:02:31 +02:00
Tony Makkiel
d966c943e4 leds: LED driver for TI LP3952 6-Channel Color LED
The chip can drive 2 sets of RGB leds. Controller can
be controlled via PWM, I2C and audio synchronisation.
This driver uses I2C to communicate with the chip.

Datasheet: http://www.ti.com/lit/gpn/lp3952

Signed-off-by: Tony Makkiel <tony.makkiel@daqri.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-07-18 08:46:09 +02:00
Martin Dummer
fe15ee47e4 leds: ss4200: Add depend on x86 arch
There is only one x86 hardware where the driver leds-ss4200 applies to.
Add kconfig dependency to x86 architecture, fix help text whitespace.

Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-04-19 09:01:19 +02:00
Linus Torvalds
5a010c73cd platform-drivers-x86 for 4.6-1
Significant refactoring of Dell laptop drivers, modularizing the smbios code.
 Multiple new platforms added for ideapad, asus, dell, and alienware using
 existing quirks. A few fixes and cleanups.
 
 hp-wmi:
  - Remove GPS rfkill support via pre-2009 interface
  - fix unregister order in hp_wmi_rfkill_setup() once again
 
 ideapad-laptop:
  - Add ideapad Y700 (15) to the no_hw_rfkill DMI list
 
 fujitsu-laptop:
  - Support radio toggle button
 
 intel-hid:
  - allocate correct amount of memory for private struct
 
 platform/x86:
  - Make intel_scu_ipc explicitly non-modular
 
 intel_pmc_ipc:
  - Avoid pending IPC1 command during legacy suspend
  - Fix GCR register base address and length
 
 asus-nb-wmi:
  - add wapf=4 quirk for ASUS X75VD
 
 intel_telemetry_pltdrv:
  - Change verbosity control bits
 
 dell-rbtn:
  - Add a comment about the XPS 13 9350
 
 dell-wmi, dell-laptop:
  - depends DMI
 
 dell-wmi:
  - support Dell Inspiron M5110
  - properly process Dell Instant Launch hotkey
  - enable receiving WMI events on Dell Vostro V131
  - Support new hotkeys on the XPS 13 9350 (Skylake)
  - Clean up hotkey table size check
  - Stop storing pointers to DMI tables
 
 dell-laptop:
  - move dell_smi_error() to dell-smbios
  - use dell_smbios_find_token() instead of find_token_location()
  - use dell_smbios_find_token() instead of find_token_id()
  - extract SMBIOS-related code to a separate module
 
 dell-smbios:
  - rename dell_smi_error() to dell_smbios_error()
  - make da_tokens static
  - remove find_token_{id,location}()
  - implement new function for finding DMI table 0xDA tokens
  - make the SMBIOS buffer static
  - return the SMBIOS buffer from dell_smbios_get_buffer()
  - don't return an SMBIOS buffer from dell_smbios_send_request()
  - don't pass an SMBIOS buffer to dell_smbios_send_request()
  - rename dell_send_request() to dell_smbios_send_request()
  - rename release_buffer() to dell_smbios_release_buffer()
  - rename clear_buffer() to dell_smbios_clear_buffer()
  - rename get_buffer() to dell_smbios_get_buffer()
 
 dell-led:
  - use dell_smbios_send_request() for performing SMBIOS calls
  - use dell_smbios_find_token() for finding mic DMI tokens
 
 toshiba_acpi:
  - Add a module parameter to disable hotkeys registration
  - Add sysfs entries for the Cooling Method feature
  - Add support for cooling method feature
 
 Documentation/ABI:
  - Update sysfs-driver-toshiba_acpi file
 
 thinkpad_acpi:
  - Remove ambiguous logging for "Unsupported brightness interface"
 
 alienware-wmi:
  - whitespace improvements
  - Add support for two new systems: ASM200 and ASM201.
  - Add support for deep sleep control.
  - Add initial support for alienware graphics amplifier.
  - Add support for new platform: X51-R3
  - Clean up whitespace for ASM100 platform
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJW8s77AAoJEKbMaAwKp364iVgH/18Tpefbc7uOrNak4zfTmvVO
 CQjLdbnbCYoeNjwgdYSZNlaR+E2TuMdqmBXXLEr3kqicpmX15l+V5y8xJkDmGpxw
 0RmwJnkdIpmkZcjb3/2abOtIuOj1Y/tXCp5mY1FoaDYBQVzO+ZsPEGNQcMu5uJpa
 qZTw9UwiSPUspTrHHbS7/Bzv7yFnxlWC1nmt6G5zL4OMEv2AGbuVSstXVGySIML5
 TfFdisUBIXQplzwpDytHGqtGUJMc0NnT1s66beuo1oBdEFTFtBNpFySW3goV2nrZ
 JPbvyaV3tD24NYNmU9WH653InX4KuaGiJRWVT31a/I5HVVlx7mZdUYRI+EYAnmE=
 =e0E4
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v4.6-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86

Pull x86 platform driver updates from Darren Hart:
 "Significant refactoring of Dell laptop drivers, modularizing the
  smbios code.  Multiple new platforms added for ideapad, asus, dell,
  and alienware using existing quirks.  A few fixes and cleanups.

  hp-wmi:
   - Remove GPS rfkill support via pre-2009 interface
   - fix unregister order in hp_wmi_rfkill_setup() once again

  ideapad-laptop:
   - Add ideapad Y700 (15) to the no_hw_rfkill DMI list

  fujitsu-laptop:
   - Support radio toggle button

  intel-hid:
   - allocate correct amount of memory for private struct

  platform/x86:
   - Make intel_scu_ipc explicitly non-modular

  intel_pmc_ipc:
   - Avoid pending IPC1 command during legacy suspend
   - Fix GCR register base address and length

  asus-nb-wmi:
   - add wapf=4 quirk for ASUS X75VD

  intel_telemetry_pltdrv:
   - Change verbosity control bits

  dell-rbtn:
   - Add a comment about the XPS 13 9350

  dell-wmi, dell-laptop:
   - depends DMI

  dell-wmi:
   - support Dell Inspiron M5110
   - properly process Dell Instant Launch hotkey
   - enable receiving WMI events on Dell Vostro V131
   - Support new hotkeys on the XPS 13 9350 (Skylake)
   - Clean up hotkey table size check
   - Stop storing pointers to DMI tables

  dell-laptop:
   - move dell_smi_error() to dell-smbios
   - use dell_smbios_find_token() instead of find_token_location()
   - use dell_smbios_find_token() instead of find_token_id()
   - extract SMBIOS-related code to a separate module

  dell-smbios:
   - rename dell_smi_error() to dell_smbios_error()
   - make da_tokens static
   - remove find_token_{id,location}()
   - implement new function for finding DMI table 0xDA tokens
   - make the SMBIOS buffer static
   - return the SMBIOS buffer from dell_smbios_get_buffer()
   - don't return an SMBIOS buffer from dell_smbios_send_request()
   - don't pass an SMBIOS buffer to dell_smbios_send_request()
   - rename dell_send_request() to dell_smbios_send_request()
   - rename release_buffer() to dell_smbios_release_buffer()
   - rename clear_buffer() to dell_smbios_clear_buffer()
   - rename get_buffer() to dell_smbios_get_buffer()

  dell-led:
   - use dell_smbios_send_request() for performing SMBIOS calls
   - use dell_smbios_find_token() for finding mic DMI tokens

  toshiba_acpi:
   - Add a module parameter to disable hotkeys registration
   - Add sysfs entries for the Cooling Method feature
   - Add support for cooling method feature

  Documentation/ABI:
   - Update sysfs-driver-toshiba_acpi file

  thinkpad_acpi:
   - Remove ambiguous logging for "Unsupported brightness interface"

  alienware-wmi:
   - whitespace improvements
   - Add support for two new systems: ASM200 and ASM201.
   - Add support for deep sleep control.
   - Add initial support for alienware graphics amplifier.
   - Add support for new platform: X51-R3
   - Clean up whitespace for ASM100 platform"

* tag 'platform-drivers-x86-v4.6-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (47 commits)
  hp-wmi: Remove GPS rfkill support via pre-2009 interface
  hp-wmi: fix unregister order in hp_wmi_rfkill_setup() once again
  dell-wmi: support Dell Inspiron M5110
  dell-wmi: properly process Dell Instant Launch hotkey
  dell-wmi: enable receiving WMI events on Dell Vostro V131
  dell-smbios: rename dell_smi_error() to dell_smbios_error()
  dell-laptop: move dell_smi_error() to dell-smbios
  ideapad-laptop: Add ideapad Y700 (15) to the no_hw_rfkill DMI list
  fujitsu-laptop: Support radio toggle button
  intel-hid: allocate correct amount of memory for private struct
  platform/x86: Make intel_scu_ipc explicitly non-modular
  intel_pmc_ipc: Avoid pending IPC1 command during legacy suspend
  intel_pmc_ipc: Fix GCR register base address and length
  asus-nb-wmi: add wapf=4 quirk for ASUS X75VD
  intel_telemetry_pltdrv: Change verbosity control bits
  dell-rbtn: Add a comment about the XPS 13 9350
  dell-wmi: Support new hotkeys on the XPS 13 9350 (Skylake)
  dell-wmi: Clean up hotkey table size check
  dell-wmi, dell-laptop: depends DMI
  dell-wmi: Stop storing pointers to DMI tables
  ...
2016-03-23 17:20:59 -07:00
Michał Kępień
cf0d7ea335 dell-led: use dell_smbios_find_token() for finding mic DMI tokens
With the advent of dell_smbios_find_token(), dell-led does not need to
perform any DMI walking on its own, but it can rather ask dell-smbios to
look up the DMI tokens it needs for changing the state of the microphone
LED.

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-03-23 10:05:43 -07:00
David Rivshin
e0442d7def leds: Add SN3218 and SN3216 support to the IS31FL32XX driver
Si-En Technology was acquired by ISSI in 2011, and it appears that
the IS31FL3218/IS31FL3216 are just rebranded SN3218/SN3216 devices.

Add the "si-en,sn3218" and "si-en,sn3216" compatible strings into the
IS31FL32XX driver as aliases for the issi equivalents, and update
binding documentation.

Datasheets:
    IS31FL3218: http://www.issi.com/WW/pdf/31FL3218.pdf
    SN3218:     http://www.si-en.com/uploadpdf/s2011517171720.pdf

    IS31FL3216: http://www.issi.com/WW/pdf/31FL3216.pdf
    SN3216:     http://www.si-en.com/uploadpdf/SN3216201152410148.pdf

Signed-off-by: David Rivshin <drivshin@allworx.com>
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-03-14 09:22:22 +01:00
David Rivshin
9d7cffaf99 leds: Add driver for the ISSI IS31FL32xx family of LED controllers
The IS31FL32xx family of LED controllers are I2C devices with multiple
constant-current channels, each with independent 256-level PWM control.

Datasheets: http://www.issi.com/US/product-analog-fxled-driver.shtml

This has been tested on the IS31FL3236 and IS31FL3216, on an ARM
(TI am335x) platform.

The programming paradigm of these devices is similar in the following
ways:
 - All registers are 8 bit
 - All LED control registers are write-only
 - Each LED channel has a PWM register (0-255)
 - PWM register writes are shadowed until an Update register is poked
 - All have a concept of Software Shutdown, which disables output

However, there are some differences in devices:
 - 3236/3235 have a separate Control register for each LED,
   (3218/3216 pack the enable bits into fewer registers)
 - 3236/3235 have a per-channel current divisor setting
 - 3236/3235 have a Global Control register that can turn off all LEDs
 - 3216 is unique in a number of ways
    - OUT9-OUT16 can be configured as GPIOs instead of LED controls
    - LEDs can be programmed with an 8-frame animation, with
      programmable delay between frames
    - LEDs can be modulated by an input audio signal
    - Max output current can be adjusted from 1/4 to 2x globally
    - Has a Configuration register instead of a Shutdown register

This driver currently only supports the base PWM control function
of these devices. The following features of these devices are not
implemented, although it should be possible to add them in the future:
 - All devices are capable of going into a lower-power "software
   shutdown" mode.
 - The is31fl3236 and is31fl3235 can reduce the max output current
   per-channel with a divisor of 1, 2, 3, or 4.
 - The is31fl3216 can use some LED channels as GPIOs instead.
 - The is31fl3216 can animate LEDs in hardware.
 - The is31fl3216 can modulate LEDs according to an audio input.
 - The is31fl3216 can reduce/increase max output current globally.

Signed-off-by: David Rivshin <drivshin@allworx.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-03-14 09:22:21 +01:00
Vegard Nossum
522f17e121 leds: add HAS_IOMEM dependency to LEDS_BCM6328/LEDS_BCM6358
Ran into this on UML:

drivers/built-in.o: In function `bcm6328_leds_probe':
drivers/leds/leds-bcm6328.c:340: undefined reference to `devm_ioremap_resource'
drivers/built-in.o: In function `bcm6358_leds_probe':
drivers/leds/leds-bcm6358.c:173: undefined reference to `devm_ioremap_resource'
collect2: error: ld returned 1 exit status

devm_ioremap_resource() is defined only when HAS_IOMEM is selected.

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: linux-leds@vger.kernel.org
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-01-04 09:57:41 +01:00
Ralf Baechle
22a16873d3 LED/MIPS: Move SEAD3 LED driver to where it belongs.
Fixes the following randconfig problem

leds-sead3.c:(.text+0x7dc): undefined reference to `led_classdev_unregister'
leds-sead3.c:(.text+0x7e8): undefined reference to `led_classdev_unregister'

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-leds@vger.kernel.org
Cc: linux-mips@linux-mips.org
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03 08:59:20 +01:00
Takashi Iwai
2338f73d40 leds:lp55xx: Correct Kconfig dependency for f/w user helper
The commit [b67893206f: leds:lp55xx: fix firmware loading error]
tries to address the firmware file handling with user helper, but it
sets a wrong Kconfig CONFIG_FW_LOADER_USER_HELPER_FALLBACK.  Since the
wrong option was enabled, the system got a regression -- it suffers
from the unexpected long delays for non-present firmware files.

This patch corrects the Kconfig dependency to the right one,
CONFIG_FW_LOADER_USER_HELPER.  This doesn't change the fallback
behavior but only enables UMH when needed.

Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=944661
Fixes: b67893206f ('leds:lp55xx: fix firmware loading error')
Cc: <stable@vger.kernel.org> # v4.2+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-09-17 10:02:20 +02:00
Jacek Anaszewski
35bfe456be leds: leds-ipaq-micro: Add LEDS_CLASS dependency
Fix missing Kconfig LEDS_CLASS dependency.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2015-09-17 10:02:12 +02:00
Linus Torvalds
670c039dee - Stop using LP855X Platform Data to control regulators
- Move PWM8941 WLED driver into Backlight
  - Remove invalid use of IS_ERR_VALUE() macro
  - Remove duplicate check for NULL data before unregistering
  - Export I2C Device ID structure
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJV6FPVAAoJEFGvii+H/Hdh1NIP/2mcBwvmF8zgmTUALbRLKyAp
 3LXx0/Nh64Pjz2rDsZPclo4NLlq43d9xq/A3CBI4b00VgiofgRG/Cihhzo8nxhTu
 XN73TgVQ2CiNrQ0yn85dedoVEbv0cAlZYdyuHrp1SUUSPOUhaiRU2w6k7BkY0gc2
 8lkzmVnMOkQjT+Elj6wVBcPiojm333Tu5wE125W8t6XDOwDfpLoVkzcxcv/V7eIo
 pStB7u3MsXZ9kmG2S9aMSZX1PS6C772OeN1I7+3lFy67qiIDj3tQ+8MyaMFvWGdQ
 /w8+f4K8k0t1m1OJVLgsT4UKR/7qprTOvEXYGrsVPPwZqSOypRZOooPOQbAVtkV6
 qYsVYEnbsJerkCuAyWETL+H5eH+P56Zl66t6a9hgnzw4wKYarufo+xUe0b+ntmoO
 dtegXgUVryY1P9teXsnnWx24r4pfaCWunO1RUXSZABCK+0qEeXa2SM/PFtkCWwEd
 AGBp8Rcv9a2BHtY2oaii+rs6WFUH+CGeZ8rt1cKBZvT2gCjlTPb5WiGvCEnN3OBi
 BCWgTLILldSRG7ERW6P6W6WkpP9u6gz8BChLNe0PsoOoNLXElHj6VCAlusOc1kHU
 6WwvMpKcQ+SVMVNouFLv3Ur5K8sF7VkyaHDRoipeKufu0n3b3+AXEaRr/Ch1BsIh
 cdUHgYJSujzcD/Zx8crp
 =URbg
 -----END PGP SIGNATURE-----

Merge tag 'backlight-for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight

Pull backlight updates from Lee Jones:
 - Stop using LP855X Platform Data to control regulators
 - Move PWM8941 WLED driver into Backlight
 - Remove invalid use of IS_ERR_VALUE() macro
 - Remove duplicate check for NULL data before unregistering
 - Export I2C Device ID structure

* tag 'backlight-for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  backlight: tosa: Export I2C module alias information
  backlight: lp8788_bl: Delete a check before backlight_device_unregister()
  backlight: sky81452: Remove unneeded use of IS_ERR_VALUE() macro
  backlight: pm8941-wled: Move PM8941 WLED driver to backlight
  backlight: lp855x: Use private data for regulator control
2015-09-04 11:40:40 -07:00
Linus Torvalds
ff474e8ca8 powerpc updates for 4.3
- Support "hybrid" iommu/direct DMA ops for coherent_mask < dma_mask from Benjamin Herrenschmidt
  - EEH fixes for SRIOV from Gavin
  - Introduce rtas_get_sensor_fast() for IRQ handlers from Thomas Huth
  - Use hardware RNG for arch_get_random_seed_* not arch_get_random_* from Paul Mackerras
  - Seccomp filter support from Michael Ellerman
  - opal_cec_reboot2() handling for HMIs & machine checks from Mahesh Salgaonkar
  - Add powerpc timebase as a trace clock source from Naveen N. Rao
  - Misc cleanups in the xmon, signal & SLB code from Anshuman Khandual
  - Add an inline function to update POWER8 HID0 from Gautham R. Shenoy
  - Fix pte_pagesize_index() crash on 4K w/64K hash from Michael Ellerman
  - Drop support for 64K local store on 4K kernels from Michael Ellerman
  - move dma_get_required_mask() from pnv_phb to pci_controller_ops from Andrew Donnellan
  - Initialize distance lookup table from drconf path from Nikunj A Dadhania
  - Enable RTC class support from Vaibhav Jain
  - Disable automatically blocked PCI config from Gavin Shan
  - Add LEDs driver for PowerNV platform from Vasant Hegde
  - Fix endianness issues in the HVSI driver from Laurent Dufour
  - Kexec endian fixes from Samuel Mendoza-Jonas
  - Fix corrupted pdn list from Gavin Shan
  - Fix fenced PHB caused by eeh_slot_error_detail() from Gavin Shan
 
  - Freescale updates from Scott: Highlights include 32-bit memcpy/memset
    optimizations, checksum optimizations, 85xx config fragments and updates,
    device tree updates, e6500 fixes for non-SMP, and misc cleanup and minor
    fixes.
 
  - A ton of cxl updates & fixes:
   - Add explicit precision specifiers from Rasmus Villemoes
   - use more common format specifier from Rasmus Villemoes
   - Destroy cxl_adapter_idr on module_exit from Johannes Thumshirn
   - Destroy afu->contexts_idr on release of an afu from Johannes Thumshirn
   - Compile with -Werror from Daniel Axtens
   - EEH support from Daniel Axtens
   - Plug irq_bitmap getting leaked in cxl_context from Vaibhav Jain
   - Add alternate MMIO error handling from Ian Munsie
   - Allow release of contexts which have been OPENED but not STARTED from Andrew Donnellan
   - Remove use of macro DEFINE_PCI_DEVICE_TABLE from Vaishali Thakkar
   - Release irqs if memory allocation fails from Vaibhav Jain
   - Remove racy attempt to force EEH invocation in reset from Daniel Axtens
   - Fix + cleanup error paths in cxl_dev_context_init from Ian Munsie
   - Fix force unmapping mmaps of contexts allocated through the kernel api from Ian Munsie
   - Set up and enable PSL Timebase from Philippe Bergheaud
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJV5+GzAAoJEFHr6jzI4aWA0iAP/jcd0kNaNBzLgcDKKygKdgz4
 xn4EWu81vfMfZYWesb0ATrjlH0hLsRxSXoFUqUMhtJTa5kNAoCIaz/M8WBALS50h
 aT+i7br4WEU2j2FcaMyP3iAZx/2hl+2utODJSHPRWPkec1fUDBfEyBf++e520RWM
 HUQGIGZXh8yq7KMA96Pwhsvls9vOB8hS2UdU/NS8ff3J5jFvXC1/WmF2qfzJBS1V
 8iHyz26Jl8+dJ+et7iC2oD5XQAjIH1oJgOyPVPBzAQttfi8RjuVzRA30TfPBAUwI
 lC9nlmPy6bCe4kiQYWVB1z7GegHyW/9vkeuMj/u8mZbqpaayMEMZmd2C3iNDXNHx
 i2NSvdln539t4qWYsV2v6lVCfa/ayDHD73Wackj5Dk394tzXnpCPhxNzc2yKEd5v
 h7vwYc9jBhsbfSCSogaM+gSHJ1APgCidggHJMYYNA2nN2u6V62RpsMB7zp/1+Q2v
 yqYdD8oYF4Dm21x/ujaNFrlizROD46WS0UqdJ3yP6HAqRYIpRXtibmpECJgt1n5h
 HjADEci4hQ2UQxdMdp/Q5KZnPTJebBtrZrmkW5r6cZBUaTB5TVkFaEWN44CT/Loh
 tMNeA3qOBN06CaQS2WL3UUUWpbZq9fSbWuUZ5lWZDb5AOyRxe5eWVYNLkiyIXozY
 L24l1bYdBhXahnjoS/kc
 =n9+X
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc updates from Michael Ellerman:

 - support "hybrid" iommu/direct DMA ops for coherent_mask < dma_mask
   from Benjamin Herrenschmidt

 - EEH fixes for SRIOV from Gavin

 - introduce rtas_get_sensor_fast() for IRQ handlers from Thomas Huth

 - use hardware RNG for arch_get_random_seed_* not arch_get_random_*
   from Paul Mackerras

 - seccomp filter support from Michael Ellerman

 - opal_cec_reboot2() handling for HMIs & machine checks from Mahesh
   Salgaonkar

 - add powerpc timebase as a trace clock source from Naveen N.  Rao

 - misc cleanups in the xmon, signal & SLB code from Anshuman Khandual

 - add an inline function to update POWER8 HID0 from Gautham R.  Shenoy

 - fix pte_pagesize_index() crash on 4K w/64K hash from Michael Ellerman

 - drop support for 64K local store on 4K kernels from Michael Ellerman

 - move dma_get_required_mask() from pnv_phb to pci_controller_ops from
   Andrew Donnellan

 - initialize distance lookup table from drconf path from Nikunj A
   Dadhania

 - enable RTC class support from Vaibhav Jain

 - disable automatically blocked PCI config from Gavin Shan

 - add LEDs driver for PowerNV platform from Vasant Hegde

 - fix endianness issues in the HVSI driver from Laurent Dufour

 - kexec endian fixes from Samuel Mendoza-Jonas

 - fix corrupted pdn list from Gavin Shan

 - fix fenced PHB caused by eeh_slot_error_detail() from Gavin Shan

 - Freescale updates from Scott: Highlights include 32-bit memcpy/memset
   optimizations, checksum optimizations, 85xx config fragments and
   updates, device tree updates, e6500 fixes for non-SMP, and misc
   cleanup and minor fixes.

 - a ton of cxl updates & fixes:
    - add explicit precision specifiers from Rasmus Villemoes
    - use more common format specifier from Rasmus Villemoes
    - destroy cxl_adapter_idr on module_exit from Johannes Thumshirn
    - destroy afu->contexts_idr on release of an afu from Johannes
      Thumshirn
    - compile with -Werror from Daniel Axtens
    - EEH support from Daniel Axtens
    - plug irq_bitmap getting leaked in cxl_context from Vaibhav Jain
    - add alternate MMIO error handling from Ian Munsie
    - allow release of contexts which have been OPENED but not STARTED
      from Andrew Donnellan
    - remove use of macro DEFINE_PCI_DEVICE_TABLE from Vaishali Thakkar
    - release irqs if memory allocation fails from Vaibhav Jain
    - remove racy attempt to force EEH invocation in reset from Daniel
      Axtens
    - fix + cleanup error paths in cxl_dev_context_init from Ian Munsie
    - fix force unmapping mmaps of contexts allocated through the kernel
      api from Ian Munsie
    - set up and enable PSL Timebase from Philippe Bergheaud

* tag 'powerpc-4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (140 commits)
  cxl: Set up and enable PSL Timebase
  cxl: Fix force unmapping mmaps of contexts allocated through the kernel api
  cxl: Fix + cleanup error paths in cxl_dev_context_init
  powerpc/eeh: Fix fenced PHB caused by eeh_slot_error_detail()
  powerpc/pseries: Cleanup on pci_dn_reconfig_notifier()
  powerpc/pseries: Fix corrupted pdn list
  powerpc/powernv: Enable LEDS support
  powerpc/iommu: Set default DMA offset in dma_dev_setup
  cxl: Remove racy attempt to force EEH invocation in reset
  cxl: Release irqs if memory allocation fails
  cxl: Remove use of macro DEFINE_PCI_DEVICE_TABLE
  powerpc/powernv: Fix mis-merge of OPAL support for LEDS driver
  powerpc/powernv: Reset HILE before kexec_sequence()
  powerpc/kexec: Reset secondary cpu endianness before kexec
  powerpc/hvsi: Fix endianness issues in the HVSI driver
  leds/powernv: Add driver for PowerNV platform
  powerpc/powernv: Create LED platform device
  powerpc/powernv: Add OPAL interfaces for accessing and modifying system LED states
  powerpc/powernv: Fix the log message when disabling VF
  cxl: Allow release of contexts which have been OPENED but not STARTED
  ...
2015-09-03 16:41:38 -07:00
Simon Guinot
259f5ba308 leds: leds-ns2: depends on MACH_ARMADA_370
The leds-ns2 driver is also used by the n090401 board (Seagate NAS
4-Bay), which is based on the Marvell Armada-370 SoC.

Then this patch allows to select the leds-ns2 driver if MACH_ARMADA_370
is enabled. Additionally, this also updates the Kconfig help message.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-08-28 14:06:12 +02:00
Geert Uytterhoeven
6e3956cd53 leds: Allow compile test of LEDS_AAT1290 and LEDS_KTD2692 if !GPIOLIB
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

If COMPILE_TEST is enabled, relax the dependency on GPIOLIB for the
recently introduced symbols LEDS_AAT1290 and LEDS_KTD2692.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-08-28 14:05:59 +02:00
Geert Uytterhoeven
8232274195 leds: Allow compile test of GPIO consumers if !GPIOLIB
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
appropriate.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: linux-leds@vger.kernel.org
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-08-28 14:05:57 +02:00
Bjorn Andersson
7ddbc2423c backlight: pm8941-wled: Move PM8941 WLED driver to backlight
The Qualcomm PM8941 WLED block is used for backlight and should therefor
be in the backlight framework and not in the LED framework. This moves
the driver and adapts to the backlight api instead.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-08-25 08:41:56 +01:00
Vasant Hegde
84ad6e5cd3 leds/powernv: Add driver for PowerNV platform
This patch implements LED driver for PowerNV platform using the existing
generic LED class framework.

PowerNV platform has below type of LEDs:
  - System attention
      Indicates there is a problem with the system that needs attention.
  - Identify
      Helps the user locate/identify a particular FRU or resource in the
      system.
  - Fault
      Indicates there is a problem with the FRU or resource at the
      location with which the indicator is associated.

We register classdev structures for all individual LEDs detected on the
system through LED specific device tree nodes. Device tree nodes specify
what all kind of LEDs present on the same location code. It registers
LED classdev structure for each of them.

All the system LEDs can be found in the same regular path /sys/class/leds/.
We don't use LED colors. We use LED node and led-types property to form
LED classdev. Our LEDs have names in this format.

        <location_code>:<attention|identify|fault>

Any positive brightness value would turn on the LED and a zero value would
turn off the LED. The driver will return LED_FULL (255) for any turned on
LED and LED_OFF (0) for any turned off LED.

The platform level implementation of LED get and set state has been
achieved through OPAL calls. These calls are made available for the
driver by exporting from architecture specific codes.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Tested-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-08-20 18:19:07 +10:00
Linus Torvalds
13d45f79a2 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem updates from Bryan Wu:
 "In this cycle, we finished to merge patches for LED Flash class
  driver.

  Other than that we have some bug fixes and new drivers for LED
  controllers"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (33 commits)
  leds:lp55xx: fix firmware loading error
  leds: fix max77693-led build errors
  leds: fix aat1290 build errors
  leds: aat1290: pass flags parameter to devm_gpiod_get
  leds: ktd2692: pass flags parameter to devm_gpiod_get
  drivers/leds: don't use module_init in non-modular leds-cobalt-raq.c
  leds: aat1290: add support for V4L2 Flash sub-device
  DT: aat1290: Document handling external strobe sources
  leds: max77693: add support for V4L2 Flash sub-device
  media: Add registration helpers for V4L2 flash sub-devices
  v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it
  Documentation: leds: Add description of v4l2-flash sub-device
  leds: add BCM6358 LED driver
  leds: add DT binding for BCM6358 LED controller
  leds: fix brightness changing when software blinking is active
  Documentation: leds-lp5523: describe master fader attributes
  leds: lp5523: add master_fader support
  leds: leds-gpio: Allow compile test if !GPIOLIB
  leds: leds-gpio: Add missing #include <linux/of.h>
  gpiolib: Add missing dummies for the unified device properties interface
  ...
2015-07-01 19:09:11 -07:00
Milo Kim
b67893206f leds:lp55xx: fix firmware loading error
LP55xx driver uses not firmware file but raw data to load program through
the firmware interface.(Documents/leds/leds-lp55xx.txt)

  For example, here is how to run blinking green channel pattern.
  (The second engine is seleted and MUX is mapped to 'RGB' mode)
  echo 2 > /sys/bus/i2c/devices/xxxx/select_engine
  echo "RGB" > /sys/bus/i2c/devices/xxxx/engine_mux
  echo 1 > /sys/class/firmware/lp5562/loading
  echo "4000600040FF6000" > /sys/class/firmware/lp5562/data
  echo 0 > /sys/class/firmware/lp5562/loading
  echo 1 > /sys/bus/i2c/devices/xxxx/run_engine

However, '/sys/class/firmware/<device name>' is not created after the
firmware loader user helper was introduced.
This feature is used in the case below.

  As soon as the firmware download is requested by the driver, firmware
  class subsystem tries to find the binary file.
  If it gets failed, then it just falls back to user helper to load
  raw data manually. Here, you can see the device file under
  /sys/class/firmware/.

To make it happen, LP55xx driver requires two configurations.

  1. Enable CONFIG_FW_LOADER_USER_HELPER_FALLBACK in Kconfig
  2. Set option, 'FW_OPT_USERHELPER' on requesting the firmware data.
     It means the second option should be 'false' in
     request_firmware_nowait().
     This option enables to load firmware data manually by calling
     fw_load_from_user_helper().

Cc: linux-leds@vger.kernel.org
Signed-off-by: Milo Kim <milo.kim@ti.com>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-06-29 10:10:57 -07:00
Jacek Anaszewski
10c19c9eb2 leds: fix max77693-led build errors
Fix build errors when LEDS_MAX77693=y and V4L2_FLASH_LED_CLASS=m
by restricting LEDS_MAX77693 to =m if V4L2_FLASH_LED_CLASS=m.

drivers/leds/leds-max77693.c:1062: undefined reference to `v4l2_flash_release'
drivers/leds/leds-max77693.c:1068: undefined reference to `v4l2_flash_release'
drivers/built-in.o: In function `max77693_register_led':
drivers/leds/leds-max77693.c:968: undefined reference to `v4l2_flash_init'
drivers/built-in.o: In function `max77693_led_probe':
drivers/leds/leds-max77693.c:1048: undefined reference to `v4l2_flash_release'

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-06-29 10:09:12 -07:00
Randy Dunlap
58d1809b9d leds: fix aat1290 build errors
Fix build errors when LEDS_AAT1290=y and V4L2_FLASH_LED_CLASS=m
by restricting LEDS_AAT1290 to =m if V4L2_FLASH_LED_CLASS=m.

drivers/built-in.o: In function `aat1290_led_remove':
leds-aat1290.c:(.text+0xe5d77): undefined reference to `v4l2_flash_release'
drivers/built-in.o: In function `aat1290_led_probe':
leds-aat1290.c:(.text+0xe6494): undefined reference to `v4l2_flash_init'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-06-29 10:07:45 -07:00
Linus Torvalds
14738e0331 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem updates from Dmitry Torokhov:
 "Thanks to Samuel Thibault input device (keyboard) LEDs are no longer
  hardwired within the input core but use LED subsystem and so allow use
  of different triggers; Hans de Goede did a large update for the ALPS
  touchpad driver; we have new TI drv2665 haptics driver and DA9063
  OnKey driver, and host of other drivers got various fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (55 commits)
  Input: pixcir_i2c_ts - fix receive error
  MAINTAINERS: remove non existent input mt git tree
  Input: improve usage of gpiod API
  tty/vt/keyboard: define LED triggers for VT keyboard lock states
  tty/vt/keyboard: define LED triggers for VT LED states
  Input: export LEDs as class devices in sysfs
  Input: cyttsp4 - use swap() in cyttsp4_get_touch()
  Input: goodix - do not explicitly set evbits in input device
  Input: goodix - export id and version read from device
  Input: goodix - fix variable length array warning
  Input: goodix - fix alignment issues
  Input: add OnKey driver for DA9063 MFD part
  Input: elan_i2c - add product IDs FW names
  Input: elan_i2c - add support for multi IC type and iap format
  Input: focaltech - report finger width to userspace
  tty: remove platform_sysrq_reset_seq
  Input: synaptics_i2c - use proper boolean values
  Input: psmouse - use true instead of 1 for boolean values
  Input: cyapa - fix a few typos in comments
  Input: stmpe-ts - enforce device tree only mode
  ...
2015-06-24 19:56:58 -07:00
Jacek Anaszewski
ac69b9038f leds: aat1290: add support for V4L2 Flash sub-device
Add support for V4L2 Flash sub-device to the aat1290 LED Flash class
driver. The support allows for V4L2 Flash sub-device to take the control
of the LED Flash class device.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-06-22 13:56:46 -07:00
Samuel Thibault
f60c8ba77d Input: export LEDs as class devices in sysfs
This change creates a new input handler called "leds" that exports LEDs on input
devices as standard LED class devices in sysfs and allows controlling their
state via sysfs or via any of the standard LED triggers. This allows to
re-purpose and reassign LDEs on the keyboards to represent states other
than the standard keyboard states (CapsLock, NumLock, etc).

The old API of controlling input LEDs by writing into /dev/input/eventX
devices is still present and will take precedence over accessing via LEDs
subsystem (i.e. it may override state set by a trigger). If input device is
"grabbed" then requests coming through LED subsystem will be ignored.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-06-11 18:18:11 -07:00
Álvaro Fernández Rojas
589fca16c1 leds: add BCM6358 LED driver
This adds support for the LED controller on Broadcom's BCM6358.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-05-25 13:26:48 -07:00
Geert Uytterhoeven
9ab1963d83 leds: leds-gpio: Allow compile test if !GPIOLIB
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

Relax the dependency of LEDS_GPIO on GPIOLIB if COMPILE_TEST is
enabled.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-05-25 13:26:46 -07:00
Ingi Kim
b7da8c5c72 leds: Add ktd2692 flash LED driver
This patch adds a driver to support the ktd2692 flash LEDs.
ktd2692 can control flash current by ExpressWire interface.

Signed-off-by: Ingi Kim <ingi2.kim@samsung.com>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-05-25 13:26:44 -07:00
Álvaro Fernández Rojas
fd7b025a23 leds: add BCM6328 LED driver
This adds support for the LED controller on Broadcom's BCM6328.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-05-04 11:22:28 -07:00
Jacek Anaszewski
49c34b8e0f leds: Add driver for AAT1290 flash LED controller
This patch adds a driver for the 1.5A Step-Up Current Regulator
for Flash LEDs. The device is programmed through a Skyworks proprietary
AS2Cwire serial digital interface.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-05-04 11:21:16 -07:00
Jacek Anaszewski
a43f6a86ad leds: Add support for max77693 mfd flash cell
This patch adds led-flash support to Maxim max77693 chipset.
A device can be exposed to user space through LED subsystem
sysfs interface. Device supports up to two leds which can
work in flash and torch mode. The leds can be triggered
externally or by software.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-05-04 11:18:48 -07:00
Andrew Lunn
e370d010a5 leds: tlc591xx: Driver for the TI 8/16 Channel i2c LED driver
The TLC59116 is an I2C bus controlled 16-channel LED driver.  The
TLC59108 is an I2C bus controlled 8-channel LED driver, which is very
similar to the TLC59116. Each LED output has its own 8-bit
fixed-frequency PWM controller to control the brightness of the LED.
The LEDs can also be fixed off and on, making them suitable for use as
GPOs.

This is based on a driver from Belkin, but has been extensively
rewritten and extended to support both 08 and 16 versions.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Imre Kaloz <kaloz@openwrt.org>
Cc: Matthew.Fatheree@belkin.com
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-05-04 11:05:54 -07:00
Courtney Cavin
93c64f1ea1 leds: add Qualcomm PM8941 WLED driver
This adds support for the WLED ('White' LED) block on Qualcomm's
PM8941 PMICs.

(cooloney@gmail.com: remove unneeded semicolon)

Signed-off-by: Courtney Cavin <courtney.cavin@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-03-30 11:55:49 -07:00
Jacek Anaszewski
7aea8389a7 leds: Add LED Flash class extension to the LED subsystem
Some LED devices support two operation modes - torch and flash.
This patch provides support for flash LED devices in the LED subsystem
by introducing new sysfs attributes and kernel internal interface.
The attributes being introduced are: flash_brightness, flash_strobe,
flash_timeout, max_flash_timeout, max_flash_brightness, flash_fault,
flash_sync_strobe and available_sync_leds. All the flash related
features are placed in a separate module.

The modifications aim to be compatible with V4L2 framework requirements
related to the flash devices management. The design assumes that V4L2
sub-device can take of the LED class device control and communicate
with it through the kernel internal interface. When V4L2 Flash sub-device
file is opened, the LED class device sysfs interface is made
unavailable.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-01-26 14:59:08 -08:00
Axel Lin
2969bb18f8 leds: lp8860: Fix module dependency
The driver should select REGMAP_I2C rather than depend on it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-12-01 14:49:42 -08:00
Dan Murphy
7a8685accb leds: lp8860: Introduce TI lp8860 4 channel LED driver
Introduce the Texas Instruments lp8860
4 channel LED driver.

This driver configures the device in display cluster mode
as this seems to be the most used configuration at the
time of the driver configuration.

For more product information please see the link below:
http://www.ti.com/product/lp8860-q1

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-11-19 10:33:06 -08:00
Linus Torvalds
40c43269cf New driver for menf21bmc.
Convert k10temp, smsc47b397, da9052, da9055 to new hwmon API.
 Register ntc_thermistor driver with thermal subsystem.
 Add support for F15h M60h to k10temp driver.
 Add driver for MEN14F021P00 BMC HWMON driver; this required a merge
 with tag mfd-hwmon-leds-watchdog-v3.18.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUNZQwAAoJEMsfJm/On5mBxZEQAIf555P39+4fkRIrf3oYUuC2
 q1tXNP0u8Z74eDFfwYYobt+NCJG5KW3H3kFaO5WCTjySfVwjUin9Fc6DkLl2m3U+
 4FfH/2rO1y1upVRQemLAhe7BAYJAzABuNFWbLqqbGbZytyf5sHzhP52vjJ5VNmvr
 5zcn/sGJdB5M9tj3isvfrac0itNu+D7K3qxknk4wI5gb6YzKg+uovXscPVx4Xa7w
 eHKXJWITtBAZdD5bDV5YAzlTR15ASG3h+yyV7G5rKgslYyCMuRfIDm8Rl5zzHUmq
 DjLwwib469NMii6CjdC7kEpYOgJ2ZxK/2XQ5IAeGax8GLdIHB6lhp3GrXIzzRwiW
 5mtsMdRB7y41p050rIXN7AIXGVqSvtZtKf0r8w1p5YElat/wtX9gv0lGTgOq4sSa
 0SOE7E6W0cfe75dYgJP/6HIkuZZ7PweBelQYDfWrN00u/rdIcwC2nRnW/nDbctkr
 TmQLiS0ql2mXPWXD+Lk9v3bUALuYOPuQpX2aARj7en7jeBagP6KX0d70GaoAEzGk
 Gw6z4X4gI3TasuIck4LZx3kaiijEnDOgnIaEQah4b3k7ABEiuOYVBBpnWvqECaSD
 p9/lwFAs2POCsYSuADiclzxH6FLCMRJLE2V7dgMun9uK60o+0pGUqBL1PG/5/w+r
 jGdB/75PCOEn3Y/VlfZg
 =vI5p
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 - new driver for menf21bmc.
 - convert k10temp, smsc47b397, da9052, da9055 to new hwmon API.
 - register ntc_thermistor driver with thermal subsystem.
 - add support for F15h M60h to k10temp driver.
 - add driver for MEN14F021P00 BMC HWMON driver; this required a merge
   with tag mfd-hwmon-leds-watchdog-v3.18

* tag 'hwmon-for-linus-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (ab8500) Call kernel_power_off instead of pm_power_off
  hwmon: (menf21bmc) Introduce MEN14F021P00 BMC HWMON driver
  leds: leds-menf21bmc: Introduce MEN 14F021P00 BMC LED driver
  watchdog: menf21bmc_wdt: Introduce MEN 14F021P00 BMC Watchdog driver
  mfd: menf21bmc: Introduce MEN 14F021P00 BMC MFD Core driver
  hwmon: (ntc_thermistor) Add ntc thermistor to thermal subsystem as a sensor.
  hwmon: (smsc47b397) Convert to devm_hwmon_device_register_with_groups
  MAINTAINERS: add entry for the PWM fan driver
  hwmon: (k10temp) Convert to devm_hwmon_device_register_with_groups
  hwmon: (k10temp) Add support for F15h M60h
  hwmon: (da9052) Convert to devm_hwmon_device_register_with_groups
  hwmon: (da9055) Convert to devm_hwmon_device_register_with_groups
  hwmon: (ads1015) Use of_property_read_u32 at appropriate places
2014-10-10 16:40:14 -04:00
Linus Torvalds
8b45bc892e ARM: SoC driver updates for 3.18
These are changes for drivers that are intimately tied to some SoC
 and for some reason could not get merged through the respective
 subsystem maintainer tree.
 
 Most of the new code is for the Keystone Navigator driver, which is
 new base support that is going to be needed for their hardware
 accelerated network driver and other units.
 
 Most of the commits are for moving old code around from at91 and omap
 for things that are done in device drivers nowadays.
 
 - at91: move reset, poweroff, memory and clocksource code into drivers
   directories
 - socfpga: add edac driver (through arm-soc, as requested by Boris)
 - omap: move omap-intc code to drivers/irqchip
 - sunxi: added an RTC driver for sun6i
 - omap: mailbox driver related changes
 - keystone: support for the "Navigator" component
 - versatile: new reboot, led and soc drivers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAVDWWQGCrR//JCVInAQKX7Q//bDkoseKCZsGaXN7vfQ2YhT3SAc52mROV
 YQKdNmtMUrHqDgngATZTx5ogOh1hInnqueFjGGhfMYsHQO1Vj8+odj0r+4jhjuUY
 3YfY+qZ+91tq33JlUOhKn+mfVMdxJc8XarGgR6MSWYkqWVYCtLtBluum7hKm2UJ6
 /e4hd2zzImX5ATwj/LXWLx5eTf1qAVFGWzNUph1DrW+1V5lOu58X4gKwk1QOCVEh
 Pa0GV9oRTkjoswwz9drzjeFtie2yofQ2mygj6QKxg5NsosIF0+B8kJ61Sxwg56Ak
 tF+qn1hGtB2cDQkpxK4o2cZgCELhkh5Aqgol/vZUS1DMBSUEGCV9PPp2eOW83r3B
 0zsTgsShyVcTh7khdpQmHNRigvcc7e69LaAGC4o/RxaZpCU/LUNCQ+/iqVExSE8A
 VNEXr+JNxGxhj3m9KUHuEktdWx1oNvaYR8Rr4RPr6EWR8R6emJ04I7kXInvzhJZL
 HOGh75vSuAU83FrsP8fFRLadoHNVDXylAs38BPfGEMngVpjvwJLgQ3+729CwW+Q4
 +xQXAKSwKfr8xA8eg6wBSbFcwnEW4QwRqFqQ5XPw7zTZkCZbiLtvn3JpI5bH5A5Q
 /d2D+M2vFbB7VbWJBM4etO95eNS/pfhqJhcQh4t0DjXjoW6WqLiHCxhEx8Ogfvop
 /4ckyGvtEOI=
 =POJD
 -----END PGP SIGNATURE-----

Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC driver updates from Arnd Bergmann:
 "These are changes for drivers that are intimately tied to some SoC and
  for some reason could not get merged through the respective subsystem
  maintainer tree.

  Most of the new code is for the Keystone Navigator driver, which is
  new base support that is going to be needed for their hardware
  accelerated network driver and other units.

  Most of the commits are for moving old code around from at91 and omap
  for things that are done in device drivers nowadays.

   - at91: move reset, poweroff, memory and clocksource code into
     drivers directories
   - socfpga: add edac driver (through arm-soc, as requested by Boris)
   - omap: move omap-intc code to drivers/irqchip
   - sunxi: added an RTC driver for sun6i
   - omap: mailbox driver related changes
   - keystone: support for the "Navigator" component
   - versatile: new reboot, led and soc drivers"

* tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (92 commits)
  bus: arm-ccn: Fix spurious warning message
  leds: add device tree bindings for register bit LEDs
  soc: add driver for the ARM RealView
  power: reset: driver for the Versatile syscon reboot
  leds: add a driver for syscon-based LEDs
  drivers/soc: ti: fix build break with modules
  MAINTAINERS: Add Keystone Multicore Navigator drivers entry
  soc: ti: add Keystone Navigator DMA support
  Documentation: dt: soc: add Keystone Navigator DMA bindings
  soc: ti: add Keystone Navigator QMSS driver
  Documentation: dt: soc: add Keystone Navigator QMSS bindings
  rtc: sunxi: Depend on platforms sun4i/sun7i that actually have the rtc
  rtc: sun6i: Add sun6i RTC driver
  irqchip: omap-intc: remove unnecessary comments
  irqchip: omap-intc: correct maximum number or MIR registers
  irqchip: omap-intc: enable TURBO idle mode
  irqchip: omap-intc: enable IP protection
  irqchip: omap-intc: remove unnecesary of_address_to_resource() call
  irqchip: omap-intc: comment style cleanup
  irqchip: omap-intc: minor improvement to omap_irq_pending()
  ...
2014-10-08 17:37:16 -04:00
Linus Walleij
535f09cc1c leds: add a driver for syscon-based LEDs
This makes it possible to create a set of LEDs from a syscon
MFD instance, which is lean mean and clean on the ARM
reference designs and can replace the Versatile LEDs driver
in the long run, as well as other custom syscon LEDs drivers.

Cc: Bryan Wu <cooloney@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
[Fixed cocinelle warnings]
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-09-26 00:25:41 +02:00
Andreas Werner
38433639af leds: leds-menf21bmc: Introduce MEN 14F021P00 BMC LED driver
Added driver to support the 14F021P00 BMC LEDs.
The BMC is a Board Management Controller including four LEDs which
can be switched on and off.

Signed-off-by: Andreas Werner <andreas.werner@men.de>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-09-24 15:36:30 +01:00
Andrew Lunn
1093d8cac4 leds: Remove ARCH_KIRKWOOD dependency
mach-kirkwood has been removed, now that kirkwood lives in mach-mvebu.
Use MACH_KIRKWOOD which will be set when kirkwood is built as part of
mach-mvebu.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Bryan Wu <cooloney@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: linux-leds@vger.kernel.org
Link: https://lkml.kernel.org/r/1409417172-6846-5-git-send-email-andrew@lunn.ch
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-09-09 14:39:51 +00:00
Linus Torvalds
10c8e05620 ARM: SoC driver changes for 3.17
A handful of driver-related changes. We've had a bunch of them going in through
 other branches as well, so it's only a part of what we really have this release.
 
 Larger pieces are:
 
 * Removal of a now unused PWM driver for atmel
   - This includes AVR32 changes that have been appropriately acked.
 * Performance counter support for the arm CCN interconnect
 * OMAP mailbox driver cleanups and consolidation
 * PCI and SATA PHY drivers for SPEAr 13xx platforms
 * Redefinition (with backwards compatibility!) of PCI DT bindings for Tegra to
   better model regulators/power.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJT5DrJAAoJEIwa5zzehBx3wkkP/iwEfEK5mMon9KEe4DcKTKNq
 Z6xyWuMQNHKdfBFpABs6AsHQCKDc7KK6gN3+2zLLHEJ4XGDPZ2g2NaX3oRPJlaay
 BDK7rQfIZyi4tmbOnlEv1BDTYgirYBPMwk9RyNo/04Ug3W+Y67aSVo44zkNFBWaJ
 GbcX/zYsrsfvdawuQMW6V/A835s3Kq5Zhv1ikPr8gDDjswZRBAT6i7FYpBSHQ8K8
 bH6C1891Xit6rxXSLXJyrtM8CAet7PtLTqNr/IKdUaJnGD+fJm5EonxW+g8gvhN8
 gOEkm3nM60++kdDlzZCQVNr0m1+ih6NNCr6bDLO6rIRpAJM2O+YrN1rWuZaJOu1A
 pIvifk+wWHT+o52pXk8g9fK4n/ZJydK3IBzDePHMrIROOEiW5tLE3WA+u3NSfMfH
 WegMt9E2dcB+5gXPeejZ9gFbAHnh2S1oVTZfCYXtuOHrYiEU9U0FA3eRYvJEE2po
 k8sdiOn7Vc65O1QZ+xZNbLABpAHaye7X2evOJyhSutzHE/AtUvT4vuCAZ0tggXyD
 E1qVKngVW/NvcoFbwYeidq4bOVgiAEn3idZgF5gEq1mq7LzetXUQAcZAOQfLWHLQ
 RrXufS7Ez8pSCG74y0AFReVfQH2PgWHPqGUGj99NXgQauexc/vR1Hc5Iqb8liGNJ
 n6i8RqvvQ4KYcmHEXDIT
 =fsP6
 -----END PGP SIGNATURE-----

Merge tag 'drivers-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC driver changes from Olof Johansson:
 "A handful of driver-related changes.  We've had a bunch of them going
  in through other branches as well, so it's only a part of what we
  really have this release.

  Larger pieces are:

   - Removal of a now unused PWM driver for atmel
     [ This includes AVR32 changes that have been appropriately acked ]
   - Performance counter support for the arm CCN interconnect
   - OMAP mailbox driver cleanups and consolidation
   - PCI and SATA PHY drivers for SPEAr 13xx platforms
   - Redefinition (with backwards compatibility!) of PCI DT bindings for
     Tegra to better model regulators/power"

Note: this merge also fixes up the semantic conflict with the new
calling convention for devm_phy_create(), see commit f0ed817638 ("phy:
core: Let node ptr of PHY point to PHY and not of PHY provider") that
came in through Greg's USB tree.

Semantic merge patch by Stephen Rothwell <sfr@canb.auug.org.au> through
the next tree.

* tag 'drivers-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (38 commits)
  bus: arm-ccn: Fix error handling at event allocation
  mailbox/omap: add a parent structure for every IP instance
  mailbox/omap: remove the private mailbox structure
  mailbox/omap: consolidate OMAP mailbox driver
  mailbox/omap: simplify the fifo assignment by using macros
  mailbox/omap: remove omap_mbox_type_t from mailbox ops
  mailbox/omap: remove OMAP1 mailbox driver
  mailbox/omap: use devm_* interfaces
  bus: ARM CCN: add PERF_EVENTS dependency
  bus: ARM CCN PMU driver
  PCI: spear: Remove spear13xx_pcie_remove()
  PCI: spear: Fix Section mismatch compilation warning for probe()
  ARM: tegra: Remove legacy PCIe power supply properties
  PCI: tegra: Remove deprecated power supply properties
  PCI: tegra: Implement accurate power supply scheme
  ARM: SPEAr13xx: Update defconfigs
  ARM: SPEAr13xx: Add pcie and miphy DT nodes
  ARM: SPEAr13xx: Add bindings and dt node for misc block
  ARM: SPEAr13xx: Fix static mapping table
  phy: Add drivers for PCIe and SATA phy on SPEAr13xx
  ...
2014-08-08 11:34:32 -07:00
Linus Walleij
4da498fc65 leds: add driver for the iPAQ micro
This adds a driver for the iPAQ microcontroller LED.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-07-23 13:33:04 -07:00
Alexandre Belloni
3088883b59 leds: atmel-pwm: remove obsolete driver
The leds-atmel-pwm driver is now obsolete. It is not used by any mainlined
boards and is replaced by the generic leds_pwm with the pwm-atmel driver using
the generic PWM framework.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-07-09 15:13:35 +02:00
Linus Torvalds
7c574cf6ae Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED updates from Bryan Wu:
 "I just found merge window is open and I'm quite busy and almost forget
  to send out this pull request.  Thanks Russell and Alexandre ping me
  about this.

  So basically we got some clean up and leds-pwm fixing patches from
  Russell"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
  leds: Remove duplicated OOM message for individual driver
  drivers/leds: Replace __get_cpu_var use through this_cpu_ptr
  leds: lp55xx: add DT bindings for LP55231
  leds: 88pm860x: Fix missing refcount decrement for parent of_node
  leds: 88pm860x: Use of_get_child_by_name
  leds: leds-pwm: add DT support for LEDs wired to supply
  leds: leds-pwm: implement PWM inversion
  leds: leds-pwm: convert OF parsing code to use led_pwm_add()
  leds: leds-pwm: provide a common function to setup a single led-pwm device
  leds: pca9685: Remove leds-pca9685 driver
  dell-led: add mic mute led interface
2014-06-12 13:08:09 -07:00
Linus Torvalds
d6b92c2c37 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid into next
Pull HID patches from Jiri Kosina:
 - RMI driver for Synaptics touchpads, by Benjamin Tissoires, Andrew
   Duggan and Jiri Kosina
 - cleanup of hid-sony driver and improved support for Sixaxis and
   Dualshock 4, by Frank Praznik
 - other usual small fixes and support for new device IDs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (29 commits)
  HID: thingm: thingm_fwinfo[] doesn't need to be global
  HID: core: add two new usages for digitizer
  HID: hid-sensor-hub: new device id and quirk for STM Sensor hub
  HID: usbhid: enable NO_INIT_REPORTS quirk for Semico USB Keykoard
  HID: hid-sensor-hub: Set report quirk for Microsoft Surface
  HID: debug: add labels for HID Sensor Usages
  HID: uhid: Use kmemdup instead of kmalloc + memcpy
  HID: rmi: do not handle touchscreens through hid-rmi
  HID: quirk for Saitek RAT7 and MMO7 mices' mode button
  HID: core: fix validation of report id 0
  HID: rmi: fix masks for x and w_x data
  HID: rmi: fix wrong struct field name
  HID: rmi: do not fetch more than 16 bytes in a query
  HID: rmi: check for the existence of some optional queries before reading query 12
  HID: i2c-hid: hid report descriptor retrieval changes
  HID: add missing hid usages
  HID: hid-sony - allow 3rd party INTEC controller to turn off all leds
  HID: sony: Add blink support to the Sixaxis and DualShock 4 LEDs
  HID: sony: Initialize the controller LEDs with a device ID value
  HID: sony: Use the controller Bluetooth MAC address as the unique value in the battery name string
  ...
2014-06-04 08:52:36 -07:00
Jiri Kosina
beea3f4a29 Merge branches 'for-3.16/i2c-hid', 'for-3.16/rmi4', 'for-3.16/sony' and 'for-3.16/thingm' into for-linus 2014-06-04 13:09:43 +02:00
Arnd Bergmann
a501fd37f7 leds: Fix build for LEDS_CLASS=m on versatile
I got a build error today, since LEDS_VERSATILE can be built-in while LEDS_CLASS
is a module:

drivers/built-in.o: In function `versatile_leds_probe':
:(.text+0x155020): undefined reference to `led_classdev_register'

I suggest we turn this option into 'tristate' so that the dependency
tracking works correctly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-10 20:11:49 -07:00
Axel Lin
2ce112f1e7 leds: pca9685: Remove leds-pca9685 driver
This driver is replaced by pwm-pca9685 driver and there is no user uses this
driver in current tree. So remove it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Acked-by: Maximilian Güntner <maximilian.guentner@gmail.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-05-08 14:28:07 +08:00
Olof Johansson
186a73dc9a Several mach kconfig clean-ups of redundant selects
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTZ6LSAAoJEMhvYp4jgsXisd8IAIft+w9y3JEVv+7XZLFc1aHJ
 GrkQiVDjTw1MWVbxRzcBYDHvwyfiVaTUDd//YtKJ2AAM50GvxUWZCV5AslXc4db4
 oQ5Yj6QgymggmbtBmYCYrQowYrjer7hxW6BUpHVA8fyexHCrzw8EWUbcnR/TcLaM
 d8ECw8FdE0ZyPzQt3rVmiwHpSaw81BXTaPXxYuDGsl+TfnSVLhn+JIuDIRK/yS73
 A4QbeA2ekpp7gtqm2EPEIAUCsPfxig8rFzatpfZCnzBZSiRJHe9zxrwe9N49nhsq
 YPF5gTURjEQhoraxpbt7psKQYDqH0Ur4n9bgI0UnBcLywikk2cMuwjXu7fmc6qk=
 =6DyO
 -----END PGP SIGNATURE-----

Merge tag 'kconfig-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux into next/cleanup

Merge Kconfig cleanups from Rob Herring:

Several mach kconfig clean-ups of redundant selects

* tag 'kconfig-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  ARM: qcom: clean-up unneeded kconfig selects
  ARM: bcm: clean-up unneeded kconfig selects
  ARM: mvebu: clean-up unneeded kconfig selects
  + Linux 3.15-rc2

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-05 14:18:49 -07:00
Vivien Didelot
f70ed8a6f7 HID: thingm: refactor blink(1) support
This patch refactors the way the thingm driver registers a blink(1) LED.
In order to make the driver simpler and more standard, drop the "rgb"
sysfs attribute and create one instance of LED class per RGB channel.

Actually, the name of the LED class instance registered for a blink(1)
device is "blink1::ABCD", where ABCD is the last 4 chars of the serial
number. The driver now registers 3 instances per RGB chip, named
"thingmX:{red,green,blue}:ledY" where X is the hidraw minor number and Y
is the RGB chip number (as seen by the firmware).

This patch also uses work queues to defer calls with the device, which
now allows triggers to work as expected with this LED device.

Also remove the brightness structure field and the brightness_get
backend, as it is already handled by the LED class, and changes the
prefix of functions and structures to thingm_ to match the driver name.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-04-15 14:42:51 +02:00
Linus Torvalds
4162877d3f Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED updates from Bryan Wu:
 "This cycle we got:
   - new driver for leds-mc13783
   - bug fixes
   - code cleanup"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
  leds: make sure we unregister a trigger only once
  leds: leds-pwm: properly clean up after probe failure
  leds: clevo-mail: Make probe function __init
  leds-ot200: Fix dependencies
  leds-gpio: of: introduce MODULE_DEVICE_TABLE for module autoloading
  leds: clevo-mail: remove __initdata marker
  leds: leds-ss4200: remove __initdata marker
  leds: blinkm: remove unnecessary spaces
  leds: lp5562: remove unnecessary parentheses
  leds: leds-ss4200: remove DEFINE_PCI_DEVICE_TABLE macro
  leds: leds-s3c24xx: Trivial cleanup in header file
  drivers/leds: delete non-required instances of include <linux/init.h>
  leds: leds-gpio: add retain-state-suspended property
  leds: leds-mc13783: Add devicetree support
  leds: leds-mc13783: Remove unnecessary cleaning of registers on exit
  leds: leds-mc13783: Use proper "max_brightness" value fo LEDs
  leds: leds-mc13783: Use LED core PM functions
  leds: leds-mc13783: Add MC34708 LED support
  leds: Turn off led if blinking is disabled
  ledtrig-cpu: Handle CPU hot(un)plugging
2014-04-10 09:06:10 -07:00
Linus Walleij
1dc7d8374d ARM/leds: move ARM Versatile LED driver to leds subsystem
Now that we have converted this driver to a real platform device
module-based thing, we move the driver down into the LEDs
subsystem and rename the config option to LEDS_VERSATILE.

Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Pawel Moll <pawel.moll@arm.com>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-03-28 10:54:15 +01:00
Jean Delvare
d9e8928f83 leds-ot200: Fix dependencies
The Bachmann OT200 is a Geode-based device, so OT200-specific drivers
are only useful on X86_32, except for build testing.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-03-11 10:29:08 -07:00
Alexander Shiyan
a59ce6584d leds: leds-mc13783: Add MC34708 LED support
This patch adds support for two LEDs on MC34708 PMIC.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27 09:56:55 -08:00
Andrew Lunn
ff1f0018cf drivers: Enable building of Kirkwood drivers for mach-mvebu
With the move of kirkwood into mach-mvebu, drivers Kconfig need
tweeking to allow the kirkwood specific drivers to be built.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-24 17:28:31 +00:00
Maximilian Güntner
bb6febdc90 leds: Added driver for the NXP PCA9685 I2C chip
The NXP PCA9685 supports 16 channels/leds using a 12-bit PWM (4095
levels of brightness)
This driver supports configuration using platform_data.

Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-10-22 10:57:35 -07:00
Linus Torvalds
5223161dc0 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull led updates from Bryan Wu:
 "Sorry for the late pull request, since I'm just back from vacation.

  LED subsystem updates for 3.12:
   - pca9633 driver DT supporting and pca9634 chip supporting
   - restore legacy device attributes for lp5521
   - other fixing and updates"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (28 commits)
  leds: wm831x-status: Request a REG resource
  leds: trigger: ledtrig-backlight: Fix invalid memory access in fb_event notification callback
  leds-pca963x: Fix device tree parsing
  leds-pca9633: Rename to leds-pca963x
  leds-pca9633: Add mutex to the ledout register
  leds-pca9633: Unique naming of the LEDs
  leds-pca9633: Add support for PCA9634
  leds: lp5562: use LP55xx common macros for device attributes
  Documentation: leds-lp5521,lp5523: update device attribute information
  leds: lp5523: remove unnecessary writing commands
  leds: lp5523: restore legacy device attributes
  leds: lp5523: LED MUX configuration on initializing
  leds: lp5523: make separate API for loading engine
  leds: lp5521: remove unnecessary writing commands
  leds: lp5521: restore legacy device attributes
  leds: lp55xx: add common macros for device attributes
  leds: lp55xx: add common data structure for program
  Documentation: leds: Fix a typo
  leds: ss4200: Fix incorrect placement of __initdata
  leds: clevo-mail: Fix incorrect placement of __initdata
  ...
2013-09-12 11:35:33 -07:00
Ricardo Ribalda Delgado
56a1740c21 leds-pca9633: Rename to leds-pca963x
The driver now supports the chips pca9633 and pca9634, therefore we
rename the files to more generic and meaningul names

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-08-26 17:22:14 -07:00
Ricardo Ribalda Delgado
af67384f01 leds-pca9633: Add support for PCA9634
Add support for PCA9634 chip, which belongs to the same family as the
9633 but with support for 8 outputs instead of 4.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-08-26 17:22:14 -07:00
Simon Guinot
d6d240bf52 leds: leds-netxbig: depends on ARCH_KIRKWOOD
With the DT conversion, the board Kconfig symbols MACH_ are going to be
removed. In order to prepare this removal, this patch replaces alls the
machines dependencies for leds-netxbig by ARCH_KIRKWOOD.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-08-26 17:22:11 -07:00
Simon Guinot
d6626d1052 leds: leds-ns2: depends on ARCH_KIRKWOOD
With the DT conversion, the board Kconfig symbols MACH_ are going to be
removed. In order to prepare this removal, this patch replaces alls the
machines dependencies for leds-ns2 by ARCH_KIRKWOOD.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-08-26 17:22:11 -07:00
Kim, Milo
33b3a561f4 leds: support new LP8501 device - another LP55xx common
LP8501 can drive up to 9 channels like LP5523.
LEDs can be controlled directly via the I2C and programmable engines are
supported.

LP55xx common driver
 LP8501 is one of LP55xx family device, so LP55xx common code are used.
 Chip specific data is defined in the structure, 'lp55xx_device_config'.

Differences between LP8501 and LP5523
 Different register layout for LED output control and others.
 LP8501 specific feature for separate output power selection.
 LP8501 doesn't support external clock detection.
 Different programming engine data.

LP8501 specific feature - output power selection
 Output channels are selected by power selection - Vout or Vdd.
 Separate power for VDD1-6 and VDD7-9 are available.
 It is configurable in the platform data.
 To support this feature, LP55xx DT structure and header are changed.
 Device tree binding is updated as well.

LED pattern data
 Example pattern data is updated in the driver documentation.

Signed-off-by: Milo Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-08-26 17:22:10 -07:00
Laurent Pinchart
ae3e4c2776 leds: Remove leds-renesas-tpu driver
The driver is superseded by the generic pwm-renesas-tpu driver used with
leds-pwm.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-22 10:16:54 +09:00