Skip to content

Commit fea1768

Browse files
committed
Merge tag 'leds-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds
Pull LED updates from Lee Jones: "Core Frameworks: - New trigger for Input Events - New led_mc_set_brightness() call to adapt colour/brightness for mutli-colour LEDs - New lled_mc_trigger_event() call to call the above based on given trigger conditions - New led_get_color_name() call, a wrapper around the existing led_colors[] array - A new flag to avoid automatic renaming of LED devices New Drivers: - Silergy SY7802 Flash LED Controller - Texas Instruments LP5569 LED Controller - ChromeOS EC LED Controller New Device Support: - KTD202{6,7} support for Kinetic KTD2026/7 LEDs Fix-ups: - Replace ACPI/DT firmware helpers with agnostic variants - Make use of resource managed devm_* API calls - Device Tree binding adaptions/conversions/creation - Constify/staticise applicable data structures - Trivial; spelling, whitespace, coding-style adaptions - Drop i2c_device_id::driver_data where the value is unused - Utilise centrally provided helpers and macros to aid simplicity and avoid duplication - Use generic platform device properties instead of OF/ACPI specific ones - Consolidate/de-duplicate various functionality - Remove superfluous/duplicated/unused sections - Make use of the new *_scoped() guard APIs - Improve/simplify error handling Bug Fixes: - Flush pending brightness changes before activating the trigger - Repair incorrect device naming preventing matches - Prevent memory leaks by correctly free resources during error handling routines - Repair locking issue causing circular dependency splats and lock-ups - Unregister sysfs entries before deactivating triggers to prevent use-after issues - Supply a bunch of MODULE_DESCRIPTIONs to silence modpost warnings - Use correct return codes expected by the callers - Omit set_brightness() error message for a LEDs that support only HW triggers" * tag 'leds-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (65 commits) leds: leds-lp5569: Enable chip after chip configuration leds: leds-lp5569: Better handle enabling clock internal setting leds: leds-lp5569: Fix typo in driver name leds: flash: leds-qcom-flash: Test the correct variable in init leds: leds-lp55xx: Convert mutex lock/unlock to guard API leds: leds-lp5523: Convert to sysfs_emit API leds: leds-lp5569: Convert to sysfs_emit API Revert "leds: led-core: Fix refcount leak in of_led_get()" leds: leds-lp5569: Add support for Texas Instruments LP5569 leds: leds-lp55xx: Drop deprecated defines leds: leds-lp55xx: Support ENGINE program up to 128 bytes leds: leds-lp55xx: Generalize sysfs master_fader leds: leds-lp55xx: Generalize sysfs engine_leds leds: leds-lp55xx: Generalize sysfs engine_load and engine_mode leds: leds-lp55xx: Generalize stop_engine function leds: leds-lp55xx: Generalize turn_off_channels function leds: leds-lp55xx: Generalize set_led_current function leds: leds-lp55xx: Generalize multicolor_brightness function leds: leds-lp55xx: Generalize led_brightness function leds: leds-lp55xx: Generalize firmware_loaded function ...
2 parents e0d97b0 + b0eed39 commit fea1768

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2728
-1864
lines changed

Documentation/devicetree/bindings/leds/leds-lp55xx.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ properties:
2828
- national,lp5523
2929
- ti,lp55231
3030
- ti,lp5562
31+
- ti,lp5569
3132
- ti,lp8501
3233

3334
reg:
@@ -151,6 +152,16 @@ patternProperties:
151152
$ref: /schemas/types.yaml#/definitions/string
152153
description: name of channel
153154

