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

Re: [PATCH v2 2/6] mfd: lm3533: Convert to use OF bindings

From: Svyatoslav Ryhel <hidden>
Date: 2026-05-29 11:06:49
Also in: dri-devel, linux-devicetree, linux-iio, linux-leds, lkml

пт, 29 трав. 2026 р. о 14:00 Daniel Thompson [off-list ref] пише:
On Thu, May 28, 2026 at 04:51:19PM +0300, Svyatoslav Ryhel wrote:
quoted
Since there are no users of this driver via platform data, remove the
platform data support and switch to using Device Tree bindings.
Additionally, optimize functions used only by platform data.
The last sentence is a little vague and makes us have to hunt for the
changes in a relatively large patch. If it is referring to the change to
common up the init and update code then it's would better to say that
explicitly!
If I understood Jonathan properly, the last sentence will get its own patch.
quoted
Signed-off-by: Svyatoslav Ryhel <redacted>
---
 drivers/iio/light/lm3533-als.c      |  95 ++++------
 drivers/leds/leds-lm3533.c          |  51 ++++--
 drivers/mfd/lm3533-core.c           | 268 ++++++++++------------------
 drivers/video/backlight/lm3533_bl.c |  52 ++++--
 include/linux/mfd/lm3533.h          |  51 +-----
Just one comment for backlight, below:
quoted
diff --git a/drivers/video/backlight/lm3533_bl.c b/drivers/video/backlight/lm3533_bl.c
index babfd3ceec86..42da652df58d 100644
--- a/drivers/video/backlight/lm3533_bl.c
+++ b/drivers/video/backlight/lm3533_bl.c
@@ -295,13 +293,20 @@ static int lm3533_bl_probe(struct platform_device *pdev)
      bl->cb.id = lm3533_bl_get_ctrlbank_id(bl);
      bl->cb.dev = NULL;                      /* until registered */

+     name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s-%d",
+                           pdev->name, pdev->id);
+     if (!name)
+             return -ENOMEM;
+
      memset(&props, 0, sizeof(props));
      props.type = BACKLIGHT_RAW;
      props.max_brightness = LM3533_BL_MAX_BRIGHTNESS;
-     props.brightness = pdata->default_brightness;
Given the big changes to the driver is there any chance of putting a
good value in props.scale (BACKLIGHT_SCALE_LINEAR or
BACKLIGHT_SCALE_NON_LINEAR)?

If the difference between 50% and 100% *looks* like 50% then the scale is
non-linear (since humn perception of brightness is not linear).
Yes! But not in  this patch. This patchset has a dedicated patch
implementing linear and non-linear configuration from tree which may
include this configuration as well. No guarantees though, but I will
keep in mind this request. Thanks!
Daniel.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help