Skip to content

Commit c8a684e

Browse files
committed
Merge tag 'leds-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds
Pull LED updates from Pavel Machek: "A new driver for bcm63138, is31fl319x updates, fixups for multicolor. The clevo-mail driver got disabled, it needs an API fix" * tag 'leds-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: (23 commits) leds: is31fl319x: use simple i2c probe function leds: is31fl319x: Fix devm vs. non-devm ordering leds: is31fl319x: Make use of dev_err_probe() leds: is31fl319x: Make use of device properties leds: is31fl319x: Cleanup formatting and dev_dbg calls leds: is31fl319x: Add support for is31fl319{0,1,3} chips leds: is31fl319x: Move chipset-specific values in chipdef struct leds: is31fl319x: Use non-wildcard names for vars, structs and defines leds: is31fl319x: Add missing si-en compatibles dt-bindings: leds: pwm-multicolor: document max-brigthness leds: turris-omnia: convert to use dev_groups leds: leds-bcm63138: get rid of LED_OFF leds: add help info about BCM63138 module name dt-bindings: leds: leds-bcm63138: unify full stops in descriptions dt-bindings: leds: lp50xx: fix LED children names dt-bindings: leds: class-multicolor: reference class directly in multi-led node leds: bcm63138: add support for BCM63138 controller dt-bindings: leds: add Broadcom's BCM63138 controller leds: clevo-mail: Mark as broken pending interface fix leds: pwm-multicolor: Support active-low LEDs ...
2 parents 607ca0f + 38ba0bb commit c8a684e

13 files changed

Lines changed: 811 additions & 218 deletions

Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ patternProperties:
3333
"^multi-led@[0-9a-b]$":
3434
type: object
3535
$ref: leds-class-multicolor.yaml#
36+
unevaluatedProperties: false
37+
3638
description:
3739
This node represents one of the RGB LED devices on Turris Omnia.
3840
No subnodes need to be added for subchannels since this controller only
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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-bcm63138.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Broadcom's BCM63138 LEDs controller
8+
9+
maintainers:
10+
- Rafał Miłecki <rafal@milecki.pl>
11+
12+
description: |
13+
This LEDs controller was first used on BCM63138 and later reused on BCM4908,
14+
BCM6848, BCM6858, BCM63138, BCM63148, BCM63381 and BCM68360 SoCs.
15+
16+
It supports up to 32 LEDs that can be connected parallelly or serially. It
17+
also includes limited support for hardware blinking.
18+
19+
Binding serially connected LEDs isn't documented yet.
20+
21+
properties:
22+
compatible:
23+
oneOf:
24+
- items:
25+
- enum:
26+
- brcm,bcm4908-leds
27+
- brcm,bcm6848-leds
28+
- brcm,bcm6858-leds
29+
- brcm,bcm63148-leds
30+
- brcm,bcm63381-leds
31+
- brcm,bcm68360-leds
32+
- const: brcm,bcm63138-leds
33+
- const: brcm,bcm63138-leds
34+
35+
reg:
36+
maxItems: 1
37+
38+
"#address-cells":
39+
const: 1
40+
41+
"#size-cells":
42+
const: 0
43+
44+
patternProperties:
45+
"^led@[a-f0-9]+$":
46+
type: object
47+
48+
$ref: common.yaml#
49+
50+
properties:
51+
reg:
52+
maxItems: 1
53+
description: LED pin number
54+
55+
active-low:
56+
type: boolean
57+
description: Makes LED active low
58+
59+
required:
60+
- reg
61+
62+
unevaluatedProperties: false
63+
64+
required:
65+
- reg
66+
- "#address-cells"
67+
- "#size-cells"
68+
69+
additionalProperties: false
70+
71+
examples:
72+
- |
73+
#include <dt-bindings/leds/common.h>
74+
75+
leds@ff800800 {
76+
compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds";
77+
reg = <0xff800800 0xdc>;
78+
79+
#address-cells = <1>;
80+
#size-cells = <0>;
81+
82+
led@0 {
83+
reg = <0x0>;
84+
function = LED_FUNCTION_POWER;
85+
color = <LED_COLOR_ID_GREEN>;
86+
default-state = "on";
87+
};
88+
89+
led@3 {
90+
reg = <0x3>;
91+
function = LED_FUNCTION_STATUS;
92+
color = <LED_COLOR_ID_GREEN>;
93+
active-low;
94+
};
95+
};

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ description: |
1919
LED class. Common LED nodes and properties are inherited from the common.yaml
2020
within this documentation directory.
2121
22-
patternProperties:
23-
"^multi-led(@[0-9a-f])?$":
24-
type: object
25-
description: Represents the LEDs that are to be grouped.
26-
properties:
27-
color:
28-
description: |
29-
For multicolor LED support this property should be defined as either
30-
LED_COLOR_ID_RGB or LED_COLOR_ID_MULTI which can be found in
31-
include/linux/leds/common.h.
32-
enum: [ 8, 9 ]
33-
34-
$ref: "common.yaml#"
35-
36-
required:
37-
- color
22+
properties:
23+
$nodename:
24+
pattern: "^multi-led(@[0-9a-f])?$"
25+
26+
color:
27+
description: |
28+
For multicolor LED support this property should be defined as either
29+
LED_COLOR_ID_RGB or LED_COLOR_ID_MULTI which can be found in
30+
include/linux/leds/common.h.
31+
enum: [ 8, 9 ]
32+
33+
required:
34+
- color
35+
36+
allOf:
37+
- $ref: "common.yaml#"
3838

