All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Ramon Fried <rfried.dev@gmail.com>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	Arseniy Krasnov <avkrasnov@salutedevices.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Dmitry Dunaev <dunaev@tecon.ru>, Simon Glass <sjg@chromium.org>,
	Devarsh Thakkar <devarsht@ti.com>, Bin Meng <bmeng.cn@gmail.com>,
	Nikhil M Jain <n-jain1@ti.com>,
	Shiji Yang <yangshiji66@outlook.com>,
	Raymond Mao <raymond.mao@linaro.org>,
	Leo Yu-Chi Liang <ycliang@andestech.com>,
	Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	Doug Zobel <douglas.zobel@climate.com>,
	u-boot@lists.denx.de, John Crispin <john@phrozen.org>
Subject: Re: [PATCH v4 0/9] misc: introduce STATUS LED activity function
Date: Thu, 20 Jun 2024 10:55:11 -0600	[thread overview]
Message-ID: <20240620165511.GP68077@bill-the-cat> (raw)
In-Reply-To: <66740da0.050a0220.f7eae.7834@mx.google.com>

[-- Attachment #1: Type: text/plain, Size: 3113 bytes --]

On Thu, Jun 20, 2024 at 06:29:23AM +0200, Christian Marangi wrote:
> On Thu, Jun 20, 2024 at 08:34:03AM +0200, Heinrich Schuchardt wrote:
> > On 6/20/24 01:03, 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_start/stop() used to turn the
> > > activity LED on and register a cyclic to make it blink.
> > > LED will continue to blink until _stop() is called.
> > > 
> > > Function that will start some kind of action will first call
> > > _start() and then at the end will call stop().
> > > If (on the broken implementation) a _start() is called before
> > > calling a _stop(), the Cyclic is first unregister and is
> > > registered again.
> > > 
> > > Support for this is initially added to the tftp, mtd and ubi
> > > command.
> > > 
> > > 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.
> > > 
> > > (world tested with the azure pipeline)
> > 
> > Hello Christian,
> > 
> > What is the relationship between CONFIG_LED and CONFIG_LED_STATUS?
> > Can they be used at the same time or should they be exclusive?
> > Should CONFIG_LED_STATUS depend on CONFIG_LED?
> 
> Well this is something that should have been fixed long time ago.
> Given the 2 cmd and some function clash with each other they are totally
> incompatible with each other and one should exclude the other.

Yes, sorry, I missed this earlier on, my fault. The CONFIG_LED_STATUS
code is legacy and indeed shouldn't be enabled on anything new (and
ideally, someone would care enough to transition the few platforms using
the old framework over). So this functionality should be added to the
drivers/led/ framework and then yes, your platforms defining the LED via
device tree, with the same compatibles the Linux needs anyhow to be able
to control it too.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      reply	other threads:[~2024-06-20 16:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 23:03 [PATCH v4 0/9] misc: introduce STATUS LED activity function Christian Marangi
2024-06-19 23:03 ` [PATCH v4 1/9] misc: gpio_led: fix broken coloured LED status functions Christian Marangi
2024-06-19 23:03 ` [PATCH v4 2/9] led: status_led: add support for white LED colour Christian Marangi
2024-06-19 23:03 ` [PATCH v4 3/9] led: status_led: add function to toggle a status LED Christian Marangi
2024-06-19 23:03 ` [PATCH v4 4/9] led: status_led: add warning when an invalid Status LED ID is used Christian Marangi
2024-06-20 17:31   ` Peter Robinson
2024-06-19 23:03 ` [PATCH v4 5/9] led: status_led: add new activity LED config and functions Christian Marangi
2024-06-19 23:03 ` [PATCH v4 6/9] tftp: implement support for LED status activity Christian Marangi
2024-06-19 23:03 ` [PATCH v4 7/9] mtd: " Christian Marangi
2024-06-19 23:03 ` [PATCH v4 8/9] ubi: " Christian Marangi
2024-06-19 23:03 ` [PATCH v4 9/9] doc: convert README.LED to .rst documentation Christian Marangi
2024-06-20  6:13   ` Heinrich Schuchardt
2024-06-20  4:37     ` Christian Marangi
2024-06-20 17:11       ` Heinrich Schuchardt
2024-06-20  6:34 ` [PATCH v4 0/9] misc: introduce STATUS LED activity function Heinrich Schuchardt
2024-06-20  4:29   ` Christian Marangi
2024-06-20 16:55     ` Tom Rini [this message]

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=20240620165511.GP68077@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=ansuelsmth@gmail.com \
    --cc=avkrasnov@salutedevices.com \
    --cc=bmeng.cn@gmail.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=devarsht@ti.com \
    --cc=douglas.zobel@climate.com \
    --cc=dunaev@tecon.ru \
    --cc=joe.hershberger@ni.com \
    --cc=john@phrozen.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=n-jain1@ti.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=raymond.mao@linaro.org \
    --cc=rfried.dev@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=yangshiji66@outlook.com \
    --cc=ycliang@andestech.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.