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>
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>
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>
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>
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>
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>
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>
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>
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 39b2bbe3d7 (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>
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>