Skip to content

Commit f2debe0

Browse files
committed
Merge tag 'leds-next-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds
Pull LED updates from Lee Jones: - Limited LED current based on thermal conditions in the QCOM flash LED driver - Fixed device child node usage in the BD2606MVV and PCA995x drivers - Used device_for_each_child_node_scoped() to access child nodes in the IS31FL319X driver - Reset the LED controller during the probe in the LM3601X driver - Used device_for_each_child_node() to access device child nodes in the PCA995X driver - Fixed CONFIG_LEDS_CLASS_MULTICOLOR dependency in the BlinkM driver - Replaced msleep() with usleep_range() in the SUN50I-A100 driver - Used scoped device node handling to simplify error paths in the AAT1290, KTD2692, and MC13783 drivers - Added missing of_node_get for probe duration in the MAX77693 driver - Simplified using for_each_available_child_of_node_scoped() loops when iterating over device nodes - Used devm_clk_get_enabled() helpers in the LP55XX driver - Converted DT bindings from TXT to YAML format for various drivers, including LM3692x and SC2731-BLTC - Set num_leds after allocation in the GPIO driver - Removed irrelevant blink configuration error message in the PCA9532 driver - Fixed module autoloading with MODULE_DEVICE_TABLE() in the Turris Omnia driver * tag 'leds-next-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (38 commits) leds: turris-omnia: Fix module autoloading with MODULE_DEVICE_TABLE() leds: pca9532: Remove irrelevant blink configuration error message leds: gpio: Set num_leds after allocation dt-bindings: leds: Convert leds-lm3692x to YAML format leds: lp55xx: Use devm_clk_get_enabled() helpers leds: as3645a: Use device_* to iterate over device child nodes leds: qcom-lpg: Simplify with scoped for each OF child loop leds: turris-omnia: Simplify with scoped for each OF child loop leds: sc27xx: Simplify with scoped for each OF child loop leds: pca9532: Simplify with scoped for each OF child loop leds: netxbig: Simplify with scoped for each OF child loop leds: mt6323: Simplify with scoped for each OF child loop leds: mc13783: Use scoped device node handling to simplify error paths leds: lp55xx: Simplify with scoped for each OF child loop leds: is31fl32xx: Simplify with scoped for each OF child loop leds: bcm6358: Simplify with scoped for each OF child loop leds: bcm6328: Simplify with scoped for each OF child loop leds: aw2013: Simplify with scoped for each OF child loop leds: 88pm860x: Simplify with scoped for each OF child loop leds: max77693: Simplify with scoped for each OF child loop ...
2 parents b0a53b4 + 64c3886 commit f2debe0

37 files changed

+756
-406
lines changed

Documentation/devicetree/bindings/leds/common.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ properties:
113113
# LED indicates NAND memory activity (deprecated),
114114
# in new implementations use "mtd"
115115
- nand-disk
116+
# LED indicates network activity
117+
- netdev
116118
# No trigger assigned to the LED. This is the default mode
117119
# if trigger is absent
118120
- none

Documentation/devicetree/bindings/leds/leds-lm3692x.txt

Lines changed: 0 additions & 65 deletions
This file was deleted.

Documentation/devicetree/bindings/leds/leds-sc27xx-bltc.txt

Lines changed: 0 additions & 43 deletions
This file was deleted.

Documentation/devicetree/bindings/leds/nxp,pca995x.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,21 @@ maintainers:
1111
- Marek Vasut <[email protected]>
1212

1313
description:
14-
The NXP PCA9952/PCA9955B are programmable LED controllers connected via I2C
15-
that can drive 16 separate lines. Each of them can be individually switched
14+
The NXP PCA995x family are programmable LED controllers connected via I2C
15+
that can drive separate lines. Each of them can be individually switched
1616
on and off, and brightness can be controlled via individual PWM.
1717

1818
Datasheets are available at
1919
https://www.nxp.com/docs/en/data-sheet/PCA9952_PCA9955.pdf
2020
https://www.nxp.com/docs/en/data-sheet/PCA9955B.pdf
21+
https://www.nxp.com/docs/en/data-sheet/PCA9956B.pdf
2122

2223
properties:
2324
compatible:
2425
enum:
2526
- nxp,pca9952
2627
- nxp,pca9955b
28+
- nxp,pca9956b
2729

