Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1556352rwb; Sun, 2 Oct 2022 03:36:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM64coectRhNq0ZLlZhUNKwJ+UMfARTRgNMFz5jqtSN/JrifPE/LfF0spLbXkNWdirW4d0pl X-Received: by 2002:a17:902:c948:b0:178:ba92:97b5 with SMTP id i8-20020a170902c94800b00178ba9297b5mr16965453pla.132.1664706960328; Sun, 02 Oct 2022 03:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664706960; cv=none; d=google.com; s=arc-20160816; b=YKIfXOgW8v6GjYoQOKu4dA7kquMwVjxacfzhFqSx0KTNpL1JmO8x0ZN1LpsjgDabHQ GYTD848RAfckEqySjZYmtzBQaWIShQ5G7tm2z5o1G/hn+8XeGQ4yINkAnJiZuAXcIPwx N9nHjzVygjeJnbqsR6Q0zJxI5axHas9tjF852d4Mkurk0fgVBloTrDKArdMX40N+3eJD 7facyLo/39O0hSE3869wlMKgjLSbcaccx55GVEjULxEBrwNzEGCkXgpxB/Vkse1GbQk3 KU9YfZ6qNeoERSGMXWuRdhKF/pCPwwby8gX5uJ3vMv04xnExcCiTtWo/I1dZok/76hBA iDvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=jvZgthEJP+YUFpM1NKQE14RzS8WRZddp0iBihRnoGqg=; b=AsSiqMRdhLO2nVCOm3QThlCeL1bqxigP5IOE7jA5QCvvMtHXj9P82Gw6ZT0I6QMdsN Gihhv/LbB2OrGDbUwUQYYeY8kDulIOVBgc4zNCYNFsVQ+ep0zVYvy+lAIEoWUQuGXa7p 9D7AMHdidWvQ28CGJOXJ29qWweXQbSfMrgt6RB3P0ZOHO32fOVeNWYZZpqAbJN2E9n2D 43fSKGMAK4c7TAPz2bckmVBWlWDNLWZjn22FgkijiBLKeDpSi0DUPHOiT/QyT+59sV2Y DzUqO3hx7LDo+v0p0qNNJ32FckMBMGggtlhU56r3jPKfEa4jdVSm6vx10FSq7x35xutm daYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=V0PLPr9c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u14-20020a170902e80e00b0017c2132ef17si5227896plg.246.2022.10.02.03.35.46; Sun, 02 Oct 2022 03:36:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=V0PLPr9c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229458AbiJBK2G (ORCPT + 99 others); Sun, 2 Oct 2022 06:28:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbiJBK2C (ORCPT ); Sun, 2 Oct 2022 06:28:02 -0400 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E8782251E; Sun, 2 Oct 2022 03:28:01 -0700 (PDT) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 0F3701C0016; Sun, 2 Oct 2022 12:27:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1664706479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jvZgthEJP+YUFpM1NKQE14RzS8WRZddp0iBihRnoGqg=; b=V0PLPr9cI8oYbw626i1labAMiQpwPOehBW4npn4Ks8qh2PqeIonA7pr4I1yK5tfbyX5coh nSbWv6wxI3KJs1SkRYPCq3u2Xke4Bq88QRGzhu8zKKNEh41U0+LzLbU8DF5ASX+WJC7NYO i75BVmMDiTP9tkixOnA6pfEu0RMMAWg= Date: Sun, 2 Oct 2022 12:26:59 +0200 From: Pavel Machek To: Daniel Palmer Cc: DTML , "open list:GPIO SUBSYSTEM" , linux-leds@vger.kernel.org, Linus Walleij , Bartosz Golaszewski , Rob Herring , linux-arm-kernel , Linux Kernel Mailing List Subject: Re: [PATCH v2 07/11] ARM: dts: mstar: unitv2: Wire up LEDs Message-ID: <20211202191904.GA3286@duo.ucw.cz> References: <20210923065500.2284347-1-daniel@0x0f.com> <20210923065500.2284347-8-daniel@0x0f.com> <20211130185558.GD30113@duo.ucw.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y7xTucakfITjPcLV" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Y7xTucakfITjPcLV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > Add the red and white leds present on the unitv2. > > > > Thanks for cc-ing me. > > > > > @@ -18,6 +20,18 @@ aliases { > > > chosen { > > > stdout-path =3D "serial0:115200n8"; > > > }; > > > + > > > + leds { > > > + compatible =3D "gpio-leds"; > > > + led-white { > > > + gpios =3D <&gpio SSD20XD_GPIO_GPIO0 GPIO_ACTIVE= _LOW>; > > > + linux,default-trigger =3D "activity"; > > > + }; > > > + led-red { > > > + gpios =3D <&gpio SSD20XD_GPIO_GPIO1 GPIO_ACTIVE= _LOW>; > > > + linux,default-trigger =3D "heartbeat"; > > > + }; > > > + }; > > > > How do these look in userspace (ls /sys/class/leds)? >=20 > >From what I remember the above results in /sys/class/leds/red and > /sys/class/leds/white. > I'll check though. Is there something wrong with that? :) Yes. LEDs are supposed to be named device:color:function. Did manufacturer somehow label them? See also Documentation/leds/well-known-leds.txt . > >Should the first one be disk-activity? >=20 > Good question. My personal preference was for some sort of load > indicator as it helped me when debugging. That's why I have heartbeat > and activity. An "I'm alive signal" and some indication of how much is > going on. > I'm not sure if disk-activity is too useful with these devices as they > usually have everything in a very small rootfs and don't do lots of > disk io because they have pretty small SPI NAND flash for local > storage. Also there isn't anything in mainline that'll trigger the > disk-activity trigger at the moment. > As "activity" isn't documented in the bindings and I don't think I got > an answer from Rob about it, maybe I'll just drop the trigger for now. CPU activity is fine, too, but we want that option documented as you did later in the series. Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --Y7xTucakfITjPcLV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYzlncwAKCRAw5/Bqldv6 8jMfAJ9RmK1MaZ/5/NvDAf0Gj+2v5pstGgCeKVzf6/js5whdZv0zuxE/m2iZ1Rg= =T9CO -----END PGP SIGNATURE----- --Y7xTucakfITjPcLV--