public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Reinhard Meyer <u-boot@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] Add 'led' command
Date: Fri, 05 Nov 2010 14:13:47 +0100	[thread overview]
Message-ID: <4CD4030B.3030906@emk-elektronik.de> (raw)
In-Reply-To: <20101105122115.EDF5512A81E2@gemini.denx.de>

Dear Wolfgang Denk,
>> It is desired to have the led command on the BeagleBoard to allow for some
>> interaction in the scripts.
>>
>> This patch allows any board implementing the coloured LED API
>> to control the LEDs from the console.
>>
>> led [green | yellow | red | all ]  [ on | off ]
>>
>> or
>>
>> led [ 1 | 2 | 3 | all ]  [ on | off ]
>>
>> Adds configuration item CONFIG_CMD_LED enabling the command.
>>
>> Partially based on patch from Ulf Samuelsson:
>> http://www.mail-archive.com/u-boot at lists.denx.de/msg09593.html.
>>
>> Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
>> ---
>>  common/Makefile  |    1 +
>>  common/cmd_led.c |  207 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 208 insertions(+), 0 deletions(-)
>>  create mode 100644 common/cmd_led.c
> 
> I understand the requirement, but I think it is more than time to come
> up with a common solution here instead of adding more and more copies
> of very similar code.
> 
> We already have:
> ...
> 	arch/arm/cpu/arm926ejs/at91/led.c
> 	board/atmel/at91cap9adk/led.c
> 	board/atmel/at91rm9200dk/led.c
> 	board/atmel/at91rm9200ek/led.c
> 	board/atmel/at91sam9260ek/led.c
> 	board/atmel/at91sam9261ek/led.c
> 	board/atmel/at91sam9263ek/led.c
> 	board/atmel/at91sam9m10g45ek/led.c
> 	board/atmel/at91sam9rlek/led.c

At least the atmel stuff are functions to implement the control of
the LEDs (via gpio, i2c, spi etc.) which inherently is board specific;
but not a command interface to control them from u-boot prompt/scripts.

His patch tries to add a command, not a LED implementation.
Such a command was on my mind for a while.

Best Regards,
Reinhard

  reply	other threads:[~2010-11-05 13:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-05  5:50 [U-Boot] [RFC] Add 'led' command Jason Kridner
2010-11-05 12:21 ` Wolfgang Denk
2010-11-05 13:13   ` Reinhard Meyer [this message]
2010-11-05 17:04     ` Jason Kridner
2011-12-13 23:55   ` Ulf Samuelsson
2011-12-14 19:11     ` Simon Glass
     [not found]       ` <4EE8FB51.8010108@telia.com>
2011-12-14 21:31         ` Simon Glass
2011-12-15 18:17           ` Jason Kridner
2011-12-16  7:58             ` Ulf Samuelsson
2010-11-09 13:52 ` Mike Frysinger
2010-11-12 14:42   ` Jason Kridner
2010-11-13 23:31     ` Mike Frysinger
2010-11-18 10:37       ` Mike Frysinger

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=4CD4030B.3030906@emk-elektronik.de \
    --to=u-boot@emk-elektronik.de \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox