Skip to content

Commit e1c6edc

Browse files
linuswpavelmachek
authored andcommitted
leds: rt8515: Add Richtek RT8515 LED driver
This adds a driver for the Richtek RT8515 dual channel torch/flash white LED driver. This LED driver is found in some mobile phones from Samsung such as the GT-S7710 and GT-I8190. A V4L interface is added. We do not have a proper datasheet for the RT8515 but it turns out that RT9387A has a public datasheet and is essentially the same chip. We designed the driver in accordance with this datasheet. The day someone needs to drive a RT9387A this driver can probably easily be augmented to handle that chip too. Sakari Ailus, Pavel Machek and Andy Shevchenko helped significantly in getting this driver right. Cc: Sakari Ailus <[email protected]> Cc: [email protected] Cc: Stephan Gerhold <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Sakari Ailus <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Pavel Machek <[email protected]>
1 parent c8283eb commit e1c6edc

File tree

5 files changed

+421
-0
lines changed

5 files changed

+421
-0
lines changed

drivers/leds/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,9 @@ config LEDS_ACER_A500
928928
This option enables support for the Power Button LED of
929929
Acer Iconia Tab A500.
930930

931+
comment "Flash and Torch LED drivers"
932+
source "drivers/leds/flash/Kconfig"
933+
931934
comment "LED Triggers"
932935
source "drivers/leds/trigger/Kconfig"
933936

drivers/leds/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,8 @@ obj-$(CONFIG_LEDS_SPI_BYTE) += leds-spi-byte.o
103103
# LED Userspace Drivers
104104
obj-$(CONFIG_LEDS_USER) += uleds.o
105105

106+
# Flash and Torch LED Drivers
107+
obj-$(CONFIG_LEDS_CLASS_FLASH) += flash/
108+
106109
# LED Triggers
107110
obj-$(CONFIG_LEDS_TRIGGERS) += trigger/

drivers/leds/flash/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
if LEDS_CLASS_FLASH
4+
5+
config LEDS_RT8515
6+
tristate "LED support for Richtek RT8515 flash/torch LED"
7+
depends on GPIOLIB
8+
help
9+
This option enables support for the Richtek RT8515 flash
10+
and torch LEDs found on some mobile phones.
11+
12+
To compile this driver as a module, choose M here: the module
13+
will be called leds-rt8515.
14+
15+
endif # LEDS_CLASS_FLASH

drivers/leds/flash/Makefile

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

0 commit comments

Comments
 (0)