Skip to content
Permalink
Browse files
leds: Add driver for Qualcomm LPG
The Light Pulse Generator (LPG) is a PWM-block found in a wide range of
PMICs from Qualcomm. These PMICs typically comes with 1-8 LPG instances,
with their output being routed to various other components, such as
current sinks or GPIOs.

Each LPG instance can operate on fixed parameters or based on a shared
lookup-table, altering the duty cycle over time. This provides the means
for hardware assisted transitions of LED brightness.

A typical use case for the fixed parameter mode is to drive a PWM
backlight control signal, the driver therefor allows each LPG instance
to be exposed to the kernel either through the LED framework or the PWM
framework.

A typical use case for the LED configuration is to drive RGB LEDs in
smartphones etc, for which the driver support multiple channels to be
ganged up to a MULTICOLOR LED. In this configuration the pattern
generators will be synchronized, to allow for multi-color patterns.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
  • Loading branch information
andersson authored and intel-lab-lkp committed Jun 22, 2021
1 parent 323e0e3 commit eb89f3ce4c58b347137bbc2944d46b60d5c363c2
Show file tree
Hide file tree
Showing 5 changed files with 1,320 additions and 0 deletions.
@@ -933,6 +933,9 @@ source "drivers/leds/blink/Kconfig"
comment "Flash and Torch LED drivers"
source "drivers/leds/flash/Kconfig"

comment "RGB LED drivers"
source "drivers/leds/rgb/Kconfig"

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

@@ -106,6 +106,9 @@ obj-$(CONFIG_LEDS_USER) += uleds.o
# Flash and Torch LED Drivers
obj-$(CONFIG_LEDS_CLASS_FLASH) += flash/

# RGB LED Drivers
obj-$(CONFIG_LEDS_CLASS_MULTICOLOR) += rgb/

# LED Triggers
obj-$(CONFIG_LEDS_TRIGGERS) += trigger/

@@ -0,0 +1,13 @@
# SPDX-License-Identifier: GPL-2.0

if LEDS_CLASS_MULTICOLOR

config LEDS_QCOM_LPG
tristate "LED support for Qualcomm LPG"
depends on OF
depends on SPMI
help
This option enables support for the Light Pulse Generator found in a
wide variety of Qualcomm PMICs.

endif # LEDS_CLASS_MULTICOLOR
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_LEDS_QCOM_LPG) += leds-qcom-lpg.o

0 comments on commit eb89f3c

Please sign in to comment.