Skip to content

Commit 9f5c7b2

Browse files
author
Emil Dahl Juhl
committed
drivers: led: lp5569: enable auto-increment
The lp5569 controller supports auto-increment for its registers. This is by default enabled in the chip, but the driver actively disabled it. Since auto-increment is useful for writing multiple consecutive registers, enable the feature. The driver, however, doesn't perform such consecutive writes and thus the existing behavior is not altered. Signed-off-by: Emil Dahl Juhl <[email protected]>
1 parent 68361ea commit 9f5c7b2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/releases/release-notes-4.1.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ Drivers and Sensors
119119
* LED
120120

121121
* Added a new set of devicetree based LED APIs, see :c:struct:`led_dt_spec`.
122+
* lp5569: added use of auto-increment functionality.
122123

123124
* LED Strip
124125

drivers/led/lp5569.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ LOG_MODULE_REGISTER(lp5569, CONFIG_LED_LOG_LEVEL);
3131

3232
#define LP5569_MISC 0x2F
3333
#define LP5569_POWERSAVE_EN BIT(5)
34+
#define LP5569_EN_AUTO_INCR BIT(6)
3435
#define LP5569_CP_MODE_SHIFT 3
3536

3637
/* PWM base Register for controlling the duty-cycle */
@@ -110,7 +111,7 @@ static int lp5569_enable(const struct device *dev)
110111
}
111112

112113
ret = i2c_reg_write_byte_dt(&config->bus, LP5569_MISC,
113-
LP5569_POWERSAVE_EN |
114+
LP5569_POWERSAVE_EN | LP5569_EN_AUTO_INCR |
114115
(config->cp_mode << LP5569_CP_MODE_SHIFT));
115116
if (ret < 0) {
116117
LOG_ERR("LED reg update failed");

0 commit comments

Comments
 (0)