mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-25 03:13:20 +02:00
add support for special LED brightness values
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8376 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
82fb21ae13
commit
c0a6927a77
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user