mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-13 18:34:53 +00:00
add support for special LED brightness values
SVN-Revision: 8376
This commit is contained in:
parent
9a819643c8
commit
fc6874d691
@ -66,11 +66,14 @@ static void gpio_led_set(struct led_classdev *led_cdev,
|
|||||||
pdata = led->pdata;
|
pdata = led->pdata;
|
||||||
|
|
||||||
switch (brightness) {
|
switch (brightness) {
|
||||||
|
case LED_FULL:
|
||||||
|
gpio_direction_output(pdata->gpio, pdata->value_on);
|
||||||
|
break;
|
||||||
case LED_OFF:
|
case LED_OFF:
|
||||||
gpio_direction_output(pdata->gpio, pdata->value_off);
|
gpio_direction_output(pdata->gpio, pdata->value_off);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
gpio_direction_output(pdata->gpio, pdata->value_on);
|
gpio_direction_output(pdata->gpio, brightness);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user