Skip to content

Commit c5eb8bf

Browse files
committed
Merge tag 'leds-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds
Pull LED updates from Lee Jones: "New Drivers: - Add support for MediaTek MT6370 LED Indicator - Add support for MediaTek MT6370 Flashlight - Add support for QCOM PMIC Flash - Add support for Rohm BD2606MVV Charge Pump LED New Device Support: - Add support for PMK8550 PWM to QCOM LPG New Functionality: - Add support for high resolution PWM to QCOM LPG Fix-ups: - Kconfig 'depends' and 'select' dependency changes - Remove unused / irrelevant includes - Remove unnecessary checks (already performed further into the call stack) - Trivial: Fix commentary, simplify error messages - Rid 'defined but not used' warnings - Provide documentation - Explicitly provide include files Bug Fixes: - Mark GPIO LED as BROKEN - Fix Kconfig entries - Fix various Smatch staticify reports - Fix error handling (or a lack there of)" * tag 'leds-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (30 commits) leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver dt-bindings: leds: Add ROHM BD2606MVV LED docs: leds: ledtrig-oneshot: Fix spelling mistake leds: pwm-multicolor: Simplify an error message dt-bindings: leds: Convert PCA9532 to dtschema leds: rgb: leds-qcom-lpg: Add support for PMK8550 PWM leds: rgb: leds-qcom-lpg: Add support for high resolution PWM dt-bindings: leds-qcom-lpg: Add qcom,pmk8550-pwm compatible string leds: tca6507: Fix error handling of using fwnode_property_read_string leds: flash: Set variables mvflash_{3,4}ch_regs storage-class-specifier to static leds: rgb: mt6370: Correct config name to select in LEDS_MT6370_RGB MAINTAINERS: Add entry for LED devices documentation Documentation: leds: MT6370: Use bullet lists for timing variables Documentation: leds: mt6370: Properly wrap hw_pattern chart Documentation: leds: Add MT6370 doc to the toctree leds: rgb: mt6370: Fix implicit declaration for FIELD_GET docs: leds: Add MT6370 RGB LED pattern document leds: flash: mt6370: Add MediaTek MT6370 flashlight support leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support dt-bindings: leds: spmi-flash-led: Add pm6150l compatible ...
2 parents 865fdb0 + 8325642 commit c5eb8bf

27 files changed

Lines changed: 3091 additions & 112 deletions

Documentation/devicetree/bindings/leds/common.yaml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,51 @@ properties:
9090
- heartbeat
9191
# LED indicates disk activity
9292
- disk-activity
93+
# LED indicates disk read activity
9394
- disk-read
95+
# LED indicates disk write activity
9496
- disk-write
9597
# LED flashes at a fixed, configurable rate
9698
- timer
9799
# LED alters the brightness for the specified duration with one software
98100
# timer (requires "led-pattern" property)
99101
- pattern
102+
# LED indicates mic mute state
103+
- audio-micmute
104+
# LED indicates audio mute state
105+
- audio-mute
106+
# LED indicates bluetooth power state
107+
- bluetooth-power
108+
# LED indicates activity of all CPUs
109+
- cpu
110+
# LED indicates camera flash state
111+
- flash
112+
# LED indicated keyboard capslock
113+
- kbd-capslock
114+
# LED indicates MTD memory activity
115+
- mtd
116+
# LED indicates NAND memory activity (deprecated),
117+
# in new implementations use "mtd"
118+
- nand-disk
119+
# No trigger assigned to the LED. This is the default mode
120+
# if trigger is absent
121+
- none
122+
# LED indicates camera torch state
123+
- torch
124+
# LED indicates USB gadget activity
100125
- usb-gadget
126+
# LED indicates USB host activity
101127
- usb-host
128+
# LED indicates USB port state
129+
- usbport
130+
# LED is triggered by CPU activity
102131
- pattern: "^cpu[0-9]*$"
103-
- pattern: "^hci[0-9]+-power$"
104132
# LED is triggered by Bluetooth activity
105-
- pattern: "^mmc[0-9]+$"
133+
- pattern: "^hci[0-9]+-power$"
106134
# LED is triggered by SD/MMC activity
107-
- pattern: "^phy[0-9]+tx$"
135+
- pattern: "^mmc[0-9]+$"
108136
# LED is triggered by WLAN activity
137+
- pattern: "^phy[0-9]+tx$"
109138

110139
led-pattern:
111140
description: |

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

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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ properties:
2727
- qcom,pmc8180c-lpg
2828
- qcom,pmi8994-lpg
2929
- qcom,pmi8998-lpg
30+
- qcom,pmk8550-pwm
3031

