From 50e2d10da82774e0733ab561c15c84cb92d9ab33 Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Thu, 6 Jan 2011 21:52:48 +0200 Subject: [PATCH] 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 --- arch/arm/mach-s3c2410/h1940-bluetooth.c | 8 ++- arch/arm/mach-s3c2410/include/mach/h1940.h | 3 + arch/arm/mach-s3c2410/mach-h1940.c | 93 +++++++++++++++++++++++++++++- 3 files changed, 101 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-s3c2410/h1940-bluetooth.c b/arch/arm/mach-s3c2410/h1940-bluetooth.c index 6c59ef5..2c126bb 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 4559784..2aa683c 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 0756440..36cdb72 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