All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luka Panio <lukapanio@gmail.com>
To: lee@kernel.org, danielt@kernel.org, jingoohan1@gmail.com
Cc: pavel@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, deller@gmx.de, griffin@kroah.com,
	junjie.cao@linux.dev, mitltlatltl@gmail.com,
	andreas@kemnade.info, dri-devel@lists.freedesktop.org,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Luka Panio <lukapanio@gmail.com>
Subject: [PATCH v2 5/6] backlight: aw99706: Support the led-max-microamp property
Date: Sat,  5 Dec 2026 01:51:17 +0100	[thread overview]
Message-ID: <20261205005118.884885-6-lukapanio@gmail.com> (raw)
In-Reply-To: <20261205005118.884885-1-lukapanio@gmail.com>

Signed-off-by: Luka Panio <lukapanio@gmail.com>
---
 drivers/video/backlight/aw99706.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/video/backlight/aw99706.c b/drivers/video/backlight/aw99706.c
index db12ee1c979d..5e0f8ccd3c88 100644
--- a/drivers/video/backlight/aw99706.c
+++ b/drivers/video/backlight/aw99706.c
@@ -77,6 +77,7 @@ static const u32 aw99706_ulvo_thres_tbl[] = {
 
 struct aw99706_dt_prop {
 	const char * const name;
+	const char * const legacy_name;
 	int (*lookup)(const struct aw99706_dt_prop *prop, u32 dt_val, u8 *val);
 	const u32 * const lookup_tbl;
 	u8 tbl_size;
@@ -147,7 +148,8 @@ static const struct aw99706_dt_prop aw99706_dt_props[] = {
 		.def_val = 3000000,
 	},
 	{
-		.name = "awinic,iled-max-microamp",
+		.name = "led-max-microamp",
+		.legacy_name = "awinic,iled-max-microamp",
 		.lookup = aw99706_dt_property_range,
 		.min = 5000, .max = 50000, .step = 500,
 		.reg = AW99706_CFG2_REG, .mask = AW99706_ILED_MAX_MASK,
@@ -291,6 +293,10 @@ static void aw99706_dt_parse(struct aw99706_device *aw,
 	for (i = 0; i < chip->num_dt_props; i++) {
 		prop = &chip->dt_props[i];
 		ret = device_property_read_u32(aw->dev, prop->name, &dt_val);
+		if (ret < 0 && prop->legacy_name)
+			ret = device_property_read_u32(aw->dev,
+						       prop->legacy_name,
+						       &dt_val);
 		if (ret < 0)
 			dt_val = prop->def_val;
 
-- 
2.55.0


  parent reply	other threads:[~2026-12-05  0:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05  0:51 [PATCH v2 0/6] backlight: aw99706: Add Awinic AW99703 support Luka Panio
2026-12-05  0:51 ` [PATCH v2 1/6] dt-bindings: leds: backlight: aw99706: Use standard led-max-microamp Luka Panio
2026-12-05  1:01   ` sashiko-bot
2026-12-05  0:51 ` [PATCH v2 2/6] dt-bindings: leds: backlight: Add Awinic AW99703 backlight Luka Panio
2026-12-05  1:04   ` sashiko-bot
2026-12-05  9:55   ` Andreas Kemnade
2026-12-05  0:51 ` [PATCH v2 3/6] backlight: aw99706: Enable the chip before reading its ID Luka Panio
2026-12-05  1:05   ` sashiko-bot
2026-12-05  0:51 ` [PATCH v2 4/6] backlight: aw99706: Introduce per-chip data Luka Panio
2026-12-05  0:51 ` Luka Panio [this message]
2026-12-05  0:59   ` [PATCH v2 5/6] backlight: aw99706: Support the led-max-microamp property sashiko-bot
2026-12-05  0:51 ` [PATCH v2 6/6] backlight: aw99706: Add AW99703 support Luka Panio
2026-12-05  1:11   ` sashiko-bot
2026-12-05  1:11 ` [PATCH v2 0/6] backlight: aw99706: Add Awinic " sashiko-bot
2026-12-05 12:16 ` Andreas Kemnade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261205005118.884885-6-lukapanio@gmail.com \
    --to=lukapanio@gmail.com \
    --cc=andreas@kemnade.info \
    --cc=conor+dt@kernel.org \
    --cc=danielt@kernel.org \
    --cc=deller@gmx.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=griffin@kroah.com \
    --cc=jingoohan1@gmail.com \
    --cc=junjie.cao@linux.dev \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mitltlatltl@gmail.com \
    --cc=pavel@kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.