From: Vasily Khoruzhick Date: Thu, 6 Jan 2011 19:52:48 +0000 (+0200) Subject: ARM: S3C2410: H1940: Use leds-gpio driver for LEDs managing X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=50e2d10da82774e0733ab561c15c84cb92d9ab33;p=linux-beck.git ARM: S3C2410: H1940: Use leds-gpio driver for LEDs managing We can use generic leds-gpio driver, as latch api was converted to gpiolib. Signed-off-by: Vasily Khoruzhick Signed-off-by: Ben Dooks --- diff --git a/arch/arm/mach-s3c2410/h1940-bluetooth.c b/arch/arm/mach-s3c2410/h1940-bluetooth.c index 6c59ef5f8e98..2c126bbca08d 100644 --- a/arch/arm/mach-s3c2410/h1940-bluetooth.c +++ b/arch/arm/mach-s3c2410/h1940-bluetooth.c @@ -18,12 +18,14 @@ #include #include #include +#include #include #include #include +#include -#define DRV_NAME "h1940-bt" +#define DRV_NAME "h1940-bt" /* Bluetooth control */ static void h1940bt_enable(int on) @@ -37,6 +39,8 @@ static void h1940bt_enable(int on) gpio_set_value(S3C2410_GPH(1), 1); mdelay(10); gpio_set_value(S3C2410_GPH(1), 0); + + h1940_led_blink_set(-EINVAL, GPIO_LED_BLINK, NULL, NULL); } else { gpio_set_value(S3C2410_GPH(1), 1); @@ -44,6 +48,8 @@ static void h1940bt_enable(int on) gpio_set_value(S3C2410_GPH(1), 0); mdelay(10); gpio_set_value(H1940_LATCH_BLUETOOTH_POWER, 0); + + h1940_led_blink_set(-EINVAL, GPIO_LED_NO_BLINK_LOW, NULL, NULL); } } diff --git a/arch/arm/mach-s3c2410/include/mach/h1940.h b/arch/arm/mach-s3c2410/include/mach/h1940.h index 4559784129c0..2aa683c8d3d6 100644 --- a/arch/arm/mach-s3c2410/include/mach/h1940.h +++ b/arch/arm/mach-s3c2410/include/mach/h1940.h @@ -17,5 +17,8 @@ #define H1940_SUSPEND_CHECK (0x30080000) extern void h1940_pm_return(void); +extern int h1940_led_blink_set(unsigned gpio, int state, + unsigned long *delay_on, unsigned long *delay_off); + #endif /* __ASM_ARCH_H1940_H */ diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 07564404fb89..36cdb7210879 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c @@ -27,6 +27,8 @@ #include #include #include +#include + #include