From: Holger Freyther Date: Fri, 13 Jul 2012 12:30:12 +0000 (UTC) Subject: [U-Boot] =?utf-8?q?=5F=5Fled=5Fset_usage_is_inconsistent?= Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, I hope that this is not a common question. I have read doc/README.LED, compiled in the GPIO LED driver, provided my GPIO number, enabled the LED command and then noticed that "led 0 on" didn't do what I wanted. It appears that the semantic of "state" in __led_set(mask, state) is used in two different ways. 1.) status_led_set is using STATUS_LED_ON|STATUS_LED_OFF for the state parameter. 2.) cmd_led.c is using 0|1 when calling __led_set. The confusing is in the implementation as well. 1.) drivers/misc/gpio_led.c expects it to be STATUS_LED_* 2.) board/ti/beagle/led.c wants 0|1 Which part of the code is right? Will a patch to use an enum for the state be appreciated? holger