Message ID | 20240128204740.2355092-3-aren@peacevolution.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-41949-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp218597dyb; Sun, 28 Jan 2024 12:49:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFI0/mNMYNvdqY6sS8FNzWNu1Jure06R01JEL5D2CzWvZd6dztibHrSl+e2Z1IjDiP2N1Op X-Received: by 2002:a05:6a20:438d:b0:19c:a398:4a67 with SMTP id i13-20020a056a20438d00b0019ca3984a67mr2345828pzl.55.1706474960732; Sun, 28 Jan 2024 12:49:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706474960; cv=pass; d=google.com; s=arc-20160816; b=ttxX9BZiaicVd/DWbQqMyVaXNUFivYdZgr+mylv4UEx+TDJU8ThVp/VJrsQQea8w9Q faCJvCN7+Nu2Cz0UTbtioZhVCuTKYCIPKRlqfvhkCsShYZ77RUrxoMa7rXWZ0l2cj3gD 7NnLNBvve72XR1G5qHLXjHhWxrxGkp93vdUtOD8Ig5oqI2MJa2b/fbzXy/4eOOEW0yE4 C7IlhbtfIfB5yHz8TWSOayuGLx8F7h677lTqTn6jcJJj/hMysGjn84VfKBbLzLMmaAx7 TSs493BQ6sFglksuF37GvKDlrltx2Wzp7nxIfyTrWVkA0LHjtJhf4guIc3HBz/fB1heE 8uyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=dkim-signature:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from; bh=LF65+XU8LGrrA9Zpn4EYhMkrdltaZDZoBBCOReuYI8w=; fh=vogt2Ndq24/cMfcnX2+D+YjJWcEOQng4OQGQG6hZSjo=; b=QHKNfXxfc2+4ykcReWW0S+e0/g5l760nNVPN8etXjQXXSCmGAG+wTuTadwMG+T0CZf uV4dO7b4ElbJ43AqhMcHB6TyNG7Ybpald0Ix7LcrLkU6pMzFcLzaPzGsHfrupo0jJ8+l /dzPXPGNwdLdcnkuo0CYC4mPudSZM4YkV5XJiDHgwUt4Vc1ykEJLSiV4HIo0IIHzV3aU lXJlZLOKXoGNpDlQt23hwctXJ56x9W73JSN5rcrcrKRYBmiZyZyRPh5diJ/go9oXWP5q BNrnhP/Pu6jxcq3INYA9JfyGWnB0PrjaeyQ1Pm5odGx7TFD+GH2v5e9QSVFzf9a8dNgn CcDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@peacevolution.org header.s=dkim header.b="bFmkZPm/"; arc=pass (i=1 spf=pass spfdomain=peacevolution.org dkim=pass dkdomain=peacevolution.org dmarc=pass fromdomain=peacevolution.org); spf=pass (google.com: domain of linux-kernel+bounces-41949-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41949-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=peacevolution.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l20-20020a656814000000b005cf8e57c831si4549587pgt.187.2024.01.28.12.49.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 12:49:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41949-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@peacevolution.org header.s=dkim header.b="bFmkZPm/"; arc=pass (i=1 spf=pass spfdomain=peacevolution.org dkim=pass dkdomain=peacevolution.org dmarc=pass fromdomain=peacevolution.org); spf=pass (google.com: domain of linux-kernel+bounces-41949-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41949-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=peacevolution.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B0AF8B21862 for <ouuuleilei@gmail.com>; Sun, 28 Jan 2024 20:49:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F8B53C68E; Sun, 28 Jan 2024 20:48:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=peacevolution.org header.i=@peacevolution.org header.b="bFmkZPm/" Received: from a.peacevolution.org (a.peacevolution.org [206.189.193.133]) (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 473252E832; Sun, 28 Jan 2024 20:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=206.189.193.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706474926; cv=none; b=aoyJQ7kZ64KPauof89tLXAZvdXwq8JqvHihMdFG4Wuw1L2dFlLQLL0cmZn3v5YkGRPn3xH+F/tGfX8wLsQTAw3LRCly0msb3FShPhoD8YyKM3nv+4AilkSFpbZcKmNTwo0UpMeA1VI99KrY3p+4Bmuqp+EgiTktSgdl6a4P/8tU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706474926; c=relaxed/simple; bh=ag9tr2tiU3unZXuvPUm4zcESACgalTxlviYKmkloah4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nxIMx0TR3bZVBwcdG5Z/rBrBzHFz1UYForxoh8XoH8fiVZsnzgXPz6ipZ43jrpwvKTjsVT9E7R1MkW/L9uQGo2Frus43hwBTwhvqmCC/55KSLdIbuug8E1JmPiIH6JXyb6/RsqtPsG+TH+kh0JCdloTfGE4e9dQ1LiO9W3mzbSQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=peacevolution.org; spf=pass smtp.mailfrom=peacevolution.org; dkim=pass (1024-bit key) header.d=peacevolution.org header.i=@peacevolution.org header.b=bFmkZPm/; arc=none smtp.client-ip=206.189.193.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=peacevolution.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=peacevolution.org Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by a.peacevolution.org (Postfix) with ESMTPA id 414794653B; Sun, 28 Jan 2024 20:48:42 +0000 (UTC) From: Aren Moynihan <aren@peacevolution.org> To: linux-kernel@vger.kernel.org Cc: Miles Alan <m@milesalan.com>, Ondrej Jirman <megi@xff.cz>, Aren Moynihan <aren@peacevolution.org>, Chen-Yu Tsai <wens@csie.org>, Conor Dooley <conor+dt@kernel.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org>, Samuel Holland <samuel@sholland.org>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH 3/4] arm64: dts: sun50i-a64-pinephone: add multicolor led node Date: Sun, 28 Jan 2024 15:45:09 -0500 Message-ID: <20240128204740.2355092-3-aren@peacevolution.org> In-Reply-To: <20240128204740.2355092-1-aren@peacevolution.org> References: <20240128204740.2355092-1-aren@peacevolution.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: auth=pass smtp.auth=aren@peacevolution.org smtp.mailfrom=aren@peacevolution.org X-Spam-Level: ** X-Spamd-Bar: ++ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=peacevolution.org; s=dkim; t=1706474923; h=from:subject:date:message-id:to:cc:mime-version:content-transfer-encoding:in-reply-to:references; bh=LF65+XU8LGrrA9Zpn4EYhMkrdltaZDZoBBCOReuYI8w=; b=bFmkZPm/+Yyttzt/b7BF92FqLnBgnS1PONw3BdS3t253B/ffa43+54TaQ8sg3Rb4Ig/Wzo Paho7iUNgddGj8+9a/Thzyj9W38GTjreOru4TPAdIPqVdQGr8aeSPsNbTA5wIMUqVQiH0F fn/n6G+oE80ZW9yQmoCUfHCDouUFUd8= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789368688246930199 X-GMAIL-MSGID: 1789368688246930199 |
Series |
[1/4] leds: rgb: leds-group-multicolor: allow leds to stay on in suspend
|
|
Commit Message
Aren
Jan. 28, 2024, 8:45 p.m. UTC
The red, green, and blue leds currently in the device tree represent a
single rgb led on the front of the PinePhone.
Signed-off-by: Aren Moynihan <aren@peacevolution.org>
---
.../boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
Comments
Dne nedelja, 28. januar 2024 ob 21:45:09 CET je Aren Moynihan napisal(a): > The red, green, and blue leds currently in the device tree represent a > single rgb led on the front of the PinePhone. > > Signed-off-by: Aren Moynihan <aren@peacevolution.org> > --- > > .../boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > index ad2476ee01e4..6eab61a12cd8 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > @@ -39,21 +39,21 @@ chosen { > leds { > compatible = "gpio-leds"; > > - led-0 { > + led0: led-0 { > function = LED_FUNCTION_INDICATOR; > color = <LED_COLOR_ID_BLUE>; > gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */ > retain-state-suspended; > }; > > - led-1 { > + led1: led-1 { > function = LED_FUNCTION_INDICATOR; > color = <LED_COLOR_ID_GREEN>; > gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */ > retain-state-suspended; > }; > > - led-2 { > + led2: led-2 { > function = LED_FUNCTION_INDICATOR; > color = <LED_COLOR_ID_RED>; > gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */ > @@ -61,6 +61,13 @@ led-2 { > }; > }; > > + multi-led { > + compatible = "leds-group-multicolor"; > + color = <LED_COLOR_ID_RGB>; > + function = LED_FUNCTION_INDICATOR; Does it make sense to have function specified here and above? Example specifies it only in multi-led node. Best regards, Jernej > + leds = <&led0>, <&led1>, <&led2>; > + }; > + > reg_ps: ps-regulator { > compatible = "regulator-fixed"; > regulator-name = "ps"; >
On Tue, Jan 30, 2024 at 08:41:14PM +0100, Jernej Škrabec wrote: > Dne nedelja, 28. januar 2024 ob 21:45:09 CET je Aren Moynihan napisal(a): > > The red, green, and blue leds currently in the device tree represent a > > single rgb led on the front of the PinePhone. > > > > Signed-off-by: Aren Moynihan <aren@peacevolution.org> > > --- > > > > .../boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 13 ++++++++++--- > > 1 file changed, 10 insertions(+), 3 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > > index ad2476ee01e4..6eab61a12cd8 100644 > > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > > @@ -39,21 +39,21 @@ chosen { > > leds { > > compatible = "gpio-leds"; > > > > - led-0 { > > + led0: led-0 { > > function = LED_FUNCTION_INDICATOR; > > color = <LED_COLOR_ID_BLUE>; > > gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */ > > retain-state-suspended; > > }; > > > > - led-1 { > > + led1: led-1 { > > function = LED_FUNCTION_INDICATOR; > > color = <LED_COLOR_ID_GREEN>; > > gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */ > > retain-state-suspended; > > }; > > > > - led-2 { > > + led2: led-2 { > > function = LED_FUNCTION_INDICATOR; > > color = <LED_COLOR_ID_RED>; > > gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */ > > @@ -61,6 +61,13 @@ led-2 { > > }; > > }; > > > > + multi-led { > > + compatible = "leds-group-multicolor"; > > + color = <LED_COLOR_ID_RGB>; > > + function = LED_FUNCTION_INDICATOR; > > Does it make sense to have function specified here and above? Example > specifies it only in multi-led node. I'm not sure it makes much of a difference, besides perhaps confusing userspace. From what I can tell the only thing it'll change is the name of the directory in sysfs from "<color>:status" to "<color>:". I'll change this in v2 unless anyone has a reason not to. Thanks - Aren > Best regards, > Jernej > > > + leds = <&led0>, <&led1>, <&led2>; > > + }; > > + > > reg_ps: ps-regulator { > > compatible = "regulator-fixed"; > > regulator-name = "ps";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi index ad2476ee01e4..6eab61a12cd8 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi @@ -39,21 +39,21 @@ chosen { leds { compatible = "gpio-leds"; - led-0 { + led0: led-0 { function = LED_FUNCTION_INDICATOR; color = <LED_COLOR_ID_BLUE>; gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */ retain-state-suspended; }; - led-1 { + led1: led-1 { function = LED_FUNCTION_INDICATOR; color = <LED_COLOR_ID_GREEN>; gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */ retain-state-suspended; }; - led-2 { + led2: led-2 { function = LED_FUNCTION_INDICATOR; color = <LED_COLOR_ID_RED>; gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */ @@ -61,6 +61,13 @@ led-2 { }; }; + multi-led { + compatible = "leds-group-multicolor"; + color = <LED_COLOR_ID_RGB>; + function = LED_FUNCTION_INDICATOR; + leds = <&led0>, <&led1>, <&led2>; + }; + reg_ps: ps-regulator { compatible = "regulator-fixed"; regulator-name = "ps";