History log of /linux-master/drivers/leds/leds-bcm6358.c
Revision Date Author Comments
# e41ff817 03-Jan-2023 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

leds: bcm6358: Get rid of custom led_init_default_state_get()

LED core provides a helper to parse default state from firmware node.
Use it instead of custom implementation.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230103131256.33894-6-andriy.shevchenko@linux.intel.com


# 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>


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

leds: bcm6328, bcm6358: use struct led_init_data when registering

By using struct led_init_data when registering we do not need to parse
`label` DT property. Moreover `label` is deprecated and if it is not
present but `color` and `function` are, LED core will compose a name
from these properties instead.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Álvaro Fernández Rojas <noltari@gmail.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Jaedon Shin <jaedon.shin@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>


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

leds: bcm6328, bcm6358: use devres LED registering function

These two drivers do not provide remove method and use devres for
allocation of other resources, yet they use led_classdev_register
instead of the devres variant, devm_led_classdev_register.

Fix this.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Álvaro Fernández Rojas <noltari@gmail.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Jaedon Shin <jaedon.shin@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Cc: stable@kernel.org


# 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>


# 8b4423d6 20-Sep-2019 Markus Elfring <elfring@users.sourceforge.net>

leds: bcm6358: Use devm_platform_ioremap_resource() in bcm6358_leds_probe()

Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Pavel Machek <pavel@ucw.cz>


# 2874c5fd 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

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

Based on 1 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 as published by
the free software foundation either version 2 of the license or at
your option any later version

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 1259efaa 16-Dec-2015 Álvaro Fernández Rojas <noltari@gmail.com>

leds: bcm6358: remove unneeded busy status check

The busy status checking isn't needed while reading initial LED status.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>


# 6e636a0a 15-Dec-2015 Álvaro Fernández Rojas <noltari@gmail.com>

leds: bcm6358: merge bcm6358_led_mode and bcm6358_led_set

bcm6358_led_mode is now only called by bcm6358_led_set, so merge both
in one single function.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>


# 4ba113b6 15-Dec-2015 Álvaro Fernández Rojas <noltari@gmail.com>

leds: bcm6358: add little endian support

This adds little endian support while keeping big endian support.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>


# 93a708da 15-Dec-2015 Álvaro Fernández Rojas <noltari@gmail.com>

leds: bcm6358: remove unneded lock when checking initial LED status

This lock isn't really needed, since we're only reading the register and
changes made to other LEDs aren't relevant.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>


# 42273caa 15-Dec-2015 Álvaro Fernández Rojas <noltari@gmail.com>

leds: bcm6358: Use bcm6358_led_set() in order to get rid of the lock

Replaces bcm6358_led_mode with bcm6358_led_set so we don't need to handle
the lock.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>


# 4b6ba5e2 24-Oct-2015 Julia Lawall <Julia.Lawall@lip6.fr>

leds: bcm6358: add missing of_node_put

for_each_available_child_of_node performs an of_node_get on each
iteration, so a break out of the loop requires an of_node_put.

A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):

// <smpl>
@@
expression root,e;
local idexpression child;
@@

for_each_available_child_of_node(root, child) {
... when != of_node_put(child)
when != e = child
(
return child;
|
+ of_node_put(child);
? return ...;
)
...
}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>


# 01736f07 01-Sep-2015 Luis de Bethencourt <luis@debethencourt.com>

leds: bcm6358: Fix module autoload for OF platform driver

This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>


# 589fca16 21-May-2015 Álvaro Fernández Rojas <noltari@gmail.com>

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>