leds: TI LP8864/LP8866 support
Subsystems (4)
A. Sverdlin
maintainerv5 cover leds: TI LP8864/LP8866 support
From: Alexander Sverdlin <[email protected]>
The series adds support for a family of Texas Instruments' automotive high-efficiency LED drivers with boost controller. The four or six high-precision current sinks support phase shifting that is automatically adjusted based on the number of channels in use. LED brightness can be controlled globally through the I2C interface or PWM input.
Add new DT bindings for ti,lp8864 to support all four software-compatible devices:
- LP8864
- LP8864S
- LP8866
- LP8866S
Add leds class driver for these devices.
Alexander Sverdlin (2):
dt-bindings: backlight: add TI LP8864/LP8866 LED-backlight drivers
leds: lp8864: New driver
.../bindings/leds/backlight/ti,lp8864.yaml | 80 +++++ MAINTAINERS | 7 + drivers/leds/Kconfig | 12 + drivers/leds/Makefile | 1 + drivers/leds/leds-lp8864.c | 296 ++++++++++++++++++ 5 files changed, 396 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/ti,lp8864.yaml create mode 100644 drivers/leds/leds-lp8864.c
Signature · 1 line
2.47.1
A. Sverdlin
maintainerPATCH v5 1/2 dt-bindings: backlight: add TI LP8864/LP8866 LED-backlight drivers
From: Alexander Sverdlin <[email protected]>
Add bindings for Texas Instruments' LP8864/LP8866 LED-backlight drivers. Note that multiple channels in these models are used for load-balancing and brightness is controlled gobally, so from a user perspective it's only one LED.
---
v5: no changes
v4: no changes
v3: no changes
v2: ti,8860 has been decoupled from this series and converted to YAML separately
.../bindings/leds/backlight/ti,lp8864.yaml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/ti,lp8864.yaml
Documentation/devicetree/bindings/leds/backlight/ti,lp8864.yaml new file +80 -0
@@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/backlight/ti,lp8864.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments - LP8864/LP8866 4/6-Channel LED Driver family + +maintainers: + - Andrew Davis <[email protected]> + - Alexander Sverdlin <[email protected]> + +description: | + LP8866-Q1, LP8866S-Q1, LP8864-Q1, LP8864S-Q1 are display LED-backlight drivers + with 4/6 channels. LED brightness can be controlled globally through the I2C + interface or PWM input. + + For more product information please see the links below: + https://www.ti.com/product/LP8864-Q1 + https://www.ti.com/product/LP8864S-Q1 + https://www.ti.com/product/LP8866-Q1 + https://www.ti.com/product/LP8866S-Q1 + +properties: + compatible: + const: ti,lp8864 + + reg: + maxItems: 1 + description: I2C slave address + + enable-gpios: + maxItems: 1 + description: GPIO pin to enable (active high) / disable the device + + vled-supply: + description: LED supply + + led: + type: object + $ref: common.yaml# + properties: + function: true + color: true + label: true + linux,default-trigger: true + + additionalProperties: false + +required: + - compatible + - reg + - led + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/leds/common.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@3a { + compatible = "ti,lp8864"; + reg = <0x3a>; + enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; + vled-supply = <&vbatt>; + + led { + function = LED_FUNCTION_BACKLIGHT; + color = <LED_COLOR_ID_WHITE>; + linux,default-trigger = "backlight"; + }; + }; + }; + +...
Signature · 1 line
2.47.1
Re: [PATCH v5 1/2] dt-bindings: backlight: add TI LP8864/LP8866 LED-backlight drivers
Quoted 15 lines · A. Sverdlin
From: Alexander Sverdlin <[email protected]>
Add bindings for Texas Instruments' LP8864/LP8866 LED-backlight drivers. Note that multiple channels in these models are used for load-balancing and brightness is controlled gobally, so from a user perspective it's only one LED.
Reviewed-by Rob Herring (Arm) <[email protected]>Signed-off-by Alexander Sverdlin <[email protected]>---
v5: no changes
v4: no changes
v3: no changes
v2: ti,8860 has been decoupled from this series and converted to YAML separately
Quoted 3 lines
.../bindings/leds/backlight/ti,lp8864.yaml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/ti,lp8864.yaml
Applied as it seems this was missed by Lee.
In the future, you can resend without my ack/review tag and ask me to apply if something gets missed.
Rob
A. Sverdlin
maintainerPATCH v5 2/2 leds: lp8864: New driver
In reply to A. SverdlinFrom: Alexander Sverdlin <[email protected]>
Add driver for TI LP8864, LP8864S, LP8866 4/6 channel LED-backlight drivers with I2C interface.
---
Changelog:
v5: fixed LP8864_LED_STATUS_WR_MASK definition
v4:
- better separated comments from register defines
- removed NULL from fault text arrays for two regs with odd-even structure
- changed HW fault printf from errors to warnings
- renamed "buf" -> "val"
- reflowed the code with up to 100 symbols per line
- added comments for 8<->16-bit linear scaling in set/get callbacks
- removed register names from error messages
v3:
- dropped lp8864_init(), REGCACHE_NONE, %pe in dev_err_probe(), i2c_set_clientdata()
- added devm_add_action_or_reset() return value check, dev_err_probe() after devm_regmap_init_i2c()
v2: no changes
MAINTAINERS | 7 + drivers/leds/Kconfig | 12 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-lp8864.c | 296 +++++++++++++++++++++++++++++++++++++ 4 files changed, 316 insertions(+) create mode 100644 drivers/leds/leds-lp8864.c
MAINTAINERS +7 -0
@@ -23322,6 +23322,13 @@ S: Supported F: Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml F: drivers/iio/dac/ti-dac7612.c +TEXAS INSTRUMENTS' LB8864 LED BACKLIGHT DRIVER +M: Alexander Sverdlin <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/leds/backlight/ti,lp8864.yaml +F: drivers/leds/leds-lp8864.c + TEXAS INSTRUMENTS' SYSTEM CONTROL INTERFACE (TISCI) PROTOCOL DRIVER M: Nishanth Menon <[email protected]> M: Tero Kristo <[email protected]>
drivers/leds/Kconfig +12 -0
@@ -513,6 +513,18 @@ config LEDS_LP8860 on the LP8860 4 channel LED driver using the I2C communication bus. +config LEDS_LP8864 + tristate "LED support for the TI LP8864/LP8866 4/6 channel LED drivers" + depends on LEDS_CLASS && I2C && OF + select REGMAP_I2C + help + If you say yes here you get support for the TI LP8864-Q1, + LP8864S-Q1, LP8866-Q1, LP8866S-Q1 4/6 channel LED backlight + drivers with I2C interface. + + To compile this driver as a module, choose M here: the + module will be called leds-lp8864. + config LEDS_CLEVO_MAIL tristate "Mail LED on Clevo notebook" depends on LEDS_CLASS && BROKEN
drivers/leds/Makefile +1 -0
@@ -57,6 +57,7 @@ obj-$(CONFIG_LEDS_LP55XX_COMMON) += leds-lp55xx-common.o obj-$(CONFIG_LEDS_LP8501) += leds-lp8501.o obj-$(CONFIG_LEDS_LP8788) += leds-lp8788.o obj-$(CONFIG_LEDS_LP8860) += leds-lp8860.o +obj-$(CONFIG_LEDS_LP8864) += leds-lp8864.o obj-$(CONFIG_LEDS_LT3593) += leds-lt3593.o obj-$(CONFIG_LEDS_MAX5970) += leds-max5970.o obj-$(CONFIG_LEDS_MAX77650) += leds-max77650.o
drivers/leds/leds-lp8864.c new file +296 -0
296 lines not on this page · raw message
Signature · 1 line
2.47.1
Re: (subset) [PATCH v5 2/2] leds: lp8864: New driver
Quoted 4 lines · A. Sverdlin
Add driver for TI LP8864, LP8864S, LP8866 4/6 channel LED-backlight drivers with I2C interface.
Applied, thanks!
[2/2] leds: lp8864: New driver
commit: e14d879292b0f7755c0d51b82a19b30859bb080a
--
Lee Jones [李琼斯]