Skip to content

Commit d835ff6

Browse files
committed
Merge tag 'leds-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds
Pull LED updates from Pavel Machek: "Nothing too exciting here, just some fixes" * tag 'leds-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: leds: pca9532: Assign gpio base dynamically leds: trigger: pattern: Switch to using the new API kobj_to_dev() leds: LEDS_BLINK_LGM should depend on X86 leds: lgm: Fix spelling mistake "prepate" -> "prepare" MAINTAINERS: Remove Dan Murphy's bouncing email leds-lm3642: convert comma to semicolon leds: rt4505: Add support for Richtek RT4505 flash LED controller leds: rt4505: Add DT binding document for Richtek RT4505 leds: Kconfig: LEDS_CLASS is usually selected. leds: lgm: Improve Kconfig help leds: lgm: fix gpiolib dependency
2 parents a7efd19 + 23a7004 commit d835ff6

File tree

12 files changed

+525
-28
lines changed

12 files changed

+525
-28
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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-rt4505.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Richtek RT4505 Single Channel LED Driver
8+
9+
maintainers:
10+
- ChiYuan Huang <[email protected]>
11+
12+
description: |
13+
The RT4505 is a flash LED driver that can support up to 375mA and 1.5A for
14+
torch and flash mode, respectively.
15+
16+
The data sheet can be found at:
17+
https://www.richtek.com/assets/product_file/RT4505/DS4505-02.pdf
18+
19+
properties:
20+
compatible:
21+
const: richtek,rt4505
22+
23+
reg:
24+
description: I2C slave address of the controller.
25+
maxItems: 1
26+
27+
led:
28+
type: object
29+
$ref: common.yaml#
30+
31+
required:
32+
- compatible
33+
- reg
34+
35+
additionalProperties: false
36+
37+
examples:
38+
- |
39+
#include <dt-bindings/leds/common.h>
40+
41+
i2c0 {
42+
#address-cells = <1>;
43+
#size-cells = <0>;
44+
45+
led-controller@63 {
46+
compatible = "richtek,rt4505";
47+
reg = <0x63>;
48+
49+
rt4505_flash: led {
50+
function = LED_FUNCTION_FLASH;
51+
color = <LED_COLOR_ID_WHITE>;
52+
led-max-microamp = <375000>;
53+
flash-max-microamp = <1500000>;
54+
flash-max-timeout-us = <800000>;
55+
};
56+
};
57+
};

drivers/leds/Kconfig

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ config LEDS_CLASS
1818
tristate "LED Class Support"
1919
help
2020
This option enables the LED sysfs class in /sys/class/leds. You'll
21-
need this to do anything useful with LEDs. If unsure, say N.
21+
need this to do anything useful with LEDs. If unsure, say Y.
2222

2323
config LEDS_CLASS_FLASH
2424
tristate "LED Flash Class Support"
@@ -928,13 +928,12 @@ config LEDS_ACER_A500
928928
This option enables support for the Power Button LED of
929929
Acer Iconia Tab A500.
930930

931+
source "drivers/leds/blink/Kconfig"
932+
931933
comment "Flash and Torch LED drivers"
932934
source "drivers/leds/flash/Kconfig"
933935

934936
comment "LED Triggers"
935937
source "drivers/leds/trigger/Kconfig"
936938

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

drivers/leds/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ obj-$(CONFIG_LEDS_CLASS_FLASH) += flash/
110110
obj-$(CONFIG_LEDS_TRIGGERS) += trigger/
111111

112112
# LED Blink
113-
obj-$(CONFIG_LEDS_BLINK) += blink/
113+
obj-y += blink/

drivers/leds/blink/Kconfig

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
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.
1+
config LEDS_LGM
2+
tristate "LED support for LGM SoC series"
3+
depends on X86 || COMPILE_TEST
4+
depends on GPIOLIB && LEDS_CLASS && MFD_SYSCON && OF
5+
help
6+
This option enables support for LEDs connected to GPIO lines on
7+
Lightning Mountain (LGM) SoC. Lightning Mountain is a AnyWAN
8+
gateway-on-a-chip SoC to be shipped on mid and high end home
9+
gateways and routers.
710

8-
if LEDS_BLINK
11+
These LEDs are driven by a Serial Shift Output (SSO) controller.
12+
The driver supports hardware blinking and the LEDs can be configured
13+
to be triggered by software/CPU or by hardware.
914

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
15+
Say 'Y' here if you are working on LGM SoC based platform. Otherwise,
16+
say 'N'. To compile this driver as a module, choose M here: the module
17+
will be called leds-lgm-sso.

drivers/leds/blink/Makefile

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

drivers/leds/blink/leds-lgm-sso.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ static int intel_sso_led_probe(struct platform_device *pdev)
793793

794794
ret = clk_prepare_enable(priv->gclk);
795795
if (ret) {
796-
dev_err(dev, "Failed to prepate/enable sso gate clock!\n");
796+
dev_err(dev, "Failed to prepare/enable sso gate clock!\n");
797797
return ret;
798798
}
799799

drivers/leds/flash/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
if LEDS_CLASS_FLASH
44

5+
config LEDS_RT4505
6+
tristate "LED support for RT4505 flashlight controller"
7+
depends on I2C && OF
8+
depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
9+
select REGMAP_I2C
10+
help
11+
This option enables support for the RT4505 flash LED controller.
12+
RT4505 includes torch and flash functions with programmable current.
13+
And it's commonly used to compensate the illuminance for the camera
14+
inside the mobile product like as phones or tablets.
15+
516
config LEDS_RT8515
617
tristate "LED support for Richtek RT8515 flash/torch LED"
718
depends on GPIOLIB

drivers/leds/flash/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3+
obj-$(CONFIG_LEDS_RT4505) += leds-rt4505.o
34
obj-$(CONFIG_LEDS_RT8515) += leds-rt8515.o

0 commit comments

Comments
 (0)