Skip to content

Commit b386ef6

Browse files
committed
Merge tag 'leds-next-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds
Pull LED updates from Lee Jones: "This submission is a mix of new features, a number of fixes, some clean-up/refactoring and a few Device Tree binding updates. The most significant changes include new device support for the IS31FL3236A and QNAP's status LEDs, a number of fixes for the Qualcomm flash, LP55xx, MAX77705 and QNAP MCU drivers, along with some generic LED consumer binding documentation and unification. New Support & Features: - Add support for the IS31FL3236A LED driver, including an optional 22kHz PWM frequency setting. - Add support for the red and green status LEDs on QNAP MCU devices. Improvements & Fixes: - Fix an issue in the MAX77705 driver where an error value was assigned but not returned. - Correctly update the torch current clamp setting in the Qualcomm flash LED driver to prevent unexpected clamping. - Add a separate register map for the PMI8998 to the Qualcomm flash LED driver to handle its unique register layout. - Fix the state numbering for the USB LED in the QNAP MCU driver to avoid command conflicts. - Correct the memory programming address calculation for non-paged devices like the LP5562 in the LP55xx driver. - Add Device Tree support to the generic led_get() function, allowing LEDs to be looked up by name. Cleanups & Refactoring: - Fix a spelling mistake in the Kconfig help text for the BD2606MVV driver. - Use devm_mutex_init() in the IS31FL319x driver to simplify code. Device Tree Bindings Updates: - Drop the redundant '-db' suffix from the IS31FL319x binding. - Introduce generic LED consumer bindings for referencing LEDs via phandles. - Unify the 'leds' property across several bindings to use the new generic consumer binding. - Convert the AMS AS3645A LED controller binding to the DT schema format" * tag 'leds-next-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: dt-bindings: leds: as3645: Convert to DT schema leds: led-class: Add Device Tree support to led_get() dt-bindings: leds: Unify 'leds' property dt-bindings: leds: Add generic LED consumer documentation leds: is31fl319x: Use devm_mutex_init() leds: leds-lp55xx: Use correct address for memory programming dt-bindings: leds: issi,is31fl319x: Drop 'db' suffix duplicating dtschema leds: qnap-mcu: Add support for the red and green status LEDs leds: qnap-mcu: Fix state numbering for USB LED leds: flash: leds-qcom-flash: Add a separate register map for PMI8998 leds: flash: leds-qcom-flash: Update torch current clamp setting leds: max77705: Function return instead of variable assignment leds: Kconfig: Fix spelling mistake "limitiation" -> "limitation" leds: leds-is31fl32xx: Add support for is31fl3236a
2 parents b491800 + 64826db commit b386ef6

File tree

15 files changed

+497
-145
lines changed

15 files changed

+497
-145
lines changed

Documentation/devicetree/bindings/leds/ams,as3645a.txt

Lines changed: 0 additions & 85 deletions
This file was deleted.
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/ams,as3645a.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices AS3645A LED Controller
8+
9+
maintainers:
10+
- Sakari Ailus <sakari.ailus@iki.fi>
11+
12+
description:
13+
The AS3645A flash LED controller can drive two LEDs, one
14+
high current flash LED and one indicator LED. The high
15+
current flash LED can be used in torch mode as well.
16+
17+
properties:
18+
compatible:
19+
const: ams,as3645a
20+
21+
"#address-cells":
22+
const: 1
23+
24+
"#size-cells":
25+
const: 0
26+
27+
reg:
28+
maxItems: 1
29+
30+
led@0:
31+
description: led0 describes the 'flash' feature
32+
type: object
33+
$ref: common.yaml#
34+
unevaluatedProperties: false
35+
36+
properties:
37+
reg:
38+
const: 0
39+
40+
flash-timeout-us:
41+
minimum: 100000
42+
maximum: 850000
43+
multipleOf: 50000
44+
45+
flash-max-microamp:
46+
minimum: 200000
47+
maximum: 500000
48+
multipleOf: 20000
49+
50+
led-max-microamp:
51+
minimum: 20000
52+
maximum: 160000
53+
multipleOf: 20000
54+
description:
55+
Maximum current when in torch (assist) mode.
56+
57+
ams,input-max-microamp:
58+
minimum: 1250000
59+
maximum: 2000000
60+
multipleOf: 50000
61+
62+
required:
63+
- reg
64+
- flash-timeout-us
65+
- flash-max-microamp
66+
- led-max-microamp
67+
- ams,input-max-microamp
68+
69+
led@1:
70+
description: led1 describes the 'indicator' feature
71+
type: object
72+
$ref: common.yaml#
73+
unevaluatedProperties: false
74+
75+
properties:
76+
reg:
77+
const: 1
78+
79+
led-max-microamp:
80+
enum:
81+
- 2500
82+
- 5000
83+
- 7500
84+
- 10000
85+
description:
86+
Maximum indicator current.
87+
88+
required:
89+
- reg
90+
- led-max-microamp
91+
92+
required:
93+
- compatible
94+
- reg
95+
- "#size-cells"
96+
- "#address-cells"
97+
98+
additionalProperties: false
99+
100+
examples:
101+
- |
102+
#include <dt-bindings/leds/common.h>
103+
104+
i2c{
105+
#address-cells = <1>;
106+
#size-cells = <0>;
107+
108+
led-controller@30 {
109+
compatible = "ams,as3645a";
110+
#address-cells = <1>;
111+
#size-cells = <0>;
112+
reg = <0x30>;
113+
114+
led@0 {
115+
reg = <0>;
116+
flash-timeout-us = <150000>;
117+
flash-max-microamp = <320000>;
118+
led-max-microamp = <60000>;
119+
ams,input-max-microamp = <1750000>;
120+
function = LED_FUNCTION_FLASH;
121+
};
122+
123+
led@1 {
124+
reg = <1>;
125+
led-max-microamp = <10000>;
126+
function = LED_FUNCTION_INDICATOR;
127+
};
128+
};
129+
};
130+
...

