lkml.org 
[lkml]   [2011]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 resend2] s3c/s3c24xx: arm: leds: Make s3c24xx LEDS driver use gpiolib
From
Date
On Tue, 2011-12-13 at 22:22 +0200, Denis Kuzmenko wrote:
> Make s3c24xx LEDS driver use gpiolib. Fix error disabling pull during probe.
[]
> diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c
[]
> @@ -45,23 +45,35 @@ static void s3c24xx_led_set(struct led_classdev *led_cdev,
> + /*
> + * ensure value is 0 or 1 to use it with bitwise XOR (^)
> + * (only 100% brightness is supported)
> + */
> + value = value ? 1 : 0;

Maybe value = !!value;

> + /* no point in having a pull-up as we are always driving */
> + s3c_gpio_setpull(pdata->gpio, S3C_GPIO_PULL_NONE);
> + ret = gpio_direction_output(pdata->gpio,
> + !!(pdata->flags & S3C24XX_LEDF_ACTLOW));

akin to this use.




\
 
 \ /
  Last update: 2011-12-13 22:09    [W:1.309 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site