Thread (34 messages) 34 messages, 4 authors, 11d ago

Re: [PATCH v3 08/11] video: backlight: lm3533_bl: Improve linear sysfs logic

From: Svyatoslav Ryhel <hidden>
Date: 2026-06-02 10:19:14
Also in: dri-devel, linux-devicetree, linux-iio, linux-leds, lkml

вт, 2 черв. 2026 р. о 11:09 Andy Shevchenko [off-list ref] пише:
On Mon, Jun 01, 2026 at 06:18:28PM +0300, Svyatoslav Ryhel wrote:
quoted
Simplify the sysfs logic of the linear property by switching to a macro
and a ternary operator.
...
quoted
      if (kstrtoul(buf, 0, &linear))
              return -EINVAL;
Besides _assign_bits() in the below, side note here to unshadow error codes:

        ret = kstrtoul(buf, 0, &linear);
        if (ret)
                return ret;

(obviously in a separate change).
Won't happen in this patches.
...
quoted
      ret = regmap_update_bits(bl->lm3533->regmap, LM3533_REG_CTRLBANK_AB_BCONF,
-                              mask, val);
+                              CTRLBANK_AB_BCONF_MODE(id),
+                              linear ? CTRLBANK_AB_BCONF_MODE(id) : 0);
      if (ret)
              return ret;
--
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