aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c63
-rw-r--r--include/asm-blackfin/gpio.h72
2 files changed, 64 insertions, 71 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 7312011a4211..6bbe0a2fccb8 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -7,7 +7,7 @@
7 * Description: GPIO Abstraction Layer 7 * Description: GPIO Abstraction Layer
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2007 Analog Devices Inc. 10 * Copyright 2008 Analog Devices Inc.
11 * 11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 * 13 *
@@ -137,7 +137,6 @@ static unsigned short *port_fer[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
137 (unsigned short *) PORTG_FER, 137 (unsigned short *) PORTG_FER,
138 (unsigned short *) PORTH_FER, 138 (unsigned short *) PORTH_FER,
139}; 139};
140
141#endif 140#endif
142 141
143#ifdef BF527_FAMILY 142#ifdef BF527_FAMILY
@@ -211,7 +210,7 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INT
211#endif /* CONFIG_PM */ 210#endif /* CONFIG_PM */
212 211
213#if defined(BF548_FAMILY) 212#if defined(BF548_FAMILY)
214inline int check_gpio(unsigned short gpio) 213inline int check_gpio(unsigned gpio)
215{ 214{
216 if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15 215 if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15
217 || gpio == GPIO_PH14 || gpio == GPIO_PH15 216 || gpio == GPIO_PH14 || gpio == GPIO_PH15
@@ -221,7 +220,7 @@ inline int check_gpio(unsigned short gpio)
221 return 0; 220 return 0;
222} 221}
223#else 222#else
224inline int check_gpio(unsigned short gpio) 223inline int check_gpio(unsigned gpio)
225{ 224{
226 if (gpio >= MAX_BLACKFIN_GPIOS) 225 if (gpio >= MAX_BLACKFIN_GPIOS)
227 return -EINVAL; 226 return -EINVAL;
@@ -236,7 +235,6 @@ void gpio_error(unsigned gpio)
236 235
237static void set_label(unsigned short ident, const char *label) 236static void set_label(unsigned short ident, const char *label)
238{ 237{
239
240 if (label && str_ident) { 238 if (label && str_ident) {
241 strncpy(str_ident[ident].name, label, 239 strncpy(str_ident[ident].name, label,
242 RESOURCE_LABEL_SIZE); 240 RESOURCE_LABEL_SIZE);
@@ -267,7 +265,7 @@ static int cmp_label(unsigned short ident, const char *label)
267} 265}
268 266
269#if defined(BF527_FAMILY) || defined(BF537_FAMILY) 267#if defined(BF527_FAMILY) || defined(BF537_FAMILY)
270static void port_setup(unsigned short gpio, unsigned short usage) 268static void port_setup(unsigned gpio, unsigned short usage)
271{ 269{
272 if (!check_gpio(gpio)) { 270 if (!check_gpio(gpio)) {
273 if (usage == GPIO_USAGE) 271 if (usage == GPIO_USAGE)
@@ -278,7 +276,7 @@ static void port_setup(unsigned short gpio, unsigned short usage)
278 } 276 }
279} 277}
280#elif defined(BF548_FAMILY) 278#elif defined(BF548_FAMILY)
281static void port_setup(unsigned short gpio, unsigned short usage) 279static void port_setup(unsigned gpio, unsigned short usage)
282{ 280{
283 if (usage == GPIO_USAGE) 281 if (usage == GPIO_USAGE)
284 gpio_array[gpio_bank(gpio)]->port_fer &= ~gpio_bit(gpio); 282 gpio_array[gpio_bank(gpio)]->port_fer &= ~gpio_bit(gpio);
@@ -399,7 +397,7 @@ inline void portmux_setup(unsigned short portno, unsigned short function)
399#endif 397#endif
400 398
401#ifndef BF548_FAMILY 399#ifndef BF548_FAMILY
402static void default_gpio(unsigned short gpio) 400static void default_gpio(unsigned gpio)
403{ 401{
404 unsigned short bank, bitmask; 402 unsigned short bank, bitmask;
405 unsigned long flags; 403 unsigned long flags;
@@ -419,7 +417,6 @@ static void default_gpio(unsigned short gpio)
419 gpio_bankb[bank]->edge &= ~bitmask; 417 gpio_bankb[bank]->edge &= ~bitmask;
420 AWA_DUMMY_READ(edge); 418 AWA_DUMMY_READ(edge);
421 local_irq_restore(flags); 419 local_irq_restore(flags);
422
423} 420}
424#else 421#else
425# define default_gpio(...) do { } while (0) 422# define default_gpio(...) do { } while (0)
@@ -457,10 +454,9 @@ arch_initcall(bfin_gpio_init);
457/* Set a specific bit */ 454/* Set a specific bit */
458 455
459#define SET_GPIO(name) \ 456#define SET_GPIO(name) \
460void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \ 457void set_gpio_ ## name(unsigned gpio, unsigned short arg) \
461{ \ 458{ \
462 unsigned long flags; \ 459 unsigned long flags; \
463 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
464 local_irq_save(flags); \ 460 local_irq_save(flags); \
465 if (arg) \ 461 if (arg) \
466 gpio_bankb[gpio_bank(gpio)]->name |= gpio_bit(gpio); \ 462 gpio_bankb[gpio_bank(gpio)]->name |= gpio_bit(gpio); \
@@ -480,10 +476,9 @@ SET_GPIO(both)
480 476
481#if ANOMALY_05000311 || ANOMALY_05000323 477#if ANOMALY_05000311 || ANOMALY_05000323
482#define SET_GPIO_SC(name) \ 478#define SET_GPIO_SC(name) \
483void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \ 479void set_gpio_ ## name(unsigned gpio, unsigned short arg) \
484{ \ 480{ \
485 unsigned long flags; \ 481 unsigned long flags; \
486 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
487 local_irq_save(flags); \ 482 local_irq_save(flags); \
488 if (arg) \ 483 if (arg) \
489 gpio_bankb[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \ 484 gpio_bankb[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \
@@ -495,9 +490,8 @@ void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \
495EXPORT_SYMBOL(set_gpio_ ## name); 490EXPORT_SYMBOL(set_gpio_ ## name);
496#else 491#else
497#define SET_GPIO_SC(name) \ 492#define SET_GPIO_SC(name) \
498void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \ 493void set_gpio_ ## name(unsigned gpio, unsigned short arg) \
499{ \ 494{ \
500 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
501 if (arg) \ 495 if (arg) \
502 gpio_bankb[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \ 496 gpio_bankb[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \
503 else \ 497 else \
@@ -511,19 +505,17 @@ SET_GPIO_SC(maskb)
511SET_GPIO_SC(data) 505SET_GPIO_SC(data)
512 506
513#if ANOMALY_05000311 || ANOMALY_05000323 507#if ANOMALY_05000311 || ANOMALY_05000323
514void set_gpio_toggle(unsigned short gpio) 508void set_gpio_toggle(unsigned gpio)
515{ 509{
516 unsigned long flags; 510 unsigned long flags;
517 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
518 local_irq_save(flags); 511 local_irq_save(flags);
519 gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio); 512 gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio);
520 AWA_DUMMY_READ(toggle); 513 AWA_DUMMY_READ(toggle);
521 local_irq_restore(flags); 514 local_irq_restore(flags);
522} 515}
523#else 516#else
524void set_gpio_toggle(unsigned short gpio) 517void set_gpio_toggle(unsigned gpio)
525{ 518{
526 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
527 gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio); 519 gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio);
528} 520}
529#endif 521#endif
@@ -534,7 +526,7 @@ EXPORT_SYMBOL(set_gpio_toggle);
534 526
535#if ANOMALY_05000311 || ANOMALY_05000323 527#if ANOMALY_05000311 || ANOMALY_05000323
536#define SET_GPIO_P(name) \ 528#define SET_GPIO_P(name) \
537void set_gpiop_ ## name(unsigned short gpio, unsigned short arg) \ 529void set_gpiop_ ## name(unsigned gpio, unsigned short arg) \
538{ \ 530{ \
539 unsigned long flags; \ 531 unsigned long flags; \
540 local_irq_save(flags); \ 532 local_irq_save(flags); \
@@ -545,7 +537,7 @@ void set_gpiop_ ## name(unsigned short gpio, unsigned short arg) \
545EXPORT_SYMBOL(set_gpiop_ ## name); 537EXPORT_SYMBOL(set_gpiop_ ## name);
546#else 538#else
547#define SET_GPIO_P(name) \ 539#define SET_GPIO_P(name) \
548void set_gpiop_ ## name(unsigned short gpio, unsigned short arg) \ 540void set_gpiop_ ## name(unsigned gpio, unsigned short arg) \
549{ \ 541{ \
550 gpio_bankb[gpio_bank(gpio)]->name = arg; \ 542 gpio_bankb[gpio_bank(gpio)]->name = arg; \
551} \ 543} \
@@ -561,11 +553,10 @@ SET_GPIO_P(both)
561SET_GPIO_P(maska) 553SET_GPIO_P(maska)
562SET_GPIO_P(maskb) 554SET_GPIO_P(maskb)
563 555
564
565/* Get a specific bit */ 556/* Get a specific bit */
566#if ANOMALY_05000311 || ANOMALY_05000323 557#if ANOMALY_05000311 || ANOMALY_05000323
567#define GET_GPIO(name) \ 558#define GET_GPIO(name) \
568unsigned short get_gpio_ ## name(unsigned short gpio) \ 559unsigned short get_gpio_ ## name(unsigned gpio) \
569{ \ 560{ \
570 unsigned long flags; \ 561 unsigned long flags; \
571 unsigned short ret; \ 562 unsigned short ret; \
@@ -578,7 +569,7 @@ unsigned short get_gpio_ ## name(unsigned short gpio) \
578EXPORT_SYMBOL(get_gpio_ ## name); 569EXPORT_SYMBOL(get_gpio_ ## name);
579#else 570#else
580#define GET_GPIO(name) \ 571#define GET_GPIO(name) \
581unsigned short get_gpio_ ## name(unsigned short gpio) \ 572unsigned short get_gpio_ ## name(unsigned gpio) \
582{ \ 573{ \
583 return (0x01 & (gpio_bankb[gpio_bank(gpio)]->name >> gpio_sub_n(gpio))); \ 574 return (0x01 & (gpio_bankb[gpio_bank(gpio)]->name >> gpio_sub_n(gpio))); \
584} \ 575} \
@@ -598,7 +589,7 @@ GET_GPIO(maskb)
598 589
599#if ANOMALY_05000311 || ANOMALY_05000323 590#if ANOMALY_05000311 || ANOMALY_05000323
600#define GET_GPIO_P(name) \ 591#define GET_GPIO_P(name) \
601unsigned short get_gpiop_ ## name(unsigned short gpio) \ 592unsigned short get_gpiop_ ## name(unsigned gpio) \
602{ \ 593{ \
603 unsigned long flags; \ 594 unsigned long flags; \
604 unsigned short ret; \ 595 unsigned short ret; \
@@ -611,7 +602,7 @@ unsigned short get_gpiop_ ## name(unsigned short gpio) \
611EXPORT_SYMBOL(get_gpiop_ ## name); 602EXPORT_SYMBOL(get_gpiop_ ## name);
612#else 603#else
613#define GET_GPIO_P(name) \ 604#define GET_GPIO_P(name) \
614unsigned short get_gpiop_ ## name(unsigned short gpio) \ 605unsigned short get_gpiop_ ## name(unsigned gpio) \
615{ \ 606{ \
616 return (gpio_bankb[gpio_bank(gpio)]->name);\ 607 return (gpio_bankb[gpio_bank(gpio)]->name);\
617} \ 608} \
@@ -648,7 +639,7 @@ GET_GPIO_P(maskb)
648************************************************************* 639*************************************************************
649* MODIFICATION HISTORY : 640* MODIFICATION HISTORY :
650**************************************************************/ 641**************************************************************/
651int gpio_pm_wakeup_request(unsigned short gpio, unsigned char type) 642int gpio_pm_wakeup_request(unsigned gpio, unsigned char type)
652{ 643{
653 unsigned long flags; 644 unsigned long flags;
654 645
@@ -656,7 +647,6 @@ int gpio_pm_wakeup_request(unsigned short gpio, unsigned char type)
656 return -EINVAL; 647 return -EINVAL;
657 648
658 local_irq_save(flags); 649 local_irq_save(flags);
659
660 wakeup_map[gpio_bank(gpio)] |= gpio_bit(gpio); 650 wakeup_map[gpio_bank(gpio)] |= gpio_bit(gpio);
661 wakeup_flags_map[gpio] = type; 651 wakeup_flags_map[gpio] = type;
662 local_irq_restore(flags); 652 local_irq_restore(flags);
@@ -665,7 +655,7 @@ int gpio_pm_wakeup_request(unsigned short gpio, unsigned char type)
665} 655}
666EXPORT_SYMBOL(gpio_pm_wakeup_request); 656EXPORT_SYMBOL(gpio_pm_wakeup_request);
667 657
668void gpio_pm_wakeup_free(unsigned short gpio) 658void gpio_pm_wakeup_free(unsigned gpio)
669{ 659{
670 unsigned long flags; 660 unsigned long flags;
671 661
@@ -680,7 +670,7 @@ void gpio_pm_wakeup_free(unsigned short gpio)
680} 670}
681EXPORT_SYMBOL(gpio_pm_wakeup_free); 671EXPORT_SYMBOL(gpio_pm_wakeup_free);
682 672
683static int bfin_gpio_wakeup_type(unsigned short gpio, unsigned char type) 673static int bfin_gpio_wakeup_type(unsigned gpio, unsigned char type)
684{ 674{
685 port_setup(gpio, GPIO_USAGE); 675 port_setup(gpio, GPIO_USAGE);
686 set_gpio_dir(gpio, 0); 676 set_gpio_dir(gpio, 0);
@@ -789,7 +779,7 @@ void gpio_pm_restore(void)
789#endif 779#endif
790#else /* BF548_FAMILY */ 780#else /* BF548_FAMILY */
791 781
792unsigned short get_gpio_dir(unsigned short gpio) 782unsigned short get_gpio_dir(unsigned gpio)
793{ 783{
794 return (0x01 & (gpio_array[gpio_bank(gpio)]->port_dir_clear >> gpio_sub_n(gpio))); 784 return (0x01 & (gpio_array[gpio_bank(gpio)]->port_dir_clear >> gpio_sub_n(gpio)));
795} 785}
@@ -1123,7 +1113,6 @@ int gpio_direction_input(unsigned gpio)
1123 return -EINVAL; 1113 return -EINVAL;
1124 } 1114 }
1125 1115
1126
1127 local_irq_save(flags); 1116 local_irq_save(flags);
1128 gpio_array[gpio_bank(gpio)]->port_dir_clear = gpio_bit(gpio); 1117 gpio_array[gpio_bank(gpio)]->port_dir_clear = gpio_bit(gpio);
1129 gpio_array[gpio_bank(gpio)]->port_inen |= gpio_bit(gpio); 1118 gpio_array[gpio_bank(gpio)]->port_inen |= gpio_bit(gpio);
@@ -1158,7 +1147,6 @@ void gpio_set_value(unsigned gpio, int arg)
1158 gpio_array[gpio_bank(gpio)]->port_set = gpio_bit(gpio); 1147 gpio_array[gpio_bank(gpio)]->port_set = gpio_bit(gpio);
1159 else 1148 else
1160 gpio_array[gpio_bank(gpio)]->port_clear = gpio_bit(gpio); 1149 gpio_array[gpio_bank(gpio)]->port_clear = gpio_bit(gpio);
1161
1162} 1150}
1163EXPORT_SYMBOL(gpio_set_value); 1151EXPORT_SYMBOL(gpio_set_value);
1164 1152
@@ -1200,7 +1188,12 @@ int gpio_direction_output(unsigned gpio, int value)
1200 1188
1201 local_irq_save(flags); 1189 local_irq_save(flags);
1202 gpio_bankb[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio); 1190 gpio_bankb[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio);
1203 gpio_set_value(gpio, value); 1191
1192 if (value)
1193 gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio);
1194 else
1195 gpio_bankb[gpio_bank(gpio)]->data_clear = gpio_bit(gpio);
1196
1204 gpio_bankb[gpio_bank(gpio)]->dir |= gpio_bit(gpio); 1197 gpio_bankb[gpio_bank(gpio)]->dir |= gpio_bit(gpio);
1205 AWA_DUMMY_READ(dir); 1198 AWA_DUMMY_READ(dir);
1206 local_irq_restore(flags); 1199 local_irq_restore(flags);
@@ -1225,6 +1218,7 @@ void bfin_gpio_reset_spi0_ssel1(void)
1225 1218
1226 port_setup(gpio, GPIO_USAGE); 1219 port_setup(gpio, GPIO_USAGE);
1227 gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio); 1220 gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio);
1221 AWA_DUMMY_READ(data_set);
1228 udelay(1); 1222 udelay(1);
1229} 1223}
1230 1224
@@ -1259,6 +1253,5 @@ static __init int gpio_register_proc(void)
1259 proc_gpio->read_proc = gpio_proc_read; 1253 proc_gpio->read_proc = gpio_proc_read;
1260 return proc_gpio != NULL; 1254 return proc_gpio != NULL;
1261} 1255}
1262
1263__initcall(gpio_register_proc); 1256__initcall(gpio_register_proc);
1264#endif 1257#endif
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h
index 7bba9b17654e..d0426c108262 100644
--- a/include/asm-blackfin/gpio.h
+++ b/include/asm-blackfin/gpio.h
@@ -7,7 +7,7 @@
7 * Description: 7 * Description:
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc. 10 * Copyright 2004-2008 Analog Devices Inc.
11 * 11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 * 13 *
@@ -304,39 +304,39 @@
304**************************************************************/ 304**************************************************************/
305 305
306#ifndef BF548_FAMILY 306#ifndef BF548_FAMILY
307void set_gpio_dir(unsigned short, unsigned short); 307void set_gpio_dir(unsigned, unsigned short);
308void set_gpio_inen(unsigned short, unsigned short); 308void set_gpio_inen(unsigned, unsigned short);
309void set_gpio_polar(unsigned short, unsigned short); 309void set_gpio_polar(unsigned, unsigned short);
310void set_gpio_edge(unsigned short, unsigned short); 310void set_gpio_edge(unsigned, unsigned short);
311void set_gpio_both(unsigned short, unsigned short); 311void set_gpio_both(unsigned, unsigned short);
312void set_gpio_data(unsigned short, unsigned short); 312void set_gpio_data(unsigned, unsigned short);
313void set_gpio_maska(unsigned short, unsigned short); 313void set_gpio_maska(unsigned, unsigned short);
314void set_gpio_maskb(unsigned short, unsigned short); 314void set_gpio_maskb(unsigned, unsigned short);
315void set_gpio_toggle(unsigned short); 315void set_gpio_toggle(unsigned);
316void set_gpiop_dir(unsigned short, unsigned short); 316void set_gpiop_dir(unsigned, unsigned short);
317void set_gpiop_inen(unsigned short, unsigned short); 317void set_gpiop_inen(unsigned, unsigned short);
318void set_gpiop_polar(unsigned short, unsigned short); 318void set_gpiop_polar(unsigned, unsigned short);
319void set_gpiop_edge(unsigned short, unsigned short); 319void set_gpiop_edge(unsigned, unsigned short);
320void set_gpiop_both(unsigned short, unsigned short); 320void set_gpiop_both(unsigned, unsigned short);
321void set_gpiop_data(unsigned short, unsigned short); 321void set_gpiop_data(unsigned, unsigned short);
322void set_gpiop_maska(unsigned short, unsigned short); 322void set_gpiop_maska(unsigned, unsigned short);
323void set_gpiop_maskb(unsigned short, unsigned short); 323void set_gpiop_maskb(unsigned, unsigned short);
324unsigned short get_gpio_dir(unsigned short); 324unsigned short get_gpio_dir(unsigned);
325unsigned short get_gpio_inen(unsigned short); 325unsigned short get_gpio_inen(unsigned);
326unsigned short get_gpio_polar(unsigned short); 326unsigned short get_gpio_polar(unsigned);
327unsigned short get_gpio_edge(unsigned short); 327unsigned short get_gpio_edge(unsigned);
328unsigned short get_gpio_both(unsigned short); 328unsigned short get_gpio_both(unsigned);
329unsigned short get_gpio_maska(unsigned short); 329unsigned short get_gpio_maska(unsigned);
330unsigned short get_gpio_maskb(unsigned short); 330unsigned short get_gpio_maskb(unsigned);
331unsigned short get_gpio_data(unsigned short); 331unsigned short get_gpio_data(unsigned);
332unsigned short get_gpiop_dir(unsigned short); 332unsigned short get_gpiop_dir(unsigned);
333unsigned short get_gpiop_inen(unsigned short); 333unsigned short get_gpiop_inen(unsigned);
334unsigned short get_gpiop_polar(unsigned short); 334unsigned short get_gpiop_polar(unsigned);
335unsigned short get_gpiop_edge(unsigned short); 335unsigned short get_gpiop_edge(unsigned);
336unsigned short get_gpiop_both(unsigned short); 336unsigned short get_gpiop_both(unsigned);
337unsigned short get_gpiop_maska(unsigned short); 337unsigned short get_gpiop_maska(unsigned);
338unsigned short get_gpiop_maskb(unsigned short); 338unsigned short get_gpiop_maskb(unsigned);
339unsigned short get_gpiop_data(unsigned short); 339unsigned short get_gpiop_data(unsigned);
340 340
341struct gpio_port_t { 341struct gpio_port_t {
342 unsigned short data; 342 unsigned short data;
@@ -382,8 +382,8 @@ struct gpio_port_t {
382#define PM_WAKE_LOW 0x8 382#define PM_WAKE_LOW 0x8
383#define PM_WAKE_BOTH_EDGES (PM_WAKE_RISING | PM_WAKE_FALLING) 383#define PM_WAKE_BOTH_EDGES (PM_WAKE_RISING | PM_WAKE_FALLING)
384 384
385int gpio_pm_wakeup_request(unsigned short gpio, unsigned char type); 385int gpio_pm_wakeup_request(unsigned gpio, unsigned char type);
386void gpio_pm_wakeup_free(unsigned short gpio); 386void gpio_pm_wakeup_free(unsigned gpio);
387unsigned int gpio_pm_setup(void); 387unsigned int gpio_pm_setup(void);
388void gpio_pm_restore(void); 388void gpio_pm_restore(void);
389 389