3939
additionalProperties: true
4040

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ patternProperties:
5656
'^multi-led@[0-9a-f]$':
5757
type: object
5858
$ref: leds-class-multicolor.yaml#
59+
unevaluatedProperties: false
60+
5961
properties:
6062
reg:
6163
minItems: 1
@@ -65,8 +67,14 @@ patternProperties:
6567
for the child node. The LED modules can either be used stand alone
6668
or grouped into a module bank.
6769

70+
'#address-cells':
71+
const: 1
72+
73+
'#size-cells':
74+
const: 0
75+
6876
patternProperties:
69-
"(^led-[0-9a-f]$|led)":
77+
"^led@[0-9a-f]+$":
7078
type: object
7179
$ref: common.yaml#
7280

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ properties:
1919

2020
multi-led:
2121
type: object
22+
$ref: leds-class-multicolor.yaml#
23+
unevaluatedProperties: false
24+
25+
properties:
26+
max-brightness:
27+
description:
28+
Maximum brightness possible for the LED
29+
$ref: /schemas/types.yaml#/definitions/uint32
2230

2331
patternProperties:
2432
"^led-[0-9a-z]+$":
@@ -33,6 +41,10 @@ properties:
3341

3442
pwm-names: true
3543

44+
active-low:
45+
description: For PWMs where the LED is wired to supply rather than ground.
46+
type: boolean
47+
3648
color: true
3749

3850
required:
@@ -42,9 +54,6 @@ properties:
4254
required:
4355
- compatible
4456

45-
allOf:
46-
- $ref: leds-class-multicolor.yaml#
47-
4857
additionalProperties: false
4958

5059
examples:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ properties:
5959
multi-led:
6060
type: object
6161
$ref: leds-class-multicolor.yaml#
62+
unevaluatedProperties: false
63+
6264
properties:
6365
"#address-cells":
6466
const: 1

drivers/leds/Kconfig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -447,16 +447,16 @@ config LEDS_LP8860
447447

448448
config LEDS_CLEVO_MAIL
449449
tristate "Mail LED on Clevo notebook"
450-
depends on LEDS_CLASS
450+
depends on LEDS_CLASS && BROKEN
451451
depends on X86 && SERIO_I8042 && DMI
452452
help
453453
This driver makes the mail LED accessible from userspace
454-
programs through the leds subsystem. This LED have three
455-
known mode: off, blink at 0.5Hz and blink at 1Hz.
454+
programs through the LEDs subsystem. This LED has three
455+
known modes: off, blink at 0.5Hz and blink at 1Hz.
456456

457457
The driver supports two kinds of interface: using ledtrig-timer
458458
or through /sys/class/leds/clevo::mail/brightness. As this LED
459-
cannot change it's brightness it blinks instead. The brightness
459+
cannot change its brightness it blinks instead. The brightness
460460
value 0 means off, 1..127 means blink at 0.5Hz and 128..255 means
461461
blink at 1Hz.
462462

@@ -697,7 +697,7 @@ config LEDS_MENF21BMC
697697

698698
config LEDS_IS31FL319X
699699
tristate "LED Support for ISSI IS31FL319x I2C LED controller family"
700-
depends on LEDS_CLASS && I2C && OF
700+
depends on LEDS_CLASS && I2C
701701
select REGMAP_I2C
702702
help
703703
This option enables support for LEDs connected to ISSI IS31FL319x

drivers/leds/blink/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
config LEDS_BCM63138
2+
tristate "LED Support for Broadcom BCM63138 SoC"
3+
depends on LEDS_CLASS
4+
depends on ARCH_BCM4908 || ARCH_BCM_5301X || BCM63XX || COMPILE_TEST
5+
depends on HAS_IOMEM
6+
depends on OF
7+
default ARCH_BCM4908
8+
help
9+
This option enables support for LED controller that is part of
10+
BCM63138 SoC. The same hardware block is known to be also used
11+
in BCM4908, BCM6848, BCM6858, BCM63148, BCM63381 and BCM68360.
12+
13+
If compiled as module it will be called leds-bcm63138.
14+
115
config LEDS_LGM
216
tristate "LED support for LGM SoC series"
317
depends on X86 || COMPILE_TEST

drivers/leds/blink/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# SPDX-License-Identifier: GPL-2.0
2+
obj-$(CONFIG_LEDS_BCM63138) += leds-bcm63138.o
23
obj-$(CONFIG_LEDS_LGM) += leds-lgm-sso.o

0 commit comments

Comments
 (0)