Skip to content

Commit

Permalink
leds: rt8515: Add Richtek RT8515 LED driver
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
linusw authored and pavelmachek committed Jan 31, 2021
1 parent c8283eb commit e1c6edc
Show file tree
Hide file tree
Showing 5 changed files with 421 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/leds/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,9 @@ config LEDS_ACER_A500
This option enables support for the Power Button LED of
Acer Iconia Tab A500.

comment "Flash and Torch LED drivers"
source "drivers/leds/flash/Kconfig"

comment "LED Triggers"
source "drivers/leds/trigger/Kconfig"

Expand Down
3 changes: 3 additions & 0 deletions drivers/leds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,8 @@ obj-$(CONFIG_LEDS_SPI_BYTE) += leds-spi-byte.o
# LED Userspace Drivers
obj-$(CONFIG_LEDS_USER) += uleds.o

# Flash and Torch LED Drivers
obj-$(CONFIG_LEDS_CLASS_FLASH) += flash/

# LED Triggers
obj-$(CONFIG_LEDS_TRIGGERS) += trigger/
15 changes: 15 additions & 0 deletions drivers/leds/flash/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: GPL-2.0

if LEDS_CLASS_FLASH

config LEDS_RT8515
tristate "LED support for Richtek RT8515 flash/torch LED"
depends on GPIOLIB
help
This option enables support for the Richtek RT8515 flash
and torch LEDs found on some mobile phones.

To compile this driver as a module, choose M here: the module
will be called leds-rt8515.

endif # LEDS_CLASS_FLASH
3 changes: 3 additions & 0 deletions drivers/leds/flash/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_LEDS_RT8515) += leds-rt8515.o
Loading

0 comments on commit e1c6edc

Please sign in to comment.