summaryrefslogtreecommitdiffstats
path: root/common/cmd_led.c
Commit message (Collapse)AuthorAgeFilesLines
* led: remove camel casing of led identifiers globallyJason Kridner2011-09-131-4/+4
| | | | | | | | | | | | | | | Result of running the following command to address Wolfgang's comment about camel case: for file in `find . | grep '\.[chS]$'`; do perl -i -pe 's/(green|yellow|red|blue)_LED_(on|off)/$1_led_$2/g' $file; done Discussion: http://patchwork.ozlabs.org/patch/84988/ Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* led: Remove state-saving of led for toggle functionality and add toggle ↵Joel A Fernandes2011-09-041-24/+40
| | | | | | | | | | | | | | | | | option to led command * Read the led output state from GPIO instead saving state in memory when it is [re]set * Added a toggle option to the led command Previous discussion: http://lists.denx.de/pipermail/u-boot/2011-May/093068.html Changes since v1: Fixed checkpatch errors Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* led: Fixed setting of STATUS_LED_BIT1 when led_name is 'all'Joel A Fernandes2011-09-041-1/+3
| | | | | | | | | | | | | | | Fix for only one led getting set or reset when the led_name is 'all' Previous discussion: http://lists.denx.de/pipermail/u-boot/2011-May/093068.html Changes since v1: Fixed checkpatch if statement error noticed by Sergei. Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Cc: Sergei Shtylyov <sshtylyov@mvista.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* led: correct off/on locations in structureJason Kridner2011-09-041-2/+2
| | | | | | | | | | | Although the initialization should probably be done with names, the existing implementation has these structures filled in the opposite order. Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* Corrected LED name match finding avoiding extraneous Usage printoutsJason Kridner2011-09-041-2/+3
| | | | | | | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* Minor coding style cleanup.Wolfgang Denk2011-05-191-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Add 'led' commandJason Kridner2011-04-271-0/+153
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@lists.denx.de/msg09593.html. Updated based on feedback: http://www.mail-archive.com/u-boot@lists.denx.de/msg41847.html https://groups.google.com/d/topic/beagleboard/8Wf1HiK_QBo/discussion * Fixed a handful of style issues. * Significantly reduced the number of #ifdefs and redundant code * Converted redundant code into loops test against a structure * Made use of cmd_usage() * Introduced a str_onoff() function, but haven't yet put it in common * Eliminated trailing newline Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
OpenPOWER on IntegriCloud