From nobody Mon Jun 8 09:49:33 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45A89409612 for ; Thu, 4 Jun 2026 11:07:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780571254; cv=none; b=NGwNR9ziDoJ7VYPvd4EJjgTQqffRqR8VydGnQt3u1I2AiCnDNq6JBlDGIBmV7nCPP+h6U8NQvLAp7LBbRELjKmdJTjelAz2QZ/3vDBKIlEpUXyy3SCrEvb+9INaV9Ij6dZSAjJb+OUTk6y2Ihidhg42hCuOi4tFlbFzKIYmGXfQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780571254; c=relaxed/simple; bh=UI19ptAfbs+/bxokWYB04OjuLUR0nA8sE9SP4yeoLAs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rP9b4q4M35l3lXhfhxaZVkQH8eyCAINEf3+gMsoZU73vgpz+OS+7SDhEMoO653mFuCF6z7pfsyc3Pp0aJFyP9zf38ZNT0Xx5MUEIQThKBhs+o9jgPzLtDT2CuKflyMpNAkd0ml+rU5c91ze60x/OYpj9KogwXS6gx1xrgTVGhtM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1wV5v0-0000OO-JM; Thu, 04 Jun 2026 13:07:22 +0200 From: Jonas Rebmann Date: Thu, 04 Jun 2026 13:06:57 +0200 Subject: [PATCH 1/2] dt-bindings: leds: Add default-intensity property Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260604-multicolor-default-v1-1-b07bff431537@pengutronix.de> References: <20260604-multicolor-default-v1-0-b07bff431537@pengutronix.de> In-Reply-To: <20260604-multicolor-default-v1-0-b07bff431537@pengutronix.de> To: Lee Jones , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jacek Anaszewski , Sven Schwermer Cc: Pavel Machek , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Jonas Rebmann X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2359; i=jre@pengutronix.de; h=from:subject:message-id; bh=UI19ptAfbs+/bxokWYB04OjuLUR0nA8sE9SP4yeoLAs=; b=owGbwMvMwCV2ZcYT3onnbjcwnlZLYshSjMnQm7TuP8OUFb0Lub/29k18ZNfWvkNCy3hVu/SB/ eZCGfm7OkpZGMS4GGTFFFli1eQUhIz9r5tV2sXCzGFlAhnCwMUpABPZncXI8M3O+KDeXOsvlYeE /CuKnt5zv+D3Y3Hz4pjigIO6RWue2zH8L+9b72vW41N5zFeqj5Gz76/k7JMqn5h8ipfJak9jjvv HBQA= X-Developer-Key: i=jre@pengutronix.de; a=openpgp; fpr=0B7B750D5D3CD21B3B130DE8B61515E135CD49B5 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::ac X-SA-Exim-Mail-From: jre@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Document the default-intensity property to set a default color on multicolor LEDs. Update pwm-multicolor to support it and update the example to turn the LED red on boot. Signed-off-by: Jonas Rebmann --- Documentation/devicetree/bindings/leds/common.yaml | 10 ++++++= ++++ .../devicetree/bindings/leds/leds-pwm-multicolor.yaml | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documenta= tion/devicetree/bindings/leds/common.yaml index f4e44b33f56d..159a89f77982 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -73,6 +73,16 @@ properties: - keep default: off =20 + default-intensity: + description: + The initial intensity of the LED color component. Used only during + initialization. Defaults to 0. As the intensity of each sub-LED is + multiplied with the overall brightness, without this property on a + sub-LED is effectively initialized at minimum brightness regardless = of + its linux,default-trigger and default-brightness attributes. + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + linux,default-trigger: description: This parameter, if present, is a string defining the trigger assigne= d to diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yam= l b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml index a31a202afe5c..05cc83f4bb82 100644 --- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml +++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml @@ -45,6 +45,8 @@ properties: =20 color: true =20 + default-intensity: true + required: - pwms - color @@ -63,12 +65,14 @@ examples: =20 multi-led { color =3D ; + linux,default-trigger =3D "default-on"; function =3D LED_FUNCTION_INDICATOR; max-brightness =3D <65535>; =20 led-red { pwms =3D <&pwm1 0 1000000>; color =3D ; + linux,default-intensity =3D <65535>; }; =20 led-green { --=20 2.54.0.129.g3edf2eeba9 From nobody Mon Jun 8 09:49:33 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C07F409136 for ; Thu, 4 Jun 2026 11:07:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780571254; cv=none; b=IO2ruxiwV6jx3Q6hy83ZgGqYpzoEYM4fGqzt3xEXHipHam/FodBrSKqAfFI8+97eestL3YOE2yAPAp7UQQGJviUT7CYye1UrHN+AdyEeNp66CEN5t7Yqb0LwjeV2hHP/ux2OuI4RhnWcCNqiA6gez4kK8vQ1GgapqXJSegrLBfE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780571254; c=relaxed/simple; bh=m3EVhKuHhihMKDIb4q7QUoYR/Lso17Rn5p1IoK+IwW4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aYMcvQ1OACuv5+lY6yVdM/P4TqONC4EG5NrQaz/7iESNcS62Hblgp0f9ytXWjSgY9qDMU6NlZaR6sn+0i6+z9IIl94TcKJ5O+9DNFexftjrd5PCiOLEFcrtp7jKfkcOCe3NhdY9aGz0Uk0Z0Lg8XCbSoJp2I/F2JRITqcY/3hTI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1wV5v0-0000OO-Lh; Thu, 04 Jun 2026 13:07:22 +0200 From: Jonas Rebmann Date: Thu, 04 Jun 2026 13:06:58 +0200 Subject: [PATCH 2/2] leds: pwm-multicolor: Introduce default-intensity property Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260604-multicolor-default-v1-2-b07bff431537@pengutronix.de> References: <20260604-multicolor-default-v1-0-b07bff431537@pengutronix.de> In-Reply-To: <20260604-multicolor-default-v1-0-b07bff431537@pengutronix.de> To: Lee Jones , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jacek Anaszewski , Sven Schwermer Cc: Pavel Machek , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Jonas Rebmann X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1213; i=jre@pengutronix.de; h=from:subject:message-id; bh=m3EVhKuHhihMKDIb4q7QUoYR/Lso17Rn5p1IoK+IwW4=; b=owGbwMvMwCV2ZcYT3onnbjcwnlZLYshSjMmMfvFO23AT67WXwf7bvgUL/Knob5dwSD7d5nCBh 5Eh3fNORykLgxgXg6yYIkusmpyCkLH/dbNKu1iYOaxMIEMYuDgFYCIc3gz/cxW+6xvEz33TeOX4 IXbzUG5Zpk/n0zwFD5i+W+Dzs2WJPcM/m6w18r1iMxqZV63eaNve3Mgq7RzZw8+VtPyFDVeglwA bAA== X-Developer-Key: i=jre@pengutronix.de; a=openpgp; fpr=0B7B750D5D3CD21B3B130DE8B61515E135CD49B5 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::ac X-SA-Exim-Mail-From: jre@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Like all LED drivers, pwm-multicolor supports turning on an LED on boot by setting linux,default-trigger, e.g. to "default-on". pwm-multicolor however scales the brightness of the color-component sub-LEDs with their individual intensity value. Since these intensities are zero-initialized, on boot a trigger is invisible until colors are set from userspace. Fix linux,default-trigger for pwm-multicolor by allowing for nonzero default-intensities but default to 0 for backwards-compatibility. Signed-off-by: Jonas Rebmann --- drivers/leds/rgb/leds-pwm-multicolor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/leds/rgb/leds-pwm-multicolor.c b/drivers/leds/rgb/leds= -pwm-multicolor.c index e0d7d3c9215c..3e515df40583 100644 --- a/drivers/leds/rgb/leds-pwm-multicolor.c +++ b/drivers/leds/rgb/leds-pwm-multicolor.c @@ -95,6 +95,8 @@ static int iterate_subleds(struct device *dev, struct pwm= _mc_led *priv, } =20 subled[priv->mc_cdev.num_colors].color_index =3D color; + fwnode_property_read_u32(fwnode, "default-intensity", + &subled[priv->mc_cdev.num_colors].intensity); priv->mc_cdev.num_colors++; } =20 --=20 2.54.0.129.g3edf2eeba9