Skip to content

Commit 7b8653a

Browse files
committed
Merge tag 'leds-next-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds
Pull LED updates from Lee Jones: "Updates: - Add optional GPIO enable pin support to PWM LED driver Fixes: - Allow LED module 0 to be added to module bank in lp50xx driver - Fix upboard LED driver module alias to ensure proper auto-loading - Update LP5009 to support 3 modules for a total of 9 LEDs - Skip LEDs without color components in cros_ec driver instead of failing probe - Fix GPIO descriptor leaks in netxbig error paths by releasing acquired GPIOs - Allow LED_COLOR_ID_MULTI in qcom-lpg driver for greater flexibility - Enable LP55XX common LED use without FW_LOADER_USER_HELPER - Ensure lp50xx chip is enabled before any I2C communication Cleanups: - Use fwnode_for_each_child_node() instead of fwnode_for_each_available_child_node() in LED drivers - Use device_get_next_child_node() instead of fwnode_get_next_available_child_node() in LED flash drivers - Replace sprintf() with sysfs_emit() in sysfs show functions for improved bounds checking - Replace system_wq() with system_percpu_wq() in the input event trigger - Reorder include files to alphabetic order in the PWM LED driver - Do not enable TRILED in qcom-lpg when configuring PWM - Drop duplicate LEDS_EXPRESSWIRE config from Kconfig Removals: - Remove arcxcnn_bl.txt Device Tree binding documentation Devicetree bindings: - Convert ArcticSand arc2c0608 LED driver binding to DT Schema - Add default-brightness property to common LED binding - Add enable-gpios property to PWM LED binding - Add PM7550 to qcom,spmi-flash-led compatible - Explain standalone PWM usage in qcom-lpg binding" * tag 'leds-next-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (21 commits) leds: rgb: leds-qcom-lpg: Don't enable TRILED when configuring PWM dt-bindings: leds: qcom-lpg: Explain standalone PWM usage leds: rgb: leds-qcom-lpg: Allow LED_COLOR_ID_MULTI leds: pwm: Reorder include files to alphabetic order leds: pwm: Add optional GPIO enable pin support dt-bindings: leds: pwm: Add enable-gpios property leds: trigger: Replace use of system_wq() with system_percpu_wq() leds: led-class: Replace sprintf() with sysfs_emit() in sysfs show functions dt-bindings: leds: qcom,spmi-flash-led: Add PM7550 leds: netxbig: Fix GPIO descriptor leak in error paths leds: leds-lp50xx: Enable chip before any communication leds: Drop duplicate LEDS_EXPRESSWIRE config leds: leds-cros_ec: Skip LEDs without color components leds: leds-lp50xx: LP5009 supports 3 modules for a total of 9 LEDs leds: upboard: Fix module alias leds: leds-lp50xx: Allow LED 0 to be added to module bank leds: lp55xx_common: Enable use without FW_LOADER_USER_HELPER dt-bindings: leds: Add default-brightness property to common.yaml leds: flash: Use fwnode_get_next_child_node() instead leds: Use fwnode_for_each_child_node() instead ...
2 parents 980190a + 072cd5f commit 7b8653a

25 files changed

Lines changed: 245 additions & 101 deletions
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/backlight/arc,arc2c0608.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ArcticSand arc2c0608 LED driver
8+
9+
description: |
10+
The ArcticSand arc2c0608 LED driver provides ultra
11+
efficient notebook backlighting. Optional properties not
12+
specified will default to values in IC EPROM.
13+
14+
Datasheet:
15+
https://www.murata.com/-/media/webrenewal/products/power/power-semiconductor/overview/lineup/led-boost/arc2/arc2c0608.ashx.
16+
17+
maintainers:
18+
- Brian Dodge <bdodge@arcticsand.com>
19+
20+
allOf:
21+
- $ref: /schemas/leds/common.yaml
22+
23+
properties:
24+
compatible:
25+
const: arc,arc2c0608
26+
27+
reg:
28+
maxItems: 1
29+
30+
default-brightness:
31+
$ref: /schemas/types.yaml#/definitions/uint32
32+
minimum: 0
33+
maximum: 4095
34+
35+
led-sources:
36+
$ref: /schemas/types.yaml#/definitions/uint32-array
37+
description: List of enabled channels
38+
items:
39+
enum: [0, 1, 2, 3, 4, 5]
40+
minItems: 1
41+
uniqueItems: true
42+
43+
arc,led-config-0:
44+
$ref: /schemas/types.yaml#/definitions/uint32
45+
description: Fading speed (period between intensity
46+
steps)
47+
48+
arc,led-config-1:
49+
$ref: /schemas/types.yaml#/definitions/uint32
50+
description: If set, sets ILED_CONFIG register. Used for
51+
fine tuning the maximum LED current.
52+
53+
arc,dim-freq:
54+
$ref: /schemas/types.yaml#/definitions/uint32
55+
description: PWM mode frequency setting (bits [3:0] used)
56+
57+
arc,comp-config:
58+
$ref: /schemas/types.yaml#/definitions/uint32
59+
description: Setting for register CONFIG_COMP which
60+
controls internal resitances, feed forward freqs,
61+
and initial VOUT at startup. Consult the datasheet.
62+
63+
arc,filter-config:
64+
$ref: /schemas/types.yaml#/definitions/uint32
65+
description: RC and PWM Filter settings.
66+
Bit Assignment
67+
7654 3 2 1 0
68+
xxxx RCF1 RCF0 PWM1 PWM0
69+
RCF statuses PWM Filter Statues
70+
00 = OFF (default) 00 = OFF (default)
71+
01 = LOW 01 = 2 STEPS
72+
10 - MEDIUM 10 = 4 STEPS
73+
11 = HIGH 11 = 8 STEPS
74+
75+
arc,trim-config:
76+
$ref: /schemas/types.yaml#/definitions/uint32
77+
description: Sets percentage increase of Maximum LED
78+
Current.
79+
0x00 = 0% increase.
80+
0x20 = 20.2%.
81+
0x3F = 41.5%
82+
83+
label: true
84+
85+
linux,default-trigger: true
86+
87+
additionalProperties: false
88+
89+
required:
90+
- compatible
91+
- reg
92+
93+
examples:
94+
- |
95+
i2c {
96+
#address-cells = <1>;
97+
#size-cells = <0>;
98+
99+
led-controller@30 {
100+
compatible = "arc,arc2c0608";
101+
reg = <0x30>;
102+
default-brightness = <500>;
103+
label = "lcd-backlight";
104+
linux,default-trigger = "backlight";
105+
led-sources = <0 1 2 5>;
106+
};
107+
};
108+
...

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt

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

