From: Christian Marangi <ansuelsmth@gmail.com>
To: Tom Rini <trini@konsulko.com>
Cc: Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Michael Trimarchi <michael@amarulasolutions.com>,
Frieder Schrempf <frieder.schrempf@kontron.de>,
Jagan Teki <jagan@amarulasolutions.com>,
Vignesh R <vigneshr@ti.com>,
Joe Hershberger <joe.hershberger@ni.com>,
Ramon Fried <rfried.dev@gmail.com>,
Arseniy Krasnov <avkrasnov@salutedevices.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Simon Glass <sjg@chromium.org>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Dmitry Dunaev <dunaev@tecon.ru>,
Devarsh Thakkar <devarsht@ti.com>, Bin Meng <bmeng.cn@gmail.com>,
Eugene Uriev <eugeneuriev@gmail.com>,
Nikhil M Jain <n-jain1@ti.com>,
Shiji Yang <yangshiji66@outlook.com>,
Raymond Mao <raymond.mao@linaro.org>,
Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
Doug Zobel <douglas.zobel@climate.com>,
William Zhang <william.zhang@broadcom.com>,
Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>,
Igor Prusov <ivprusov@salutedevices.com>,
Bruce Suen <bruce_suen@163.com>,
Takahiro Kuwano <Takahiro.Kuwano@infineon.com>,
Pratyush Yadav <p.yadav@ti.com>,
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>,
Vaishnav Achath <vaishnav.a@ti.com>,
AKASHI Takahiro <akashi.tkhro@gmail.com>,
u-boot@lists.denx.de
Subject: Re: [PATCH 0/7] misc: introduce STATUS LED activity function
Date: Wed, 5 Jun 2024 22:33:44 +0200 [thread overview]
Message-ID: <6660cba9.050a0220.31f78.af87@mx.google.com> (raw)
In-Reply-To: <20240605202321.GX68077@bill-the-cat>
On Wed, Jun 05, 2024 at 02:23:21PM -0600, Tom Rini wrote:
> On Wed, Jun 05, 2024 at 09:21:32PM +0200, Christian Marangi wrote:
>
> > This series expand the STATUS LED framework with a new color
> > and a big new feature. One thing that many device need is a way
> > to communicate to the user that the device is actually doing
> > something.
> >
> > This is especially useful for recovery steps where an
> > user (for example) insert an USB drive, keep a button pressed
> > and the device autorecover.
> >
> > There is currently no way to signal the user externally that
> > the bootloader is processing/recoverying aside from setting
> > a LED on.
> >
> > A solid LED on is not enough and won't actually signal any
> > kind of progress.
> > Solution is the good old blinking LED but uboot doesn't
> > suggest (and support) interrupts and almost all the LED
> > are usually GPIO LED that doesn't support HW blink.
> >
> > To fix this and handle the problem of device not supporting
> > HW blink, expand the STATUS LED framework with new API.
> >
> > We introduce a new config LED_STATUS_ACTIVITY, that similar
> > to the RED, GREEN and others, takes the LED ID set in
> > the LED_STATUS config and is used as the global LED for activity
> > operations.
> >
> > We add status_led_activity() that simulate software blink.
> > Any function that signal activity will call this function.
> > At each call a counter is increased. When the counter reach
> > the freq value, the LED is toggled simulating a blink and
> > the counter is zeroed. When the counter reach the freq value
> > again, the LED is toggled again and so on...
> >
> > Call to this function is added to the usual operation for
> > recovery. Currently added to tftp traffic and mtd spi and
> > nand write and erase operation.
> >
> > This also contains a big fixup for the gpio_led driver that
> > currently deviates from the Documentation and make the
> > coloured status led feature unusable.
>
> Thanks for the work here, this is quite interesting. My only real
> feedback is, can you please rewrite doc/README.LED as doc/api/led.rst
> (and add it to the index), and then document your new functionality
> there as well?
>
Yes totally, actually my bad for not updating the Documentation.
Honestly I really wanted an early feedback on this for the
implementation. Also I love how it's very easy to add this activity
thing also in other cmd or other task.
--
Ansuel
next prev parent reply other threads:[~2024-06-06 5:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 19:21 [PATCH 0/7] misc: introduce STATUS LED activity function Christian Marangi
2024-06-05 19:21 ` [PATCH 1/7] misc: gpio_led: fix broken coloured LED status functions Christian Marangi
2024-06-05 19:21 ` [PATCH 2/7] led: status_led: add support for white LED colour Christian Marangi
2024-06-05 19:21 ` [PATCH 3/7] led: status_led: add function to toggle a status LED Christian Marangi
2024-06-05 19:21 ` [PATCH 4/7] led: status_led: add new activity LED config and functions Christian Marangi
2024-06-06 8:56 ` neil.armstrong
2024-06-05 19:21 ` [PATCH 5/7] tftp: implement support for LED status activity Christian Marangi
2024-06-06 8:22 ` Peter Robinson
2024-06-06 8:44 ` Christian Marangi
2024-06-05 19:21 ` [PATCH 6/7] mtd: " Christian Marangi
2024-06-05 19:21 ` [PATCH 7/7] ubi: " Christian Marangi
2024-06-05 20:23 ` [PATCH 0/7] misc: introduce STATUS LED activity function Tom Rini
2024-06-05 20:33 ` Christian Marangi [this message]
2024-06-06 9:12 ` Quentin Schulz
2024-06-06 9:52 ` Christian Marangi
2024-06-06 10:55 ` Quentin Schulz
2024-06-06 11:52 ` Christian Marangi
2024-06-06 13:32 ` Quentin Schulz
2024-06-06 14:48 ` Christian Marangi
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=6660cba9.050a0220.31f78.af87@mx.google.com \
--to=ansuelsmth@gmail.com \
--cc=Takahiro.Kuwano@infineon.com \
--cc=akashi.tkhro@gmail.com \
--cc=avkrasnov@salutedevices.com \
--cc=bmeng.cn@gmail.com \
--cc=bruce_suen@163.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=devarsht@ti.com \
--cc=douglas.zobel@climate.com \
--cc=dunaev@tecon.ru \
--cc=eugeneuriev@gmail.com \
--cc=frieder.schrempf@kontron.de \
--cc=ivprusov@salutedevices.com \
--cc=jagan@amarulasolutions.com \
--cc=joe.hershberger@ni.com \
--cc=michael@amarulasolutions.com \
--cc=mikhail.kshevetskiy@iopsys.eu \
--cc=miquel.raynal@bootlin.com \
--cc=n-jain1@ti.com \
--cc=p.yadav@ti.com \
--cc=rasmus.villemoes@prevas.dk \
--cc=raymond.mao@linaro.org \
--cc=rfried.dev@gmail.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vaishnav.a@ti.com \
--cc=venkatesh.abbarapu@amd.com \
--cc=vigneshr@ti.com \
--cc=william.zhang@broadcom.com \
--cc=xypron.glpk@gmx.de \
--cc=yangshiji66@outlook.com \
/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: link
Be 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.