aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lp8860.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-07-25leds: lp8860: Use generic support for composing LED namesJacek Anaszewski1-19/+16
Switch to using generic LED support for composing LED class device name. While at it, avoid iterating through available child of nodes in favor of obtaining single expected child node using single call to of_get_next_available_child(). Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Tested-by: Dan Murphy <dmurphy@ti.com>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-5/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08leds: lp8860: Various fixes to align with LED frameworkDan Murphy1-8/+5
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-08leds: lp8860: Add DT parsing to retrieve the trigger nodeDan Murphy1-0/+4
Add the ability to parse the DT and set the default trigger mode for the LED. Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-01-08leds: lp8860: Update the dt parsing for LED labelingDan Murphy1-11/+12
Update the DT parsing for the label node so that the label is retrieved from the device child as opposed to being part of the parent. This will align this driver with the LED binding documentation Documentation/devicetree/bindings/leds/common.txt Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-01-08leds: lp8860: Add regulator enable during initDan Murphy1-1/+23
Add the regulator enable call during initialization. If init fails then disable the regulator. Also during init the gpio gets set low even on a passing case so add if everything passes then return. Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-01-08leds: lp8860: Fix linuxdoc format for structureDan Murphy1-1/+1
Fix the linuxdoc format defining the lp8860 structure. Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2016-01-04leds: lp8860: Remove work queueAndrew Lunn1-20/+7
Now the core implements the work queue, remove it from the drivers, and switch to using brightness_set_blocking op. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-08-28leds: lp8860: Constify reg_default tablesAxel Lin1-2/+2
These reg_default tables are not modified after initialized, so make them const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-03-30leds: lp8860: Fix typo in MODULE_DESCRIPTION in leds-lp8860.cMasanari Iida1-1/+1
This patch fix a spelling typo in MODULE_DESCRIPTION in leds-lp8860.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-03-02leds: lp8860: make use of devm_gpiod_get_optionalUwe Kleine-König1-5/+7
The probe function open coded a bad variant of devm_gpiod_get_optional using devm_gpiod_get and just ignoring all errors. In contrast to that devm_gpiod_get_optional returns NULL if there was no corresponding gpio specified in the device tree (or ACPI table) and fails if there is an error (or GPIOLIB is not enabled). Moreover since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output which allows some simplification. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-11-19leds: lp8860: Introduce TI lp8860 4 channel LED driverDan Murphy1-0/+491
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>