* [PATCH 0/3] Add support for LTC3208 multi-display driver
@ 2026-03-18 6:59 Jan Carlo Roleda
2026-03-18 6:59 ` [PATCH 1/3] Add Maintainers to LTC3208 LED Driver Jan Carlo Roleda
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jan Carlo Roleda @ 2026-03-18 6:59 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-kernel, linux-leds, devicetree, Jan Carlo Roleda
The LTC3208 is a multi-display LED driver, using a high-efficiency, low
noise charge pump to provide power to 5 channels (MAIN, SUB, RGB, CAM,
AUX). Current for each LED is controlled by the I2C serial interface.
Four AUX current sources can be independently assigned via the I2C port
to the CAM, SUB, MAIN, or AUX DAC controlled displays
Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
---
Jan Carlo Roleda (3):
Add Maintainers to LTC3208 LED Driver
leds: ltc3208: add driver
dt-bindings: leds: Document LTC3208 Multidisplay LED Driver
.../devicetree/bindings/leds/adi,ltc3208.yaml | 159 +++++++++++
MAINTAINERS | 8 +
drivers/leds/Kconfig | 11 +
drivers/leds/Makefile | 1 +
drivers/leds/leds-ltc3208.c | 298 +++++++++++++++++++++
5 files changed, 477 insertions(+)
---
base-commit: e68f95a51d1a8c1594b536c4d495cbea38d47561
change-id: 20260318-upstream-ltc3208-7cc8968bf69e
Best regards,
--
Jan Carlo Roleda <jancarlo.roleda@analog.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] Add Maintainers to LTC3208 LED Driver
2026-03-18 6:59 [PATCH 0/3] Add support for LTC3208 multi-display driver Jan Carlo Roleda
@ 2026-03-18 6:59 ` Jan Carlo Roleda
2026-03-18 6:59 ` [PATCH 2/3] leds: ltc3208: add driver Jan Carlo Roleda
2026-03-18 6:59 ` [PATCH 3/3] dt-bindings: leds: Document LTC3208 Multidisplay LED Driver Jan Carlo Roleda
2 siblings, 0 replies; 6+ messages in thread
From: Jan Carlo Roleda @ 2026-03-18 6:59 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-kernel, linux-leds, devicetree, Jan Carlo Roleda
Adds maintainer reference for the LTC3208 LED Driver.
Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
---
MAINTAINERS | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 55af015174a5..3f3331d7272a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15126,6 +15126,12 @@ W: https://ez.analog.com/linux-software-drivers
F: Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
F: drivers/iio/temperature/ltc2983.c
+LTC3208 LED DRIVER
+M: Jan Carlo Roleda <jancarlo.roleda@analog.com>
+L: linux-leds@vger.kernel.org
+S: Maintained
+W: https://ez.analog.com/linux-software-drivers
+
LTC4282 HARDWARE MONITOR DRIVER
M: Nuno Sa <nuno.sa@analog.com>
L: linux-hwmon@vger.kernel.org
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] leds: ltc3208: add driver
2026-03-18 6:59 [PATCH 0/3] Add support for LTC3208 multi-display driver Jan Carlo Roleda
2026-03-18 6:59 ` [PATCH 1/3] Add Maintainers to LTC3208 LED Driver Jan Carlo Roleda
@ 2026-03-18 6:59 ` Jan Carlo Roleda
2026-03-19 15:53 ` Dan Carpenter
2026-03-18 6:59 ` [PATCH 3/3] dt-bindings: leds: Document LTC3208 Multidisplay LED Driver Jan Carlo Roleda
2 siblings, 1 reply; 6+ messages in thread
From: Jan Carlo Roleda @ 2026-03-18 6:59 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-kernel, linux-leds, devicetree, Jan Carlo Roleda
Kernel driver implementation for LTC3208 Multidisplay LED Driver
Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
---
MAINTAINERS | 1 +
drivers/leds/Kconfig | 11 ++
drivers/leds/Makefile | 1 +
drivers/leds/leds-ltc3208.c | 298 ++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 311 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 3f3331d7272a..48bae02057d5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15131,6 +15131,7 @@ M: Jan Carlo Roleda <jancarlo.roleda@analog.com>
L: linux-leds@vger.kernel.org
S: Maintained
W: https://ez.analog.com/linux-software-drivers
+F: drivers/leds/leds-ltc3208.c
LTC4282 HARDWARE MONITOR DRIVER
M: Nuno Sa <nuno.sa@analog.com>
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 597d7a79c988..867b120ea8ba 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -1029,6 +1029,17 @@ config LEDS_ACER_A500
This option enables support for the Power Button LED of
Acer Iconia Tab A500.
+config LEDS_LTC3208
+ tristate "LED Driver for Analog Devices LTC3208"
+ depends on LEDS_CLASS && I2C
+ select REGMAP_I2C
+ help
+ Say Y to enable the LTC3208 LED driver.
+ This supports the LED device LTC3208.
+
+ To compile this driver as a module, choose M here: the module will
+ be called ltc3208.
+
source "drivers/leds/blink/Kconfig"
comment "Flash and Torch LED drivers"
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
index 8fdb45d5b439..b08b539112b6 100644
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -61,6 +61,7 @@ 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_LTC3208) += leds-ltc3208.o
obj-$(CONFIG_LEDS_MAX5970) += leds-max5970.o
obj-$(CONFIG_LEDS_MAX77650) += leds-max77650.o
obj-$(CONFIG_LEDS_MAX77705) += leds-max77705.o
diff --git a/drivers/leds/leds-ltc3208.c b/drivers/leds/leds-ltc3208.c
new file mode 100644
index 000000000000..24587942cd4e
--- /dev/null
+++ b/drivers/leds/leds-ltc3208.c
@@ -0,0 +1,298 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * LED driver for Analog Devices LTC3208 Multi-Display Driver
+ *
+ * Copyright 2026 Analog Devices Inc.
+ *
+ * Author: Jan Carlo Roleda <jancarlo.roleda@analog.com>
+ */
+#include <linux/bitfield.h>
+#include <linux/errno.h>
+#include <linux/gpio/consumer.h>
+#include <linux/i2c.h>
+#include <linux/init.h>
+#include <linux/leds.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/property.h>
+#include <linux/regmap.h>
+#include <linux/types.h>
+#include <linux/workqueue.h>
+
+#define LTC3208_SET_HIGH_BYTE_DATA(x) FIELD_PREP(GENMASK(7, 4), (x))
+
+/* Registers */
+#define LTC3208_REG_A_GRNRED 0x1 /* Green (High half-byte) and Red (Low half-byte) current DAC*/
+#define LTC3208_REG_B_AUXBLU 0x2 /* AUX (High half-byte) and Blue (Low half-byte) current DAC*/
+#define LTC3208_REG_C_MAIN 0x3 /* Main current DAC */
+#define LTC3208_REG_D_SUB 0x4 /* Sub current DAC */
+#define LTC3208_REG_E_AUX 0x5 /* AUX DAC Select */
+#define LTC3208_REG_F_CAM 0x6 /* CAM (High half-byte and Low half-byte) current DAC*/
+#define LTC3208_REG_G_OPT 0x7 /* Device Options */
+
+/* Device Options register */
+#define LTC3208_OPT_CPO_MASK GENMASK(7, 6)
+#define LTC3208_OPT_DIS_RGBDROP BIT(3)
+#define LTC3208_OPT_DIS_CAMHILO BIT(2)
+#define LTC3208_OPT_EN_RGBS BIT(1)
+
+/* Auxiliary DAC select masks */
+#define LTC3208_AUX1_MASK GENMASK(1, 0)
+#define LTC3208_AUX2_MASK GENMASK(3, 2)
+#define LTC3208_AUX3_MASK GENMASK(5, 4)
+#define LTC3208_AUX4_MASK GENMASK(7, 6)
+
+#define LTC3208_MAX_BRIGHTNESS_4BIT 0xF
+#define LTC3208_MAX_BRIGHTNESS_8BIT 0xFF
+
+#define LTC3208_NUM_LED_GRPS 8
+#define LTC3208_NUM_AUX_LEDS 4
+
+#define LTC3208_NUM_AUX_OPT 4
+#define LTC3208_MAX_CPO_OPT 3
+
+enum ltc3208_aux_channel {
+ LTC3208_AUX_CHAN_AUX = 0,
+ LTC3208_AUX_CHAN_MAIN,
+ LTC3208_AUX_CHAN_SUB,
+ LTC3208_AUX_CHAN_CAM
+};
+
+enum ltc3208_channel {
+ LTC3208_CHAN_MAIN = 0,
+ LTC3208_CHAN_SUB,
+ LTC3208_CHAN_AUX,
+ LTC3208_CHAN_CAML,
+ LTC3208_CHAN_CAMH,
+ LTC3208_CHAN_RED,
+ LTC3208_CHAN_BLUE,
+ LTC3208_CHAN_GREEN
+};
+
+static const char * const ltc3208_dt_aux_channels[] = {
+ "adi,aux1-channel", "adi,aux2-channel",
+ "adi,aux3-channel", "adi,aux4-channel"
+};
+
+static const char * const ltc3208_aux_opt[] = {
+ "aux", "main", "sub", "cam"
+};
+
+
+struct ltc3208_led {
+ struct led_classdev cdev;
+ struct i2c_client *client;
+ enum ltc3208_channel channel;
+};
+
+struct ltc3208_dev {
+ struct i2c_client *client;
+ struct regmap *map;
+ struct ltc3208_led *leds;
+};
+
+static const struct regmap_config ltc3208_regmap_cfg = {
+ .reg_bits = 8,
+ .val_bits = 8,
+};
+
+static int ltc3208_led_set_brightness(struct led_classdev *led_cdev,
+ enum led_brightness brightness)
+{
+ struct ltc3208_led *led = container_of(led_cdev,
+ struct ltc3208_led, cdev);
+ struct i2c_client *client = led->client;
+ struct ltc3208_dev *dev = i2c_get_clientdata(client);
+ struct regmap *map = dev->map;
+ u8 current_level = brightness;
+
+ /*
+ * For registers with 4-bit splits (CAM, AUX/BLUE, GREEN/RED), the other
+ * half of the byte will be retrieved from the stored DAC value before
+ * updating the register.
+ */
+ switch (led->channel) {
+ case LTC3208_CHAN_MAIN:
+ return regmap_write(map, LTC3208_REG_C_MAIN, current_level);
+ case LTC3208_CHAN_SUB:
+ return regmap_write(map, LTC3208_REG_D_SUB, current_level);
+ case LTC3208_CHAN_AUX:
+ /* combine both low and high halves of byte */
+ current_level = LTC3208_SET_HIGH_BYTE_DATA(current_level);
+ current_level |= dev->leds[LTC3208_CHAN_BLUE].cdev.brightness;
+ return regmap_write(map, LTC3208_REG_B_AUXBLU, current_level);
+ case LTC3208_CHAN_BLUE:
+ /* apply high bits stored in other led */
+ current_level |= LTC3208_SET_HIGH_BYTE_DATA(
+ dev->leds[LTC3208_CHAN_AUX].cdev.brightness);
+ return regmap_write(map, LTC3208_REG_B_AUXBLU, current_level);
+ case LTC3208_CHAN_CAMH:
+ current_level = LTC3208_SET_HIGH_BYTE_DATA(current_level);
+ current_level |= dev->leds[LTC3208_CHAN_CAML].cdev.brightness;
+ return regmap_write(map, LTC3208_REG_F_CAM, current_level);
+ case LTC3208_CHAN_CAML:
+ current_level |= LTC3208_SET_HIGH_BYTE_DATA(
+ dev->leds[LTC3208_CHAN_CAMH].cdev.brightness);
+ return regmap_write(map, LTC3208_REG_F_CAM, current_level);
+ case LTC3208_CHAN_GREEN:
+ current_level = LTC3208_SET_HIGH_BYTE_DATA(current_level);
+ current_level |= dev->leds[LTC3208_CHAN_RED].cdev.brightness;
+ return regmap_write(map, LTC3208_REG_A_GRNRED, current_level);
+ case LTC3208_CHAN_RED:
+ current_level |= LTC3208_SET_HIGH_BYTE_DATA(
+ dev->leds[LTC3208_CHAN_GREEN].cdev.brightness);
+ return regmap_write(map, LTC3208_REG_A_GRNRED, current_level);
+ default:
+ dev_err(&client->dev, "Invalid LED Channel\n");
+ return -EINVAL;
+ }
+}
+
+static int ltc3208_update_options(struct ltc3208_dev *dev,
+ bool is_sub, bool is_cam_hi, bool is_rgb_drop)
+{
+ struct regmap *map = dev->map;
+ u8 val = FIELD_PREP(LTC3208_OPT_EN_RGBS, is_sub) |
+ FIELD_PREP(LTC3208_OPT_DIS_CAMHILO, is_cam_hi) |
+ FIELD_PREP(LTC3208_OPT_DIS_RGBDROP, is_rgb_drop);
+
+ return regmap_write(map, LTC3208_REG_G_OPT, val);
+}
+
+static int ltc3208_update_aux_dac(struct ltc3208_dev *dev,
+ enum ltc3208_aux_channel aux_1, enum ltc3208_aux_channel aux_2,
+ enum ltc3208_aux_channel aux_3, enum ltc3208_aux_channel aux_4)
+{
+ struct regmap *map = dev->map;
+ u8 val = FIELD_PREP(LTC3208_AUX1_MASK, aux_1) |
+ FIELD_PREP(LTC3208_AUX2_MASK, aux_2) |
+ FIELD_PREP(LTC3208_AUX3_MASK, aux_3) |
+ FIELD_PREP(LTC3208_AUX4_MASK, aux_4);
+
+ return regmap_write(map, LTC3208_REG_E_AUX, val);
+}
+
+static int ltc3208_probe(struct i2c_client *client)
+{
+ enum ltc3208_aux_channel aux_channels[LTC3208_NUM_AUX_LEDS];
+ struct ltc3208_dev *data;
+ struct ltc3208_led *leds;
+ struct regmap *map;
+ int ret, i;
+ u32 val;
+ bool dropdis_rgb_aux4;
+ bool dis_camhl;
+ bool en_rgbs;
+
+ map = devm_regmap_init_i2c(client, <c3208_regmap_cfg);
+ if (IS_ERR(map))
+ return dev_err_probe(&client->dev, PTR_ERR(map),
+ "Failed to initialize regmap\n");
+
+ data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ leds = devm_kcalloc(&client->dev, LTC3208_NUM_LED_GRPS,
+ sizeof(struct ltc3208_led), GFP_KERNEL);
+ if (!leds)
+ return -ENOMEM;
+
+ data->client = client;
+ data->map = map;
+
+ /* initialize options from devicetree */
+ dis_camhl = device_property_read_bool(&client->dev,
+ "adi,disable-camhl-pin");
+ en_rgbs = device_property_read_bool(&client->dev,
+ "adi,cfg-enrgbs-pin");
+ dropdis_rgb_aux4 = device_property_read_bool(&client->dev,
+ "adi,disable-rgb-aux4-dropout");
+
+ ret = ltc3208_update_options(data, en_rgbs, dis_camhl,
+ dropdis_rgb_aux4);
+ if (ret)
+ return dev_err_probe(&client->dev, ret,
+ "error writing to options register\n");
+
+ /* initialize aux channel configurations from devicetree */
+ for (i = 0; i <= LTC3208_NUM_AUX_LEDS; i++) {
+ ret = device_property_match_property_string(&client->dev,
+ ltc3208_dt_aux_channels[i],
+ ltc3208_aux_opt,
+ LTC3208_NUM_AUX_OPT);
+ /* use default value if absent in devicetree */
+ if (ret == -EINVAL)
+ aux_channels[i] = LTC3208_AUX_CHAN_AUX;
+ else if (ret >= 0)
+ aux_channels[i] = ret;
+ else
+ return dev_err_probe(&client->dev, ret,
+ "Failed getting aux-channel.\n");
+ }
+
+ ret = ltc3208_update_aux_dac(data, aux_channels[0], aux_channels[1],
+ aux_channels[2], aux_channels[3]);
+ if (ret)
+ return dev_err_probe(&client->dev, ret,
+ "error writing to aux %u channel register.\n", i);
+
+ i2c_set_clientdata(client, data);
+
+ device_for_each_child_node_scoped(&client->dev, child) {
+ struct ltc3208_led *led;
+ struct led_init_data init_data = {};
+
+ ret = fwnode_property_read_u32(child, "reg", &val);
+ if (ret || val >= LTC3208_NUM_LED_GRPS)
+ return dev_err_probe(&client->dev, -EINVAL,
+ "Invalid reg property for LED\n");
+
+ led = &leds[val];
+ led->client = client;
+ led->channel = val;
+ led->cdev.brightness_set_blocking = ltc3208_led_set_brightness;
+ led->cdev.max_brightness = LTC3208_MAX_BRIGHTNESS_4BIT;
+ if (val == LTC3208_CHAN_MAIN || val == LTC3208_CHAN_SUB)
+ led->cdev.max_brightness = LTC3208_MAX_BRIGHTNESS_8BIT;
+
+ init_data.fwnode = child;
+
+ ret = devm_led_classdev_register_ext(&client->dev, &led->cdev,
+ &init_data);
+ if (ret)
+ return dev_err_probe(&client->dev, ret,
+ "Failed to register LED %u\n", val);
+ }
+
+ data->leds = leds;
+
+ return 0;
+}
+
+static const struct of_device_id ltc3208_match_table[] = {
+ {.compatible = "adi,ltc3208"},
+ { }
+};
+MODULE_DEVICE_TABLE(of, ltc3208_match_table);
+
+static const struct i2c_device_id ltc3208_idtable[] = {
+ { "ltc3208" },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, ltc3208_idtable);
+
+static struct i2c_driver ltc3208_driver = {
+ .driver = {
+ .name = "ltc3208",
+ .of_match_table = ltc3208_match_table,
+ },
+ .id_table = ltc3208_idtable,
+ .probe = ltc3208_probe,
+};
+module_i2c_driver(ltc3208_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jan Carlo Roleda <jancarlo.roleda@analog.com>");
+MODULE_DESCRIPTION("LTC3208 LED Driver");
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] dt-bindings: leds: Document LTC3208 Multidisplay LED Driver
2026-03-18 6:59 [PATCH 0/3] Add support for LTC3208 multi-display driver Jan Carlo Roleda
2026-03-18 6:59 ` [PATCH 1/3] Add Maintainers to LTC3208 LED Driver Jan Carlo Roleda
2026-03-18 6:59 ` [PATCH 2/3] leds: ltc3208: add driver Jan Carlo Roleda
@ 2026-03-18 6:59 ` Jan Carlo Roleda
2026-03-18 8:30 ` Rob Herring (Arm)
2 siblings, 1 reply; 6+ messages in thread
From: Jan Carlo Roleda @ 2026-03-18 6:59 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-kernel, linux-leds, devicetree, Jan Carlo Roleda
Add Documentation for LTC3208 Multidisplay LED Driver.
Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
---
.../devicetree/bindings/leds/adi,ltc3208.yaml | 159 +++++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 160 insertions(+)
diff --git a/Documentation/devicetree/bindings/leds/adi,ltc3208.yaml b/Documentation/devicetree/bindings/leds/adi,ltc3208.yaml
new file mode 100644
index 000000000000..58ee7a9cc66e
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/adi,ltc3208.yaml
@@ -0,0 +1,159 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2026 Analog Devices, Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/leds-ltc3208.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LTC3208 Multidisplay LED Controller from Linear Technologies (Now Analog Devices).
+
+maintainers:
+ - Jan Carlo Roleda <jancarlo.roleda@analog.com>
+
+description:
+ The LTC3208 is a multidisplay LED controller that can support up to 1A to all
+ connected LEDs.
+
+ The datasheet for this device can be found in
+ https://www.analog.com/en/products/ltc3208.html
+
+
+properties:
+ compatible:
+ const: adi,ltc3208
+
+ reg:
+ maxItems: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ adi,disable-camhl-pin:
+ type: boolean
+ description:
+ Configures whether the external CAMHL pin is disabled.
+ if disabled then the output pins associated with CAM will always select
+ the CAM register's high half-byte brightness.
+
+ adi,cfg-enrgbs-pin:
+ type: boolean
+ description:
+ Configures which channel the ENRGBS pin toggles when it receives a signal.
+ ENRGBS pin controls the SUB channel's output pins if this is set,
+ or RGB channel's output pins if this is unset.
+
+ adi,disable-rgb-aux4-dropout:
+ type: boolean
+ description:
+ Configures the RGB and AUX4 dropout signals to be disabled.
+
+ adi,aux1-channel:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ LED Channel that the AUX1 output pin mirrors its brightness level from.
+ enum: [aux, main, sub, cam]
+ default: aux
+
+ adi,aux2-channel:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ LED Channel that the AUX2 output pin mirrors its brightness level from.
+ enum: [aux, main, sub, cam]
+ default: aux
+
+ adi,aux3-channel:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ LED Channel that the AUX3 output pin mirrors its brightness level from.
+ enum: [aux, main, sub, cam]
+ default: aux
+
+ adi,aux4-channel:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ LED Channel that the AUX4 output pin mirrors its brightness level from.
+ enum: [aux, main, sub, cam]
+ default: aux
+
+patternProperties:
+ "^led@[0-7]$":
+ type: object
+ $ref: /schemas/leds/common.yaml#
+ unevaluatedProperties: false
+ properties:
+ reg:
+ description:
+ LED Channel Number. each channel maps to a specific channel group used
+ to configure the brightness level of the output pins corresponding to
+ the channel.
+ enum:
+ - 0 # Main Channel (8-bit brightness)
+ - 1 # Sub Channel (8-bit brightness)
+ - 2 # AUX Channel (4-bit brightness)
+ - 3 # Camera Channel, Low-side byte (4-bit brightness)
+ - 4 # Camera Channel, High-side byte (4-bit brightness)
+ - 5 # Red Channel (4-bit brightness)
+ - 6 # Blue Channel (4-bit brightness)
+ - 7 # Green Channel (4-bit brightness)
+ required:
+ - reg
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/leds/common.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@1b {
+ compatible = "adi,ltc3208";
+ reg = <0x1b>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ adi,disable-camhl-pin;
+ adi,cfg-enrgbs-pin;
+ adi,disable-rgb-aux4-dropout;
+
+ led@0 {
+ reg = <0>;
+ };
+
+ led@1 {
+ reg = <1>;
+ };
+
+ led@2 {
+ reg = <2>;
+ };
+
+ led@3 {
+ reg = <3>;
+ };
+
+ led@4 {
+ reg = <4>;
+ };
+
+ led@5 {
+ reg = <5>;
+ };
+
+ led@6 {
+ reg = <6>;
+ };
+
+ led@7 {
+ reg = <7>;
+ };
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 48bae02057d5..97072e906928 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15131,6 +15131,7 @@ M: Jan Carlo Roleda <jancarlo.roleda@analog.com>
L: linux-leds@vger.kernel.org
S: Maintained
W: https://ez.analog.com/linux-software-drivers
+F: Documentation/devicetree/bindings/leds/adi,ltc3208.yaml
F: drivers/leds/leds-ltc3208.c
LTC4282 HARDWARE MONITOR DRIVER
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] dt-bindings: leds: Document LTC3208 Multidisplay LED Driver
2026-03-18 6:59 ` [PATCH 3/3] dt-bindings: leds: Document LTC3208 Multidisplay LED Driver Jan Carlo Roleda
@ 2026-03-18 8:30 ` Rob Herring (Arm)
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring (Arm) @ 2026-03-18 8:30 UTC (permalink / raw)
To: Jan Carlo Roleda
Cc: Krzysztof Kozlowski, devicetree, linux-kernel, Conor Dooley,
linux-leds, Pavel Machek, Lee Jones
On Wed, 18 Mar 2026 14:59:22 +0800, Jan Carlo Roleda wrote:
> Add Documentation for LTC3208 Multidisplay LED Driver.
>
> Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
> ---
> .../devicetree/bindings/leds/adi,ltc3208.yaml | 159 +++++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 160 insertions(+)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
./Documentation/devicetree/bindings/leds/adi,ltc3208.yaml:20:1: [warning] too many blank lines (2 > 1) (empty-lines)
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/leds/adi,ltc3208.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename
$id: http://devicetree.org/schemas/leds/leds-ltc3208.yaml
file: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/leds/adi,ltc3208.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260318-upstream-ltc3208-v1-3-015f1f1e9065@analog.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] leds: ltc3208: add driver
2026-03-18 6:59 ` [PATCH 2/3] leds: ltc3208: add driver Jan Carlo Roleda
@ 2026-03-19 15:53 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2026-03-19 15:53 UTC (permalink / raw)
To: oe-kbuild, Jan Carlo Roleda, Lee Jones, Pavel Machek, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: lkp, oe-kbuild-all, linux-kernel, linux-leds, devicetree,
Jan Carlo Roleda
Hi Jan,
kernel test robot noticed the following build warnings:
url: https://github.com/intel-lab-lkp/linux/commits/Jan-Carlo-Roleda/Add-Maintainers-to-LTC3208-LED-Driver/20260319-005902
base: e68f95a51d1a8c1594b536c4d495cbea38d47561
patch link: https://lore.kernel.org/r/20260318-upstream-ltc3208-v1-2-015f1f1e9065%40analog.com
patch subject: [PATCH 2/3] leds: ltc3208: add driver
config: s390-randconfig-r072-20260319 (https://download.01.org/0day-ci/archive/20260319/202603192312.QLMHYKWa-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 4abb927bacf37f18f6359a41639a6d1b3bffffb5)
smatch: v0.5.0-9004-gb810ac53
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202603192312.QLMHYKWa-lkp@intel.com/
New smatch warnings:
drivers/leds/leds-ltc3208.c:222 ltc3208_probe() error: buffer overflow 'ltc3208_dt_aux_channels' 4 <= 4
drivers/leds/leds-ltc3208.c:227 ltc3208_probe() error: buffer overflow 'aux_channels' 4 <= 4
Old smatch warnings:
drivers/leds/leds-ltc3208.c:229 ltc3208_probe() error: buffer overflow 'aux_channels' 4 <= 4
vim +/ltc3208_dt_aux_channels +222 drivers/leds/leds-ltc3208.c
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 176 static int ltc3208_probe(struct i2c_client *client)
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 177 {
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 178 enum ltc3208_aux_channel aux_channels[LTC3208_NUM_AUX_LEDS];
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 179 struct ltc3208_dev *data;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 180 struct ltc3208_led *leds;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 181 struct regmap *map;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 182 int ret, i;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 183 u32 val;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 184 bool dropdis_rgb_aux4;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 185 bool dis_camhl;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 186 bool en_rgbs;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 187
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 188 map = devm_regmap_init_i2c(client, <c3208_regmap_cfg);
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 189 if (IS_ERR(map))
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 190 return dev_err_probe(&client->dev, PTR_ERR(map),
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 191 "Failed to initialize regmap\n");
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 192
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 193 data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 194 if (!data)
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 195 return -ENOMEM;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 196
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 197 leds = devm_kcalloc(&client->dev, LTC3208_NUM_LED_GRPS,
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 198 sizeof(struct ltc3208_led), GFP_KERNEL);
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 199 if (!leds)
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 200 return -ENOMEM;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 201
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 202 data->client = client;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 203 data->map = map;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 204
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 205 /* initialize options from devicetree */
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 206 dis_camhl = device_property_read_bool(&client->dev,
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 207 "adi,disable-camhl-pin");
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 208 en_rgbs = device_property_read_bool(&client->dev,
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 209 "adi,cfg-enrgbs-pin");
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 210 dropdis_rgb_aux4 = device_property_read_bool(&client->dev,
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 211 "adi,disable-rgb-aux4-dropout");
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 212
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 213 ret = ltc3208_update_options(data, en_rgbs, dis_camhl,
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 214 dropdis_rgb_aux4);
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 215 if (ret)
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 216 return dev_err_probe(&client->dev, ret,
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 217 "error writing to options register\n");
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 218
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 219 /* initialize aux channel configurations from devicetree */
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 220 for (i = 0; i <= LTC3208_NUM_AUX_LEDS; i++) {
^^^^^^^^^^^^^^^^^^^^^^^^^
Should this be < LTC3208_NUM_AUX_LEDS instead of <=?
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 221 ret = device_property_match_property_string(&client->dev,
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 @222 ltc3208_dt_aux_channels[i],
^^^^^^^^^^^^^^^^^^^^^^^^^^
Out of bounds.
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 223 ltc3208_aux_opt,
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 224 LTC3208_NUM_AUX_OPT);
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 225 /* use default value if absent in devicetree */
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 226 if (ret == -EINVAL)
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 @227 aux_channels[i] = LTC3208_AUX_CHAN_AUX;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 228 else if (ret >= 0)
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 229 aux_channels[i] = ret;
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 230 else
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 231 return dev_err_probe(&client->dev, ret,
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 232 "Failed getting aux-channel.\n");
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 233 }
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 234
76a4ad1dec9ab2b Jan Carlo Roleda 2026-03-18 235 ret = ltc3208_update_aux_dac(data, aux_channels[0], aux_channels[1],
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-03-19 15:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 6:59 [PATCH 0/3] Add support for LTC3208 multi-display driver Jan Carlo Roleda
2026-03-18 6:59 ` [PATCH 1/3] Add Maintainers to LTC3208 LED Driver Jan Carlo Roleda
2026-03-18 6:59 ` [PATCH 2/3] leds: ltc3208: add driver Jan Carlo Roleda
2026-03-19 15:53 ` Dan Carpenter
2026-03-18 6:59 ` [PATCH 3/3] dt-bindings: leds: Document LTC3208 Multidisplay LED Driver Jan Carlo Roleda
2026-03-18 8:30 ` Rob Herring (Arm)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox