From: Pavel Machek <pavel@ucw.cz> To: Daniel Palmer <daniel@0x0f.com> Cc: DTML <devicetree@vger.kernel.org>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, linux-leds@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <bgolaszewski@baylibre.com>, Rob Herring <robh+dt@kernel.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Subject: Re: [PATCH v2 07/11] ARM: dts: mstar: unitv2: Wire up LEDs Date: Sun, 2 Oct 2022 12:26:59 +0200 [thread overview] Message-ID: <20211202191904.GA3286@duo.ucw.cz> (raw) In-Reply-To: <CAFr9PX=TFBGSbZV+hHB4SO5LLmxPXHGXub4RTR36g6yDi5o0kg@mail.gmail.com> [-- Attachment #1: Type: text/plain, Size: 2027 bytes --] 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? :) 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? > > 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 -- http://www.livejournal.com/~pavelmachek [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel@ucw.cz> To: Daniel Palmer <daniel@0x0f.com> Cc: DTML <devicetree@vger.kernel.org>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, linux-leds@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <bgolaszewski@baylibre.com>, Rob Herring <robh+dt@kernel.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Subject: Re: [PATCH v2 07/11] ARM: dts: mstar: unitv2: Wire up LEDs Date: Sun, 2 Oct 2022 12:26:59 +0200 [thread overview] Message-ID: <20211202191904.GA3286@duo.ucw.cz> (raw) In-Reply-To: <CAFr9PX=TFBGSbZV+hHB4SO5LLmxPXHGXub4RTR36g6yDi5o0kg@mail.gmail.com> [-- Attachment #1.1: Type: text/plain, Size: 2027 bytes --] 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? :) 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? > > 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 -- http://www.livejournal.com/~pavelmachek [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-02 10:28 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-23 6:54 [PATCH v2 00/11] gpio: msc313: Add gpio support for ssd20xd Daniel Palmer 2021-09-23 6:54 ` Daniel Palmer 2021-09-23 6:54 ` [PATCH v2 01/11] dt-bindings: gpio: msc313: Add compatible " Daniel Palmer 2021-09-23 6:54 ` Daniel Palmer 2021-09-23 6:54 ` [PATCH v2 02/11] dt-bindings: gpio: msc313: Add offsets " Daniel Palmer 2021-09-23 6:54 ` Daniel Palmer 2021-09-23 6:54 ` [PATCH v2 03/11] dt-bindings: leds: Document "activity" trigger Daniel Palmer 2021-09-23 6:54 ` Daniel Palmer 2021-09-27 19:52 ` Rob Herring 2021-09-27 19:52 ` Rob Herring 2021-09-27 22:51 ` Daniel Palmer 2021-09-27 22:51 ` Daniel Palmer 2021-09-23 6:54 ` [PATCH v2 04/11] gpio: msc313: Code clean ups Daniel Palmer 2021-09-23 6:54 ` Daniel Palmer 2021-09-23 6:54 ` [PATCH v2 05/11] gpio: msc313: Add support for SSD201 and SSD202D Daniel Palmer 2021-09-23 6:54 ` Daniel Palmer 2021-09-23 6:54 ` [PATCH v2 06/11] ARM: dts: mstar: Set gpio compatible for ssd20xd Daniel Palmer 2021-09-23 6:54 ` Daniel Palmer 2021-09-23 6:54 ` [PATCH v2 07/11] ARM: dts: mstar: unitv2: Wire up LEDs Daniel Palmer 2021-09-23 6:54 ` Daniel Palmer 2021-11-30 18:55 ` Pavel Machek 2021-11-30 18:55 ` Pavel Machek 2021-12-02 9:44 ` Daniel Palmer 2021-12-02 9:44 ` Daniel Palmer 2022-10-02 10:26 ` Pavel Machek [this message] 2022-10-02 10:26 ` Pavel Machek 2021-09-23 6:54 ` [PATCH v2 08/11] ARM: dts: mstar: unitv2: Add core regulator Daniel Palmer 2021-09-23 6:54 ` Daniel Palmer 2021-09-23 6:54 ` [PATCH v2 09/11] ARM: dts: mstar: unitv2: Add io regulator Daniel Palmer 2021-09-23 6:54 ` Daniel Palmer 2021-09-23 6:54 ` [PATCH v2 10/11] ARM: dts: mstar: unitv2: Add DRAM regulator Daniel Palmer 2021-09-23 6:54 ` Daniel Palmer 2021-09-23 6:55 ` [PATCH v2 11/11] ARM: dts: mstar: unitv2: Add wifi switch Daniel Palmer 2021-09-23 6:55 ` Daniel Palmer 2021-11-19 13:11 ` [PATCH v2 00/11] gpio: msc313: Add gpio support for ssd20xd Daniel Palmer 2021-11-19 13:11 ` Daniel Palmer 2021-11-22 0:04 ` Linus Walleij 2021-11-22 0:04 ` Linus Walleij 2021-11-22 10:01 ` Daniel Palmer 2021-11-22 10:01 ` Daniel Palmer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211202191904.GA3286@duo.ucw.cz \ --to=pavel@ucw.cz \ --cc=bgolaszewski@baylibre.com \ --cc=daniel@0x0f.com \ --cc=devicetree@vger.kernel.org \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-leds@vger.kernel.org \ --cc=robh+dt@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.