155+
if:
156+
not:
157+
properties:
158+
compatible:
159+
contains:
160+
const: ti,lp8501
161+
then:
162+
properties:
163+
pwr-sel: false
164+
154165
required:
155166
- compatible
156167
- reg
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/silergy,sy7802.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Silergy SY7802 1800mA Boost Charge Pump LED Driver
8+
9+
maintainers:
10+
- André Apitzsch <[email protected]>
11+
12+
description: |
13+
The SY7802 is a current-regulated charge pump which can regulate two current
14+
levels for Flash and Torch modes.
15+
16+
The SY7802 is a high-current synchronous boost converter with 2-channel
17+
high side current sources. Each channel is able to deliver 900mA current.
18+
19+
properties:
20+
compatible:
21+
enum:
22+
- silergy,sy7802
23+
24+
reg:
25+
maxItems: 1
26+
27+
enable-gpios:
28+
maxItems: 1
29+
description: A connection to the 'EN' pin.
30+
31+
flash-gpios:
32+
maxItems: 1
33+
description: A connection to the 'FLEN' pin.
34+
35+
vin-supply:
36+
description: Regulator providing power to the 'VIN' pin.
37+
38+
"#address-cells":
39+
const: 1
40+
41+
"#size-cells":
42+
const: 0
43+
44+
patternProperties:
45+
"^led@[0-1]$":
46+
type: object
47+
$ref: common.yaml#
48+
unevaluatedProperties: false
49+
50+
properties:
51+
reg:
52+
description: Index of the LED.
53+
minimum: 0
54+
maximum: 1
55+
56+
led-sources:
57+
minItems: 1
58+
maxItems: 2
59+
items:
60+
minimum: 0
61+
maximum: 1
62+
63+
required:
64+
- reg
65+
- led-sources
66+
67+
required:
68+
- compatible
69+
- reg
70+
- "#address-cells"
71+
- "#size-cells"
72+
- enable-gpios
73+
74+
additionalProperties: false
75+
76+
examples:
77+
- |
78+
#include <dt-bindings/gpio/gpio.h>
79+
#include <dt-bindings/leds/common.h>
80+
81+
i2c {
82+
#address-cells = <1>;
83+
#size-cells = <0>;
84+
85+
flash-led-controller@53 {
86+
compatible = "silergy,sy7802";
87+
reg = <0x53>;
88+
#address-cells = <1>;
89+
#size-cells = <0>;
90+
91+
enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
92+
93+
led@0 {
94+
reg = <0>;
95+
function = LED_FUNCTION_FLASH;
96+
color = <LED_COLOR_ID_WHITE>;
97+
led-sources = <0>, <1>;
98+
};
99+
};
100+
};

Documentation/leds/leds-blinkm.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The leds-blinkm driver supports the devices of the BlinkM family.
77
They are RGB-LED modules driven by a (AT)tiny microcontroller and
88
communicate through I2C. The default address of these modules is
99
0x09 but this can be changed through a command. By this you could
10-
dasy-chain up to 127 BlinkMs on an I2C bus.
10+
daisy-chain up to 127 BlinkMs on an I2C bus.
1111

1212
The device accepts RGB and HSB color values through separate commands.
1313
Also you can store blinking sequences as "scripts" in

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12598,7 +12598,7 @@ M: Pavel Machek <[email protected]>
1259812598
M: Lee Jones <[email protected]>
1259912599
1260012600
S: Maintained
12601-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git
12601+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git
1260212602
F: Documentation/devicetree/bindings/leds/
1260312603
F: Documentation/leds/
1260412604
F: drivers/leds/

drivers/leds/Kconfig

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,16 +429,16 @@ config LEDS_LP50XX
429429
module will be called leds-lp50xx.
430430

431431
config LEDS_LP55XX_COMMON
432-
tristate "Common Driver for TI/National LP5521/5523/55231/5562/8501"
432+
tristate "Common Driver for TI/National LP5521/5523/55231/5562/5569/8501"
433433
depends on LEDS_CLASS
434434
depends on LEDS_CLASS_MULTICOLOR
435435
depends on OF
436436
depends on I2C
437437
select FW_LOADER
438438
select FW_LOADER_USER_HELPER
439439
help
440-
This option supports common operations for LP5521/5523/55231/5562/8501
441-
devices.
440+
This option supports common operations for LP5521/5523/55231/5562/5569/
441+
8501 devices.
442442

443443
config LEDS_LP5521
444444
tristate "LED Support for N.S. LP5521 LED driver chip"
@@ -471,6 +471,16 @@ config LEDS_LP5562
471471
Driver provides direct control via LED class and interface for
472472
programming the engines.
473473

474+
config LEDS_LP5569
475+
tristate "LED Support for TI LP5569 LED driver chip"
476+
depends on LEDS_CLASS && I2C
477+
depends on LEDS_LP55XX_COMMON
478+
help
479+
If you say yes here you get support for TI LP5569 LED driver.
480+
It is 9 channels chip with programmable engines.
481+
Driver provides direct control via LED class and interface for
482+
programming the engines.
483+
474484
config LEDS_LP8501
475485
tristate "LED Support for TI LP8501 LED driver chip"
476486
depends on LEDS_CLASS && I2C
@@ -884,7 +894,6 @@ config LEDS_SPI_BYTE
884894
tristate "LED support for SPI LED controller with a single byte"
885895
depends on LEDS_CLASS
886896
depends on SPI
887-
depends on OF
888897
help
889898
This option enables support for LED controller which use a single byte
890899
for controlling the brightness. Currently the following controller is

drivers/leds/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ obj-$(CONFIG_LEDS_LP50XX) += leds-lp50xx.o
5252
obj-$(CONFIG_LEDS_LP5521) += leds-lp5521.o
5353
obj-$(CONFIG_LEDS_LP5523) += leds-lp5523.o
5454
obj-$(CONFIG_LEDS_LP5562) += leds-lp5562.o
55+
obj-$(CONFIG_LEDS_LP5569) += leds-lp5569.o
5556
obj-$(CONFIG_LEDS_LP55XX_COMMON) += leds-lp55xx-common.o
5657
obj-$(CONFIG_LEDS_LP8501) += leds-lp8501.o
5758
obj-$(CONFIG_LEDS_LP8788) += leds-lp8788.o

drivers/leds/blink/leds-bcm63138.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,5 +303,6 @@ static struct platform_driver bcm63138_leds_driver = {
303303
module_platform_driver(bcm63138_leds_driver);
304304

305305
MODULE_AUTHOR("Rafał Miłecki");
306+
MODULE_DESCRIPTION("Broadcom BCM63138 SoC LED driver");
306307
MODULE_LICENSE("GPL");
307308
MODULE_DEVICE_TABLE(of, bcm63138_leds_of_match_table);

drivers/leds/flash/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,15 @@ config LEDS_SGM3140
121121
This option enables support for the SGM3140 500mA Buck/Boost Charge
122122
Pump LED Driver.
123123

124+
config LEDS_SY7802
125+
tristate "LED support for the Silergy SY7802"
126+
depends on I2C && OF
127+
depends on GPIOLIB
128+
select REGMAP_I2C
129+
help
130+
This option enables support for the SY7802 flash LED controller.
131+
SY7802 includes torch and flash functions with programmable current.
132+
133+
This driver can be built as a module, it will be called "leds-sy7802".
134+
124135
endif # LEDS_CLASS_FLASH

drivers/leds/flash/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ obj-$(CONFIG_LEDS_QCOM_FLASH) += leds-qcom-flash.o
1111
obj-$(CONFIG_LEDS_RT4505) += leds-rt4505.o
1212
obj-$(CONFIG_LEDS_RT8515) += leds-rt8515.o
1313
obj-$(CONFIG_LEDS_SGM3140) += leds-sgm3140.o
14+
obj-$(CONFIG_LEDS_SY7802) += leds-sy7802.o

drivers/leds/flash/leds-as3645a.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,8 @@ static void as3645a_remove(struct i2c_client *client)
743743
}
744744

745745
static const struct i2c_device_id as3645a_id_table[] = {
746-
{ AS_NAME, 0 },
747-
{ },
746+
{ AS_NAME },
747+
{ }
748748
};
749749
MODULE_DEVICE_TABLE(i2c, as3645a_id_table);
750750

0 commit comments

Comments
 (0)