add support for special LED brightness values
[openwrt/openwrt.git] / target / linux / adm5120-2.6 / files / drivers / leds / leds-gpio.c
index 7ae1432791dc96f0c3f7c976212d77289e466405..d10506ad98eb5d5bbb8e6902dbe8487fe52957c0 100755 (executable)
@@ -66,11 +66,14 @@ static void gpio_led_set(struct led_classdev *led_cdev,
        pdata = led->pdata;
 
        switch (brightness) {
+       case LED_FULL:
+               gpio_direction_output(pdata->gpio, pdata->value_on);
+               break;
        case LED_OFF:
                gpio_direction_output(pdata->gpio, pdata->value_off);
                break;
        default:
-               gpio_direction_output(pdata->gpio, pdata->value_on);
+               gpio_direction_output(pdata->gpio, brightness);
                break;
        }
 }