2830
reg:
2931
maxItems: 1
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/sprd,sc2731-bltc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Spreadtrum SC2731 PMIC breathing light controller
8+
9+
maintainers:
10+
- Orson Zhai <[email protected]>
11+
- Baolin Wang <[email protected]>
12+
- Chunyan Zhang <[email protected]>
13+
14+
description: |
15+
The SC2731 breathing light controller supports up to 3 outputs:
16+
red LED, green LED and blue LED. Each LED can work at normal PWM mode
17+
or breath light mode.
18+
19+
properties:
20+
compatible:
21+
const: sprd,sc2731-bltc
22+
23+
reg:
24+
maxItems: 1
25+
26+
'#address-cells':
27+
const: 1
28+
29+
'#size-cells':
30+
const: 0
31+
32+
patternProperties:
33+
"^led@[0-2]$":
34+
type: object
35+
$ref: common.yaml#
36+
unevaluatedProperties: false
37+
38+
properties:
39+
reg:
40+
minimum: 0
41+
maximum: 2
42+
43+
required:
44+
- reg
45+
46+
required:
47+
- compatible
48+
- reg
49+
- '#address-cells'
50+
- '#size-cells'
51+
52+
additionalProperties: false
53+
54+
examples:
55+
- |
56+
#include <dt-bindings/leds/common.h>
57+
58+
pmic {
59+
#address-cells = <1>;
60+
#size-cells = <0>;
61+
62+
led-controller@200 {
63+
compatible = "sprd,sc2731-bltc";
64+
reg = <0x200>;
65+
#address-cells = <1>;
66+
#size-cells = <0>;
67+
68+
led@0 {
69+
reg = <0x0>;
70+
color = <LED_COLOR_ID_RED>;
71+
};
72+
73+
led@1 {
74+
reg = <0x1>;
75+
color = <LED_COLOR_ID_GREEN>;
76+
};
77+
78+
led@2 {
79+
reg = <0x2>;
80+
color = <LED_COLOR_ID_BLUE>;
81+
};
82+
};
83+
};
84+
...
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/ti.lm36922.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Texas Instruments - LM3692x Highly Efficient White LED Driver
8+
9+
maintainers:
10+
- Dan Murphy <[email protected]>
11+
12+
description: |
13+
The LM3692x is an ultra-compact, highly efficient,
14+
white-LED driver designed for LCD display backlighting.
15+
16+
The main difference between the LM36922 and LM36923 is the number of
17+
LED strings it supports. The LM36922 supports two strings while the LM36923
18+
supports three strings.
19+
20+
For more product information please see the link below:
21+
https://www.ti.com/lit/ds/snvsa29/snvsa29.pdf
22+
23+
properties:
24+
compatible:
25+
enum:
26+
- ti,lm36922
27+
- ti,lm36923
28+
29+
reg:
30+
maxItems: 1
31+
32+
"#address-cells":
33+
const: 1
34+
35+
"#size-cells":
36+
const: 0
37+
38+
enable-gpios:
39+
description: gpio pin to enable/disable the device.
40+
41+
vled-supply:
42+
description: LED supply
43+
44+
ti,ovp-microvolt:
45+
description: Overvoltage protection.
46+
default: 29000000
47+
enum: [17000000, 21000000, 25000000, 29000000]
48+
49+
patternProperties:
50+
'^led@[0-3]$':
51+
type: object
52+
$ref: common.yaml
53+
properties:
54+
reg:
55+
enum: [0, 1, 2, 3]
56+
description: |
57+
0 - Will enable all LED sync paths
58+
1 - Will enable the LED1 sync
59+
2 - Will enable the LED2 sync
60+
3 - Will enable the LED3 sync (LM36923 only)
61+
62+
unevaluatedProperties: false
63+
64+
required:
65+
- compatible
66+
- reg
67+
- "#address-cells"
68+
- "#size-cells"
69+
70+
allOf:
71+
- if:
72+
properties:
73+
compatible:
74+
contains:
75+
const: ti,lm36922
76+
then:
77+
properties:
78+
led@3: false
79+
80+
additionalProperties: false
81+
82+
examples:
83+
- |
84+
#include <dt-bindings/gpio/gpio.h>
85+
#include <dt-bindings/leds/common.h>
86+
87+
i2c {
88+
#address-cells = <1>;
89+
#size-cells = <0>;
90+
91+
led-controller@36 {
92+
compatible = "ti,lm36922";
93+
reg = <0x36>;
94+
#address-cells = <1>;
95+
#size-cells = <0>;
96+
97+
enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
98+
vled-supply = <&vbatt>;
99+
ti,ovp-microvolt = <29000000>;
100+
101+
led@0 {
102+
reg = <0>;
103+
function = LED_FUNCTION_BACKLIGHT;
104+
color = <LED_COLOR_ID_WHITE>;
105+
linux,default-trigger = "backlight";
106+
led-max-microamp = <20000>;
107+
};
108+
};
109+
};
110+

Documentation/leds/leds-blinkm.rst

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,31 @@ The device accepts RGB and HSB color values through separate commands.
1313
Also you can store blinking sequences as "scripts" in
1414
the controller and run them. Also fading is an option.
1515

16-
The interface this driver provides is 2-fold:
16+
The interface this driver provides is 3-fold:
1717

18-
a) LED class interface for use with triggers
18+
a) LED multicolor class interface for use with triggers
19+
#######################################################
20+
21+
The registration follows the scheme::
22+
23+
blinkm-<i2c-bus-nr>-<i2c-device-nr>:rgb:indicator
24+
25+
$ ls -h /sys/class/leds/blinkm-1-9:rgb:indicator
26+
brightness device max_brightness multi_index multi_intensity power subsystem trigger uevent
27+
28+
Hue is controlled by the multi_intensity file and lightness is controlled by
29+
the brightness file.
30+
31+
The order in which to write the intensity values can be found in multi_index.
32+
Exactly three values between 0 and 255 must be written to multi_intensity to
33+
change the color::
34+
35+
$ echo 255 100 50 > multi_intensity
36+
37+
The overall lightness be changed by writing a value between 0 and 255 to the
38+
brightness file.
39+
40+
b) LED class interface for use with triggers
1941
############################################
2042

2143
The registration follows the scheme::
@@ -79,6 +101,7 @@ E.g.::
79101

80102

81103

82-
as of 6/2012
104+
as of 07/2024
83105

84106
dl9pf <at> gmx <dot> de
107+
jstrauss <at> mailbox <dot> org

Documentation/leds/well-known-leds.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ Good: "platform:*:charging" (allwinner sun50i, leds-cht-wcove)
7272

7373
Good: ":backlight" (Motorola Droid 4)
7474

75+
* Indicators
76+
77+
Good: ":indicator" (Blinkm)
78+
79+
* RGB
80+
81+
Good: ":rgb" (Blinkm)
82+
7583
* Ethernet LEDs
7684

7785
Currently two types of Network LEDs are support, those controlled by

0 commit comments

Comments
 (0)