Documentation/devicetree/bindings/leds/common.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ properties:
173173
led-max-microamp.
174174
$ref: /schemas/types.yaml#/definitions/uint32
175175

176+
default-brightness:
177+
description:
178+
Brightness to be set if LED's default state is on. Used only during
179+
initialization. If the option is not set then max brightness is used.
180+
$ref: /schemas/types.yaml#/definitions/uint32
181+
176182
panic-indicator:
177183
description:
178184
This property specifies that the LED should be used, if at all possible,

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ patternProperties:
4040
initialization. If the option is not set then max brightness is used.
4141
$ref: /schemas/types.yaml#/definitions/uint32
4242

43+
enable-gpios:
44+
description:
45+
GPIO for LED hardware enable control. Set active when brightness is
46+
non-zero and inactive when brightness is zero.
47+
The GPIO default state follows the "default-state" property.
48+
maxItems: 1
49+
4350
required:
4451
- pwms
4552
- max-brightness

Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ description: >
1313
The Qualcomm Light Pulse Generator consists of three different hardware blocks;
1414
a ramp generator with lookup table (LUT), the light pulse generator and a three
1515
channel current sink. These blocks are found in a wide range of Qualcomm PMICs.
16+
The light pulse generator (LPG) can also be used independently to output PWM
17+
signal for standard PWM applications. In this scenario, the LPG output should
18+
be routed to a specific PMIC GPIO by setting the GPIO pin mux to the special
19+
functions indicated in the datasheet, the TRILED driver for the channel will
20+
not be enabled in this configuration.
1621
1722
properties:
1823
compatible:

Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ properties:
2424
- enum:
2525
- qcom,pm6150l-flash-led
2626
- qcom,pm660l-flash-led
27+
- qcom,pm7550-flash-led
2728
- qcom,pm8150c-flash-led
2829
- qcom,pm8150l-flash-led
2930
- qcom,pm8350c-flash-led

Documentation/leds/leds-lp5521.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ More details of the instructions can be found from the public data sheet.
2222
LP5521 has the internal program memory for running various LED patterns.
2323
There are two ways to run LED patterns.
2424

25-
1) Legacy interface - enginex_mode and enginex_load
25+
1) sysfs interface - enginex_mode and enginex_load
2626
Control interface for the engines:
2727

2828
x is 1 .. 3

Documentation/leds/leds-lp5523.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ If both fields are NULL, 'lp5523' is used by default.
3535
LP5523 has the internal program memory for running various LED patterns.
3636
There are two ways to run LED patterns.
3737

38-
1) Legacy interface - enginex_mode, enginex_load and enginex_leds
38+
1) sysfs interface - enginex_mode, enginex_load and enginex_leds
3939

4040
Control interface for the engines:
4141

drivers/leds/Kconfig

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,6 @@ config LEDS_EL15203000
214214
To compile this driver as a module, choose M here: the module
215215
will be called leds-el15203000.
216216

217-
config LEDS_EXPRESSWIRE
218-
bool
219-
depends on GPIOLIB
220-
221217
config LEDS_TURRIS_OMNIA
222218
tristate "LED support for CZ.NIC's Turris Omnia"
223219
depends on LEDS_CLASS_MULTICOLOR
@@ -443,8 +439,8 @@ config LEDS_LP55XX_COMMON
443439
depends on LEDS_CLASS_MULTICOLOR
444440
depends on OF
445441
depends on I2C
446-
select FW_LOADER
447-
select FW_LOADER_USER_HELPER
442+
imply FW_LOADER
443+
imply FW_LOADER_USER_HELPER
448444
help
449445
This option supports common operations for LP5521/5523/55231/5562/5569/
450446
8501 devices.

drivers/leds/flash/leds-rt4505.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ static int rt4505_probe(struct i2c_client *client)
365365
return ret;
366366
}
367367

368-
child = fwnode_get_next_available_child_node(client->dev.fwnode, NULL);
368+
child = device_get_next_child_node(&client->dev, NULL);
369369
if (!child) {
370370
dev_err(priv->dev, "Failed to get child node\n");
371371
return -EINVAL;

0 commit comments

Comments
 (0)