add support for special LED brightness values

SVN-Revision: 8376
lede-17.01
Gabor Juhos 2007-08-07 16:11:58 +00:00
parent 9a819643c8
commit fc6874d691
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}
}