History log of /linux-master/drivers/leds/leds-lp8860.c
Revision Date Author Comments
# d9ff8a8e 17-May-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

leds: Switch i2c drivers back to use .probe()

After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230517180559.166329-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones <lee@kernel.org>


# 6d19367b 15-Feb-2023 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

leds: lp8860: Remove duplicate NULL checks for gpio_desc

gpiod_*() API check already for the NULL, no need
to repeat that in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230215170403.84449-2-andriy.shevchenko@linux.intel.com


# 2956ad80 15-Feb-2023 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

leds: lp8860: Remove unused of_gpio,h

of_gpio.h provides a single function, which is not used in this driver.
Remove unused header.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230215170403.84449-1-andriy.shevchenko@linux.intel.com


# c3dab3a9 18-Nov-2022 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

leds: lp8860: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-284-uwe@kleine-koenig.org


# ed5c2f5f 15-Aug-2022 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

i2c: Make remove callback return void

The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.

Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Marek Behún <kabel@kernel.org> # for leds-turris-omnia
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> # for surface3_power
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for media/* + staging/media/*
Acked-by: Miguel Ojeda <ojeda@kernel.org> # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for versaclock5
Reviewed-by: Ajay Gupta <ajayg@nvidia.com> # for ucsi_ccg
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio
Acked-by: Peter Rosin <peda@axentia.se> # for i2c-mux-*, max9860
Acked-by: Adrien Grassein <adrien.grassein@gmail.com> # for lontium-lt8912b
Reviewed-by: Jean Delvare <jdelvare@suse.de> # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard <cminyard@mvista.com> # for IPMI
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for drivers/power
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>


# 46cc5941 28-May-2021 Lee Jones <lee.jones@linaro.org>

leds: leds-lp8860: Fix kernel-doc related formatting issues

Fixes the following W=1 kernel build warning(s):

drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'lock' not described in 'lp8860_led'
drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'client' not described in 'lp8860_led'
drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'led_dev' not described in 'lp8860_led'
drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'regmap' not described in 'lp8860_led'
drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'eeprom_regmap' not described in 'lp8860_led'
drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'enable_gpio' not described in 'lp8860_led'
drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'regulator' not described in 'lp8860_led'

Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: linux-leds@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>


# c49d6cab 19-Sep-2020 Marek Behún <marek.behun@nic.cz>

leds: parse linux,default-trigger DT property in LED core

Do the parsing of `linux,default-trigger` DT property to LED core.
Currently it is done in many different drivers and the code is repeated.

This patch removes the parsing from 23 drivers:
an30259a, aw2013, bcm6328, bcm6358, cr0014114, el15203000, gpio,
is31fl32xx, lm3532, lm36274, lm3692x, lm3697, lp50xx, lp8860, lt3593,
max77650, mt6323, ns2, pm8058, pwm, syscon, tlc591xx and turris-omnia.

There is one driver in drivers/input which parses this property on it's
own. I shall send a separate patch there after this is applied.

There are still 8 drivers that parse this property on their own because
they do not pass the led_init_data structure to the registering
function. I will try to refactor those in the future.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Pavel Machek <pavel@ucw.cz>


# 8853c95e9 17-Sep-2020 Marek Behún <marek.behun@nic.cz>

leds: various: use dev_of_node(dev) instead of dev->of_node

The dev_of_node function should be preferred.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Orson Zhai <orsonzhai@gmail.com>
Cc: Baolin Wang <baolin.wang7@gmail.com>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Sean Wang <sean.wang@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Pavel Machek <pavel@ucw.cz>


# 99ca0ea5 09-Jun-2019 Jacek Anaszewski <jacek.anaszewski@gmail.com>

leds: lp8860: Use generic support for composing LED names

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>


# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500

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>


# a2169c9b 18-Dec-2017 Dan Murphy <dmurphy@ti.com>

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>


# 50aa46c4 18-Dec-2017 Dan Murphy <dmurphy@ti.com>

leds: lp8860: Add DT parsing to retrieve the trigger node

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>


# c6b218c9 18-Dec-2017 Dan Murphy <dmurphy@ti.com>

leds: lp8860: Update the dt parsing for LED labeling

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>


# b12ef03a 15-Nov-2017 Dan Murphy <dmurphy@ti.com>

leds: lp8860: Add regulator enable during init

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>


# 8a7a76c8 15-Nov-2017 Dan Murphy <dmurphy@ti.com>

leds: lp8860: Fix linuxdoc format for structure

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>


# 7c4b10a2 19-Aug-2015 Andrew Lunn <andrew@lunn.ch>

leds: lp8860: Remove work queue

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>


# de88e71a 07-Jul-2015 Axel Lin <axel.lin@ingics.com>

leds: lp8860: Constify reg_default tables

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>


# 5ee047fb 30-Mar-2015 Masanari Iida <standby24x7@gmail.com>

leds: lp8860: Fix typo in MODULE_DESCRIPTION in leds-lp8860.c

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>


# eb2294c3 01-Mar-2015 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

leds: lp8860: make use of devm_gpiod_get_optional

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>


# 7a8685ac 19-Nov-2014 Dan Murphy <dmurphy@ti.com>

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>