Thread (37 messages) 37 messages, 3 authors, 19d ago

Re: [PATCH v4 14/14] video: leds: backlight: lm3533: Support getting LED sources from DT

From: Andy Shevchenko <hidden>
Date: 2026-06-10 18:54:30
Also in: dri-devel, linux-devicetree, linux-iio, linux-leds, lkml

On Wed, Jun 10, 2026 at 05:45:28PM +0300, Svyatoslav Ryhel wrote:
вт, 9 черв. 2026 р. о 22:23 Andy Shevchenko [off-list ref] пише:
quoted
On Sat, Jun 06, 2026 at 07:57:38AM +0300, Svyatoslav Ryhel wrote:
quoted
Add Control Bank to HVLED/LVLED muxing support based on the led-sources
defined in the device tree.
...
quoted
quoted
+     int ret, i;
No need to add 'i'.
This is personal preference as well. There is no strict rule that
iteration variable must be defined strictly in the for loop.
This is a preference by Linus who is the leader of the project.
Also in IIO we have some set of maintainer preferences.
quoted
quoted
+             for (i = 0; i < led->num_leds; i++) {
                for (unsigned int i = 0; i < led->num_leds; i++) {
quoted
+                     if (led->leds[i] >= LM3533_LVCTRLBANK_MAX)
+                             continue;
+
+                     output_cfg_shift = led->leds[i] * 2;
+                     output_cfg_val |= led->id << output_cfg_shift;
+                     output_cfg_mask |= OUTPUT_LVLED_MASK << output_cfg_shift;
+             }
-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help