From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58249C433EF for ; Thu, 2 Dec 2021 09:41:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352867AbhLBJon (ORCPT ); Thu, 2 Dec 2021 04:44:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230447AbhLBJom (ORCPT ); Thu, 2 Dec 2021 04:44:42 -0500 Received: from mail-ua1-x92a.google.com (mail-ua1-x92a.google.com [IPv6:2607:f8b0:4864:20::92a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5863C06174A for ; Thu, 2 Dec 2021 01:41:19 -0800 (PST) Received: by mail-ua1-x92a.google.com with SMTP id l24so54755015uak.2 for ; Thu, 02 Dec 2021 01:41:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/5wglHuW6DrlN2Cy/H7j8MygLggIIOiU+dBSXCAUz94=; b=bM9zFMo4dLwzRQow5Hu02nWkyOEDx02ddKOHKaQWKKR61bdQU2tJSYcrt1NlLcag4J rQ4dh03kLtmediV/qaN76jrpfAz0micE1Wr8sxzPdgygR7+NFhTR7P4XT/eAql290t2D zfFbEiFx7eGMLBLHOW6kVETeS/0EPAyHpvrMM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/5wglHuW6DrlN2Cy/H7j8MygLggIIOiU+dBSXCAUz94=; b=rofmfFsq7arxaueBZuLdzVKj5s7TcHD0mcHAziFbZ3XEfXWNrgL5Ek3ck082xjilZr o0RtKOFAHMg5II8scqyAs8Rblhmk5l7/muF9uvYpgtyskxBqYfqGmnpuoJ9pGWEKpolk 0pmh7vdBekEtJpK1JPRDQHdc/UKR3BDoqXn87YFFSDeCOtEMjV+QjrB95af5OBED8Aay mel2H6wY+wNXHhLkqDLLzSzR3FpXngp8U0XeGCTwaKz1IM6FWetKLyTZZpwX7udhvrUv 7wCeJkgLfwH1hsl/o6aeh8zaW7GUTtFq4xQP3NL4W5atTY7AI+LLB5z0iNtYua/1Yhqf wOGw== X-Gm-Message-State: AOAM5312hZewnPP0KrATt/QFmH40ASlKusrMZl2QO7uzNSObzY+b0abb MurLla3ZqbSyEscGr1zH3lPWYY/RhxvTNeQP2iRQihrZOKE= X-Google-Smtp-Source: ABdhPJwxbYQZwwV9ssvtvJI98cH3l7XJM7RHj+boVjaTmFCzwAqO3kC7kHXsARqZHiJeUUi0Eobq4nb1neZDfWqTlis= X-Received: by 2002:a05:6102:389:: with SMTP id m9mr14024314vsq.43.1638438079011; Thu, 02 Dec 2021 01:41:19 -0800 (PST) MIME-Version: 1.0 References: <20210923065500.2284347-1-daniel@0x0f.com> <20210923065500.2284347-8-daniel@0x0f.com> <20211130185558.GD30113@duo.ucw.cz> In-Reply-To: <20211130185558.GD30113@duo.ucw.cz> From: Daniel Palmer Date: Thu, 2 Dec 2021 18:44:11 +0900 Message-ID: Subject: Re: [PATCH v2 07/11] ARM: dts: mstar: unitv2: Wire up LEDs To: Pavel Machek Cc: DTML , "open list:GPIO SUBSYSTEM" , linux-leds@vger.kernel.org, Linus Walleij , Bartosz Golaszewski , Rob Herring , linux-arm-kernel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Hi Pavel, On Wed, 1 Dec 2021 at 03:56, Pavel Machek wrote: > > Hi! > > > Add the red and white leds present on the unitv2. > > Thanks for cc-ing me. > > > @@ -18,6 +20,18 @@ aliases { > > chosen { > > stdout-path = "serial0:115200n8"; > > }; > > + > > + leds { > > + compatible = "gpio-leds"; > > + led-white { > > + gpios = <&gpio SSD20XD_GPIO_GPIO0 GPIO_ACTIVE_LOW>; > > + linux,default-trigger = "activity"; > > + }; > > + led-red { > > + gpios = <&gpio SSD20XD_GPIO_GPIO1 GPIO_ACTIVE_LOW>; > > + linux,default-trigger = "heartbeat"; > > + }; > > + }; > > How do these look in userspace (ls /sys/class/leds)? >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? :) >Should the first one be disk-activity? 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. Cheers, Daniel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46E25C433F5 for ; Thu, 2 Dec 2021 09:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Pi83iQ+EYIvlIdeJNaIBQ8nZ0RS16ErvAFvPr7BnrdE=; b=XLbzZQqoaG0q45 c9HdZbRsX8c51dMDjt1eyYfaJ67lpZSTcW0HijVCJi0RzwSNVmzl72tEo0UpBIwBlxKEmb3dTef1s MCpFjz861SPMv7DOvFbLAPmLv9/bZ6R4Uj7QagN03NpujDOSecxiu8iqtIpvierxY/Fw+KJyrlXKa cdqkNAg+FLGw5xFdLDKVX7Hsq3uq9L4q95IgI/2tTAjJdrwogS9kiwWUZUEhdyfKusBY1+HhMCfeq WoYlMbwDM0UZ3M9t9qHK2sYc3PjFqsFZHtQkWuhbSRTZw+uuSn5PVEk5dDWTu3aCM/V9iskJLocoa XCmrT1NzNKnCqlYaNUUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msian-00BctD-M8; Thu, 02 Dec 2021 09:41:30 +0000 Received: from mail-ua1-x931.google.com ([2607:f8b0:4864:20::931]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msiaf-00Bcq7-Bj for linux-arm-kernel@lists.infradead.org; Thu, 02 Dec 2021 09:41:22 +0000 Received: by mail-ua1-x931.google.com with SMTP id j14so54493260uan.10 for ; Thu, 02 Dec 2021 01:41:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/5wglHuW6DrlN2Cy/H7j8MygLggIIOiU+dBSXCAUz94=; b=bM9zFMo4dLwzRQow5Hu02nWkyOEDx02ddKOHKaQWKKR61bdQU2tJSYcrt1NlLcag4J rQ4dh03kLtmediV/qaN76jrpfAz0micE1Wr8sxzPdgygR7+NFhTR7P4XT/eAql290t2D zfFbEiFx7eGMLBLHOW6kVETeS/0EPAyHpvrMM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/5wglHuW6DrlN2Cy/H7j8MygLggIIOiU+dBSXCAUz94=; b=heaUiq7zBDAfXqH7USLzvDMeWikv3fTSTQnNAK6dsdFbfG/lYMvcIcFB/jXWcA4whl 2YyqnzDS78yTehOVLJ0FxlWkiwIzACTmYFZhJgDlouFsct+v61vmBEKRSouL8AvaQJS3 SP5hprV4ij1lsB4ED4K5cr+xqBDephJy8aEXZZksUAbEMB9mfUu0HWxTCsQ46yV4aebS SQAO+XXl+OE0snyTyCAZle4oYQzL+Z2sLGxHjJG2EQcm/kVjMqyLU9TRDiKfyiAbMrar U9ILs3Xm8JJWsTmGlCMoIUwCQpmdMcGJytvL1jb0m/IN5INL/AzSXCg9ofv9knDGSkB1 rb5g== X-Gm-Message-State: AOAM532Gzg8nycSxlC+lVeZtOZYtlmORRLF/IRHfy9RXWHK7HapKp5Yq 0cZlJfmY1jPV9GEkjJ91yPcp1JpDPXeApVoJcEH5qg== X-Google-Smtp-Source: ABdhPJwxbYQZwwV9ssvtvJI98cH3l7XJM7RHj+boVjaTmFCzwAqO3kC7kHXsARqZHiJeUUi0Eobq4nb1neZDfWqTlis= X-Received: by 2002:a05:6102:389:: with SMTP id m9mr14024314vsq.43.1638438079011; Thu, 02 Dec 2021 01:41:19 -0800 (PST) MIME-Version: 1.0 References: <20210923065500.2284347-1-daniel@0x0f.com> <20210923065500.2284347-8-daniel@0x0f.com> <20211130185558.GD30113@duo.ucw.cz> In-Reply-To: <20211130185558.GD30113@duo.ucw.cz> From: Daniel Palmer Date: Thu, 2 Dec 2021 18:44:11 +0900 Message-ID: Subject: Re: [PATCH v2 07/11] ARM: dts: mstar: unitv2: Wire up LEDs To: Pavel Machek Cc: DTML , "open list:GPIO SUBSYSTEM" , linux-leds@vger.kernel.org, Linus Walleij , Bartosz Golaszewski , Rob Herring , linux-arm-kernel , Linux Kernel Mailing List X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_014121_564535_CCBE179A X-CRM114-Status: GOOD ( 17.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Pavel, On Wed, 1 Dec 2021 at 03:56, Pavel Machek wrote: > > Hi! > > > Add the red and white leds present on the unitv2. > > Thanks for cc-ing me. > > > @@ -18,6 +20,18 @@ aliases { > > chosen { > > stdout-path = "serial0:115200n8"; > > }; > > + > > + leds { > > + compatible = "gpio-leds"; > > + led-white { > > + gpios = <&gpio SSD20XD_GPIO_GPIO0 GPIO_ACTIVE_LOW>; > > + linux,default-trigger = "activity"; > > + }; > > + led-red { > > + gpios = <&gpio SSD20XD_GPIO_GPIO1 GPIO_ACTIVE_LOW>; > > + linux,default-trigger = "heartbeat"; > > + }; > > + }; > > How do these look in userspace (ls /sys/class/leds)? >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? :) >Should the first one be disk-activity? 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. Cheers, Daniel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel