Skip to content

Commit fecfd01

Browse files
committed
Merge tag 'leds-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds
Pull LED updates from Pavel Machek: "Besides the usual fixes and new drivers, we are changing CLASS_FLASH to return success to make it easier to work with V4L2 stuff disabled, and we are getting rid of enum that should have been plain integer long time ago. I'm slightly nervous about potential warnings, but it needed to be fixed at some point" * tag 'leds-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: leds: lp50xx: Get rid of redundant explicit casting leds: lp50xx: Update headers block to reflect reality leds: lp50xx: Get rid of redundant check in lp50xx_enable_disable() leds: lp50xx: Reduce level of dereferences leds: lp50xx: Switch to new style i2c-driver probe function leds: lp50xx: Don't spam logs when probe is deferred leds: apu: extend support for PC Engines APU1 with newer firmware leds: flash: Fix multicolor no-ops registration by return 0 leds: flash: Add flash registration with undefined CONFIG_LEDS_CLASS_FLASH leds: lgm: Add LED controller driver for LGM SoC dt-bindings: leds: Add bindings for Intel LGM SoC leds: led-core: Get rid of enum led_brightness leds: gpio: Set max brightness to 1 leds: lm3533: Switch to using the new API kobj_to_dev() leds: ss4200: simplify the return expression of register_nasgpio_led() leds: Use DEVICE_ATTR_{RW, RO, WO} macros
2 parents 360db2b + b0a82ef commit fecfd01

24 files changed

+1196
-169
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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-lgm.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Intel Lightning Mountain (LGM) SoC LED Serial Shift Output (SSO) Controller driver
8+
9+
maintainers:
10+
- Zhu, Yi Xin <[email protected]>
11+
- Amireddy Mallikarjuna reddy <[email protected]>
12+
13+
properties:
14+
compatible:
15+
const: intel,lgm-ssoled
16+
17+
gpio-controller: true
18+
19+
'#gpio-cells':
20+
const: 2
21+
22+
ngpios:
23+
minimum: 0
24+
maximum: 32
25+
description:
26+
Number of GPIOs this controller provides.
27+
28+
intel,sso-update-rate-hz:
29+
description:
30+
Blink frequency for SOUTs in Hz.
31+
32+
led-controller:
33+
type: object
34+
description:
35+
This sub-node must contain a sub-node for each leds.
36+
37+
additionalProperties: false
38+
39+
patternProperties:
40+
"^led@[0-23]$":
41+
type: object
42+
43+
properties:
44+
reg:
45+
description: Index of the LED.
46+
minimum: 0
47+
maximum: 2
48+
49+
intel,sso-hw-trigger:
50+
type: boolean
51+
description: This property indicates Hardware driven/control LED.
52+
53+
intel,sso-hw-blink:
54+
type: boolean
55+
description: This property indicates Enable LED blink by Hardware.
56+
57+
intel,sso-blink-rate-hz:
58+
description: LED HW blink frequency.
59+
60+
retain-state-suspended:
61+
type: boolean
62+
description: The suspend state of LED can be retained.
63+
64+
retain-state-shutdown:
65+
type: boolean
66+
description: Retain the state of the LED on shutdown.
67+
68+
required:
69+
- compatible
70+
- reg
71+
- clocks
72+
- clock-names
73+
- "#gpio-cells"
74+
- gpio-controller
75+
76+
additionalProperties: false
77+
78+
examples:
79+
- |
80+
#include <dt-bindings/clock/intel,lgm-clk.h>
81+
#include <dt-bindings/leds/common.h>
82+
83+
ssogpio: ssogpio@e0d40000 {
84+
compatible = "intel,sso-led";
85+
reg = <0xE0D40000 0x2E4>;
86+
gpio-controller;
87+
#gpio-cells = <2>;
88+
ngpios = <32>;
89+
pinctrl-names = "default";
90+
pinctrl-0 = <&pinctrl_ledc>;
91+
clocks = <&cgu0 LGM_GCLK_LEDC0>, <&afeclk>;
92+
clock-names = "sso", "fpid";
93+
intel,sso-update-rate-hz = <250000>;
94+
95+
led-controller {
96+
#address-cells = <1>;
97+
#size-cells = <0>;
98+
99+
led@0 {
100+
reg = <0>;
101+
function = "gphy";
102+
color = <LED_COLOR_ID_GREEN>;
103+
led-gpio = <&ssogpio 0 0>;
104+
};
105+
106+
led@23 {
107+
reg = <23>;
108+
function = LED_FUNCTION_POWER;
109+
color = <LED_COLOR_ID_GREEN>;
110+
led-gpio = <&ssogpio 23 0>;
111+
};
112+
};
113+
};

drivers/leds/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,4 +934,7 @@ source "drivers/leds/flash/Kconfig"
934934
comment "LED Triggers"
935935
source "drivers/leds/trigger/Kconfig"
936936

937+
comment "LED Blink"
938+
source "drivers/leds/blink/Kconfig"
939+
937940
endif # NEW_LEDS

drivers/leds/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,6 @@ obj-$(CONFIG_LEDS_CLASS_FLASH) += flash/
108108

109109
# LED Triggers
110110
obj-$(CONFIG_LEDS_TRIGGERS) += trigger/
111+
112+
# LED Blink
113+
obj-$(CONFIG_LEDS_BLINK) += blink/

drivers/leds/blink/Kconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
menuconfig LEDS_BLINK
2+
bool "LED Blink support"
3+
depends on LEDS_CLASS
4+
help
5+
This option enables blink support for the leds class.
6+
If unsure, say Y.
7+
8+
if LEDS_BLINK
9+
10+
config LEDS_BLINK_LGM
11+
tristate "LED support for Intel LGM SoC series"
12+
depends on LEDS_CLASS
13+
depends on MFD_SYSCON
14+
depends on OF
15+
help
16+
Parallel to serial conversion, which is also called SSO controller,
17+
can drive external shift register for LED outputs.
18+
This enables LED support for Serial Shift Output controller(SSO).
19+
20+
endif # LEDS_BLINK

drivers/leds/blink/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
obj-$(CONFIG_LEDS_BLINK_LGM) += leds-lgm-sso.o

0 commit comments

Comments
 (0)