Documentation/devicetree/bindings/leds/backlight/led-backlight.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ properties:
2323
compatible:
2424
const: led-backlight
2525

26-
leds:
27-
description: A list of LED nodes
28-
$ref: /schemas/types.yaml#/definitions/phandle-array
29-
items:
30-
maxItems: 1
26+
leds: true
3127

3228
required:
3329
- compatible

Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ properties:
4242
description: GPIO attached to the SDB pin.
4343

4444
audio-gain-db:
45-
$ref: /schemas/types.yaml#/definitions/uint32
4645
default: 0
4746
description: Audio gain selection for external analog modulation input.
4847
enum: [0, 3, 6, 9, 12, 15, 18, 21]
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/leds-consumer.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Common leds consumer
8+
9+
maintainers:
10+
- Aleksandrs Vinarskis <alex@vinarskis.com>
11+
12+
description:
13+
Some LED defined in DT are required by other DT consumers, for example
14+
v4l2 subnode may require privacy or flash LED. Unlike trigger-source
15+
approach which is typically used as 'soft' binding, referencing LED
16+
devices by phandle makes things simpler when 'hard' binding is desired.
17+
18+
Document LED properties that its consumers may define.
19+
20+
select: true
21+
22+
properties:
23+
leds:
24+
oneOf:
25+
- type: object
26+
- $ref: /schemas/types.yaml#/definitions/phandle-array
27+
description:
28+
A list of LED device(s) required by a particular consumer.
29+
items:
30+
maxItems: 1
31+
32+
led-names:
33+
description:
34+
A list of device name(s). Used to map LED devices to their respective
35+
functions, when consumer requires more than one LED.
36+
37+
additionalProperties: true
38+
39+
examples:
40+
- |
41+
#include <dt-bindings/gpio/gpio.h>
42+
#include <dt-bindings/leds/common.h>
43+
44+
leds {
45+
compatible = "gpio-leds";
46+
47+
privacy_led: privacy-led {
48+
color = <LED_COLOR_ID_RED>;
49+
default-state = "off";
50+
function = LED_FUNCTION_INDICATOR;
51+
gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
52+
};
53+
};
54+
55+
i2c {
56+
#address-cells = <1>;
57+
#size-cells = <0>;
58+
59+
v4l2_node: camera@36 {
60+
reg = <0x36>;
61+
62+
leds = <&privacy_led>;
63+
led-names = "privacy";
64+
};
65+
};
66+
67+
...

Documentation/devicetree/bindings/leds/leds-group-multicolor.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ properties:
1717
compatible:
1818
const: leds-group-multicolor
1919

20-
leds:
21-
description:
22-
An aray of monochromatic leds
23-
$ref: /schemas/types.yaml#/definitions/phandle-array
20+
leds: true
2421

2522
required:
2623
- leds

Documentation/devicetree/bindings/media/video-interface-devices.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ properties:
1717
An array of phandles, each referring to a flash LED, a sub-node of the LED
1818
driver device node.
1919

20+
leds:
21+
minItems: 1
22+
maxItems: 1
23+
24+
led-names:
25+
enum:
26+
- privacy
27+
2028
lens-focus:
2129
$ref: /schemas/types.yaml#/definitions/phandle
2230
description:

drivers/leds/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ config LEDS_BD2606MVV
674674
help
675675
This option enables support for BD2606MVV LED driver chips
676676
accessed via the I2C bus. It supports setting brightness, with
677-
the limitiation that there are groups of two channels sharing
677+
the limitation that there are groups of two channels sharing
678678
a brightness setting, but not the on/off setting.
679679

680680
To compile this driver as a module, choose M here: the module will

0 commit comments

Comments
 (0)