summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-07-14 22:07:41 +0200
committerWolfgang Denk <wd@denx.de>2010-07-14 22:07:41 +0200
commitd6f324d03d7829a1da1dee8b60f91b173a3976f0 (patch)
tree854d9d8bb71573483276fe9f3faa48f242bb543f /drivers/misc
parente1e3cf7c79d97e7c59f90036d6e1e8e9d3abfbbe (diff)
parenta3c09f66b2b84e98333c317ffb24a95f88ee5a10 (diff)
Merge branch 'next' of git://git.denx.de/u-boot-nios
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/gpio_led.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/misc/gpio_led.c b/drivers/misc/gpio_led.c
index acd6a90127..3fedddc8b5 100644
--- a/drivers/misc/gpio_led.c
+++ b/drivers/misc/gpio_led.c
@@ -2,26 +2,22 @@
* Status LED driver based on GPIO access conventions of Linux
*
* Copyright (C) 2010 Thomas Chou <thomas@wytron.com.tw>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
+ * Licensed under the GPL-2 or later.
*/
#include <common.h>
#include <status_led.h>
#include <asm/gpio.h>
-/* assume led is active low */
-
void __led_init(led_id_t mask, int state)
{
- gpio_direction_output(mask, (state == STATUS_LED_ON) ? 0 : 1);
+ gpio_request(mask, "gpio_led");
+ gpio_direction_output(mask, state == STATUS_LED_ON);
}
void __led_set(led_id_t mask, int state)
{
- gpio_set_value(mask, (state == STATUS_LED_ON) ? 0 : 1);
+ gpio_set_value(mask, state == STATUS_LED_ON);
}
void __led_toggle(led_id_t mask)