From nobody Mon Jun 8 06:38:16 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 1897747887A for ; Fri, 5 Jun 2026 07:27:55 +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=1780644478; cv=none; b=MoZMXaIlq1/sDkksEMVO6YKi9xO4LcGw91EW/ZwSIDzBy8a2IGYxvGFLmllQ1s9jEtak2SZhuebIDubTKEKBl21c9h//QsYZUQaAaqUXdrqDognRc7jwG7Yyy/D/AU4qb6NzMBBBTBZtb9Vfx6HfF3nJiHNk9BgjH3k938z9BDQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780644478; c=relaxed/simple; bh=BROUQMEs5SYTB1khzHzfUbPjtunqMoKqykCd5QseKuw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Z77+iwi+sn1rElSaOWkLmhjxY+zlt+oaeDlaF02Ed5WPAg06UogCB04LVxLKNvx0IHxbBSeJNupzbmLFbq1ZqWf3XULSKRTCEqzwnuDbGtwXEhF+4MriyKM6mm6r9iX4nFHlCcm9TpkSflxFGzcUuzUXg4ZNXgO4JhtYtUbEH4o= 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 1wVOy9-0007Tn-37; Fri, 05 Jun 2026 09:27:53 +0200 From: Jonas Rebmann Date: Fri, 05 Jun 2026 09:27:47 +0200 Subject: [PATCH v2 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: <20260605-multicolor-default-v2-1-ed07271df6b0@pengutronix.de> References: <20260605-multicolor-default-v2-0-ed07271df6b0@pengutronix.de> In-Reply-To: <20260605-multicolor-default-v2-0-ed07271df6b0@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=2389; i=jre@pengutronix.de; h=from:subject:message-id; bh=BROUQMEs5SYTB1khzHzfUbPjtunqMoKqykCd5QseKuw=; b=owGbwMvMwCV2ZcYT3onnbjcwnlZLYshSqioP7GjJepB2cALD6ZO8+d/ud+dnS5YXfjtv7Hhj7 oYtp/laOkpZGMS4GGTFFFli1eQUhIz9r5tV2sXCzGFlAhnCwMUpABM5yM3wP9fj8bLPNrqy06tn dvtyvajX/WJk0hvHcIE/2WG71rENdxkZZnPeNZp8OU3CnslviUbtM4Gvp2Qex8908dK+9kz9jPx zdgA= 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 | 11 +++++++= ++++ .../devicetree/bindings/leds/leds-pwm-multicolor.yaml | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documenta= tion/devicetree/bindings/leds/common.yaml index f4e44b33f56d..a34de0a34b42 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -73,6 +73,17 @@ 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, the leds-pwm-multicolor-LED is effectively initialized at + minimum brightness regardless of its linux,default-trigger and + default-brightness properties. + $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..7bf687c89411 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 ; + default-intensity =3D <65535>; }; =20 led-green { --=20 2.54.0.129.g3edf2eeba9 From nobody Mon Jun 8 06:38:16 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 18AC347A0A2 for ; Fri, 5 Jun 2026 07:27:55 +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=1780644477; cv=none; b=G94ky5B56/JurCQaB6pYuVsbFc2sYDH47jylMW5Y1Q9oRRk8jAZ404MynPOqte0xT10MR80wtB5yjs2VTO6LTxtO3KoOfXAIdpx3SQrfI03qAWZOtHxaf/kae8KeR98WVTgLRHPc8ZNqCsx/Y1ZpGpkRrBQmqObsYwlpvIbVmwY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780644477; c=relaxed/simple; bh=m3EVhKuHhihMKDIb4q7QUoYR/Lso17Rn5p1IoK+IwW4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GzvtL3vf4GUCq/kDjzgXe3cYZEHcdzECU0jq4BdybF8haK6zPcYLOTg+rDpkZe6D3ERWcK+1RLmo9lTPc/sZVOOhRO5CjC4z6GInAN3XG2DYcYRU6H27um+lR9quT/eXVISehd+/C+SQHGhCMi9oDoYWW5mylA5dEl1fn4E0hLM= 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 1wVOy9-0007Tn-4t; Fri, 05 Jun 2026 09:27:53 +0200 From: Jonas Rebmann Date: Fri, 05 Jun 2026 09:27:48 +0200 Subject: [PATCH v2 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: <20260605-multicolor-default-v2-2-ed07271df6b0@pengutronix.de> References: <20260605-multicolor-default-v2-0-ed07271df6b0@pengutronix.de> In-Reply-To: <20260605-multicolor-default-v2-0-ed07271df6b0@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=owGbwMvMwCV2ZcYT3onnbjcwnlZLYshSqqow7nhjtO+G7vqC13FTZrN12eeVGyfq1D+5/YLj0 A2nl+ukOkpZGMS4GGTFFFli1eQUhIz9r5tV2sXCzGFlAhnCwMUpABM5FsPwv9ZufpjwJ0FDzuO7 Jkgsvy9+p+NchWPEodDor61v+o1dcxn+WbcsZ2acu2TpfK8PqWF251/dzM3/XpV616frS7NgXMk fTgA= 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