3132
"#pwm-cells":
3233
const: 2
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/nxp,pca953x.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: NXP PCA9532 LED Dimmer
8+
9+
maintainers:
10+
- Riku Voipio <riku.voipio@iki.fi>
11+
12+
description: |
13+
The PCA9532 family is SMBus I/O expander optimized for dimming LEDs.
14+
The PWM support 256 steps.
15+
16+
For more product information please see the link below:
17+
https://www.nxp.com/docs/en/data-sheet/PCA9532.pdf
18+
19+
properties:
20+
compatible:
21+
enum:
22+
- nxp,pca9530
23+
- nxp,pca9531
24+
- nxp,pca9532
25+
- nxp,pca9533
26+
27+
reg:
28+
maxItems: 1
29+
30+
gpio-controller: true
31+
32+
'#gpio-cells':
33+
const: 2
34+
35+
patternProperties:
36+
"^led-[0-9a-z]+$":
37+
type: object
38+
$ref: common.yaml#
39+
unevaluatedProperties: false
40+
41+
properties:
42+
type:
43+
description: |
44+
Output configuration, see include/dt-bindings/leds/leds-pca9532.h
45+
$ref: /schemas/types.yaml#/definitions/uint32
46+
default: 0
47+
minimum: 0
48+
maximum: 4
49+
50+
required:
51+
- compatible
52+
- reg
53+
54+
additionalProperties: false
55+
56+
examples:
57+
- |
58+
#include <dt-bindings/leds/leds-pca9532.h>
59+
60+
i2c {
61+
#address-cells = <1>;
62+
#size-cells = <0>;
63+
64+
led-controller@62 {
65+
compatible = "nxp,pca9533";
66+
reg = <0x62>;
67+
68+
led-1 {
69+
label = "pca:red:power";
70+
type = <PCA9532_TYPE_LED>;
71+
};
72+
73+
led-2 {
74+
label = "pca:green:power";
75+
type = <PCA9532_TYPE_LED>;
76+
};
77+
78+
led-3 {
79+
type = <PCA9532_TYPE_LED>;
80+
default-state = "on";
81+
};
82+
83+
led-4 {
84+
type = <PCA9532_TYPE_LED>;
85+
default-state = "keep";
86+
};
87+
};
88+
};
89+
90+
...
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/qcom,spmi-flash-led.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Flash LED device inside Qualcomm Technologies, Inc. PMICs
8+
9+
maintainers:
10+
- Fenglin Wu <quic_fenglinw@quicinc.com>
11+
12+
description: |
13+
Flash LED controller is present inside some Qualcomm Technologies, Inc. PMICs.
14+
The flash LED module can have different number of LED channels supported
15+
e.g. 3 or 4. There are some different registers between them but they can
16+
both support maximum current up to 1.5 A per channel and they can also support
17+
ganging 2 channels together to supply maximum current up to 2 A. The current
18+
will be split symmetrically on each channel and they will be enabled and
19+
disabled at the same time.
20+
21+
properties:
22+
compatible:
23+
items:
24+
- enum:
25+
- qcom,pm6150l-flash-led
26+
- qcom,pm8150c-flash-led
27+
- qcom,pm8150l-flash-led
28+
- qcom,pm8350c-flash-led
29+
- const: qcom,spmi-flash-led
30+
31+
reg:
32+
maxItems: 1
33+
34+
patternProperties:
35+
"^led-[0-3]$":
36+
type: object
37+
$ref: common.yaml#
38+
unevaluatedProperties: false
39+
description:
40+
Represents the physical LED components which are connected to the
41+
flash LED channels' output.
42+
43+
properties:
44+
led-sources:
45+
description:
46+
The HW indices of the flash LED channels that connect to the
47+
physical LED
48+
allOf:
49+
- minItems: 1
50+
maxItems: 2
51+
items:
52+
enum: [1, 2, 3, 4]
53+
54+
led-max-microamp:
55+
anyOf:
56+
- minimum: 5000
57+
maximum: 500000
58+
multipleOf: 5000
59+
- minimum: 10000
60+
maximum: 1000000
61+
multipleOf: 10000
62+
63+
flash-max-microamp:
64+
anyOf:
65+
- minimum: 12500
66+
maximum: 1500000
67+
multipleOf: 12500
68+
- minimum: 25000
69+
maximum: 2000000
70+
multipleOf: 25000
71+
72+
flash-max-timeout-us:
73+
minimum: 10000
74+
maximum: 1280000
75+
multipleOf: 10000
76+
77+
required:
78+
- led-sources
79+
- led-max-microamp
80+
81+
required:
82+
- compatible
83+
- reg
84+
85+
additionalProperties: false
86+
87+
examples:
88+
- |
89+
#include <dt-bindings/leds/common.h>
90+
spmi {
91+
#address-cells = <1>;
92+
#size-cells = <0>;
93+
led-controller@ee00 {
94+
compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led";
95+
reg = <0xee00>;
96+
97+
led-0 {
98+
function = LED_FUNCTION_FLASH;
99+
color = <LED_COLOR_ID_WHITE>;
100+
led-sources = <1>, <4>;
101+
led-max-microamp = <300000>;
102+
flash-max-microamp = <2000000>;
103+
flash-max-timeout-us = <1280000>;
104+
function-enumerator = <0>;
105+
};
106+
107+
led-1 {
108+
function = LED_FUNCTION_FLASH;
109+
color = <LED_COLOR_ID_YELLOW>;
110+
led-sources = <2>, <3>;
111+
led-max-microamp = <300000>;
112+
flash-max-microamp = <2000000>;
113+
flash-max-timeout-us = <1280000>;
114+
function-enumerator = <1>;
115+
};
116+
};
117+
};

0 commit comments

Comments
 (0)