aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c24xx/h1940-bluetooth.c4
-rw-r--r--arch/arm/mach-s3c24xx/h1940.h4
-rw-r--r--arch/arm/mach-s3c24xx/mach-h1940.c3
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx1950.c3
-rw-r--r--arch/arm/plat-orion/gpio.c3
-rw-r--r--arch/arm/plat-orion/include/plat/orion-gpio.h5
6 files changed, 15 insertions, 7 deletions
diff --git a/arch/arm/mach-s3c24xx/h1940-bluetooth.c b/arch/arm/mach-s3c24xx/h1940-bluetooth.c
index b4d14b864367..9c8b1279a4ba 100644
--- a/arch/arm/mach-s3c24xx/h1940-bluetooth.c
+++ b/arch/arm/mach-s3c24xx/h1940-bluetooth.c
@@ -41,7 +41,7 @@ static void h1940bt_enable(int on)
41 mdelay(10); 41 mdelay(10);
42 gpio_set_value(S3C2410_GPH(1), 0); 42 gpio_set_value(S3C2410_GPH(1), 0);
43 43
44 h1940_led_blink_set(-EINVAL, GPIO_LED_BLINK, NULL, NULL); 44 h1940_led_blink_set(NULL, GPIO_LED_BLINK, NULL, NULL);
45 } 45 }
46 else { 46 else {
47 gpio_set_value(S3C2410_GPH(1), 1); 47 gpio_set_value(S3C2410_GPH(1), 1);
@@ -50,7 +50,7 @@ static void h1940bt_enable(int on)
50 mdelay(10); 50 mdelay(10);
51 gpio_set_value(H1940_LATCH_BLUETOOTH_POWER, 0); 51 gpio_set_value(H1940_LATCH_BLUETOOTH_POWER, 0);
52 52
53 h1940_led_blink_set(-EINVAL, GPIO_LED_NO_BLINK_LOW, NULL, NULL); 53 h1940_led_blink_set(NULL, GPIO_LED_NO_BLINK_LOW, NULL, NULL);
54 } 54 }
55} 55}
56 56
diff --git a/arch/arm/mach-s3c24xx/h1940.h b/arch/arm/mach-s3c24xx/h1940.h
index 2950cc466840..596d9f64c5b6 100644
--- a/arch/arm/mach-s3c24xx/h1940.h
+++ b/arch/arm/mach-s3c24xx/h1940.h
@@ -19,8 +19,10 @@
19#define H1940_SUSPEND_RESUMEAT (0x30081000) 19#define H1940_SUSPEND_RESUMEAT (0x30081000)
20#define H1940_SUSPEND_CHECK (0x30080000) 20#define H1940_SUSPEND_CHECK (0x30080000)
21 21
22struct gpio_desc;
23
22extern void h1940_pm_return(void); 24extern void h1940_pm_return(void);
23extern int h1940_led_blink_set(unsigned gpio, int state, 25extern int h1940_led_blink_set(struct gpio_desc *desc, int state,
24 unsigned long *delay_on, 26 unsigned long *delay_on,
25 unsigned long *delay_off); 27 unsigned long *delay_off);
26 28
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index d35ddc1d9991..d40d4f5244c6 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -359,10 +359,11 @@ static struct platform_device h1940_battery = {
359 359
360static DEFINE_SPINLOCK(h1940_blink_spin); 360static DEFINE_SPINLOCK(h1940_blink_spin);
361 361
362int h1940_led_blink_set(unsigned gpio, int state, 362int h1940_led_blink_set(struct gpio_desc *desc, int state,
363 unsigned long *delay_on, unsigned long *delay_off) 363 unsigned long *delay_on, unsigned long *delay_off)
364{ 364{
365 int blink_gpio, check_gpio1, check_gpio2; 365 int blink_gpio, check_gpio1, check_gpio2;
366 int gpio = desc ? desc_to_gpio(desc) : -EINVAL;
366 367
367 switch (gpio) { 368 switch (gpio) {
368 case H1940_LATCH_LED_GREEN: 369 case H1940_LATCH_LED_GREEN:
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index c3f2682d0c62..1d35ff375a01 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -250,9 +250,10 @@ static void rx1950_disable_charger(void)
250 250
251static DEFINE_SPINLOCK(rx1950_blink_spin); 251static DEFINE_SPINLOCK(rx1950_blink_spin);
252 252
253static int rx1950_led_blink_set(unsigned gpio, int state, 253static int rx1950_led_blink_set(struct gpio_desc *desc, int state,
254 unsigned long *delay_on, unsigned long *delay_off) 254 unsigned long *delay_on, unsigned long *delay_off)
255{ 255{
256 int gpio = desc_to_gpio(desc);
256 int blink_gpio, check_gpio; 257 int blink_gpio, check_gpio;
257 258
258 switch (gpio) { 259 switch (gpio) {
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index b61a3bcc2fa8..b357053f40d9 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -306,9 +306,10 @@ EXPORT_SYMBOL(orion_gpio_set_blink);
306 306
307#define ORION_BLINK_HALF_PERIOD 100 /* ms */ 307#define ORION_BLINK_HALF_PERIOD 100 /* ms */
308 308
309int orion_gpio_led_blink_set(unsigned gpio, int state, 309int orion_gpio_led_blink_set(struct gpio_desc *desc, int state,
310 unsigned long *delay_on, unsigned long *delay_off) 310 unsigned long *delay_on, unsigned long *delay_off)
311{ 311{
312 unsigned gpio = desc_to_gpio(desc);
312 313
313 if (delay_on && delay_off && !*delay_on && !*delay_off) 314 if (delay_on && delay_off && !*delay_on && !*delay_off)
314 *delay_on = *delay_off = ORION_BLINK_HALF_PERIOD; 315 *delay_on = *delay_off = ORION_BLINK_HALF_PERIOD;
diff --git a/arch/arm/plat-orion/include/plat/orion-gpio.h b/arch/arm/plat-orion/include/plat/orion-gpio.h
index e763988b04b9..e856b073a9c8 100644
--- a/arch/arm/plat-orion/include/plat/orion-gpio.h
+++ b/arch/arm/plat-orion/include/plat/orion-gpio.h
@@ -14,12 +14,15 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/irqdomain.h> 16#include <linux/irqdomain.h>
17
18struct gpio_desc;
19
17/* 20/*
18 * Orion-specific GPIO API extensions. 21 * Orion-specific GPIO API extensions.
19 */ 22 */
20void orion_gpio_set_unused(unsigned pin); 23void orion_gpio_set_unused(unsigned pin);
21void orion_gpio_set_blink(unsigned pin, int blink); 24void orion_gpio_set_blink(unsigned pin, int blink);
22int orion_gpio_led_blink_set(unsigned gpio, int state, 25int orion_gpio_led_blink_set(struct gpio_desc *desc, int state,
23 unsigned long *delay_on, unsigned long *delay_off); 26 unsigned long *delay_on, unsigned long *delay_off);
24 27
25#define GPIO_INPUT_OK (1 << 0) 28#define GPIO_INPUT_OK (1 << 0)