aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/bfin_gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel/bfin_gpio.c')
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c102
1 files changed, 51 insertions, 51 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index dc07ed08b37f..ca1c1f9debd6 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -349,13 +349,13 @@ inline void portmux_setup(unsigned short per)
349void set_gpio_ ## name(unsigned gpio, unsigned short arg) \ 349void set_gpio_ ## name(unsigned gpio, unsigned short arg) \
350{ \ 350{ \
351 unsigned long flags; \ 351 unsigned long flags; \
352 local_irq_save_hw(flags); \ 352 flags = hard_local_irq_save(); \
353 if (arg) \ 353 if (arg) \
354 gpio_array[gpio_bank(gpio)]->name |= gpio_bit(gpio); \ 354 gpio_array[gpio_bank(gpio)]->name |= gpio_bit(gpio); \
355 else \ 355 else \
356 gpio_array[gpio_bank(gpio)]->name &= ~gpio_bit(gpio); \ 356 gpio_array[gpio_bank(gpio)]->name &= ~gpio_bit(gpio); \
357 AWA_DUMMY_READ(name); \ 357 AWA_DUMMY_READ(name); \
358 local_irq_restore_hw(flags); \ 358 hard_local_irq_restore(flags); \
359} \ 359} \
360EXPORT_SYMBOL(set_gpio_ ## name); 360EXPORT_SYMBOL(set_gpio_ ## name);
361 361
@@ -371,14 +371,14 @@ void set_gpio_ ## name(unsigned gpio, unsigned short arg) \
371{ \ 371{ \
372 unsigned long flags; \ 372 unsigned long flags; \
373 if (ANOMALY_05000311 || ANOMALY_05000323) \ 373 if (ANOMALY_05000311 || ANOMALY_05000323) \
374 local_irq_save_hw(flags); \ 374 flags = hard_local_irq_save(); \
375 if (arg) \ 375 if (arg) \
376 gpio_array[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \ 376 gpio_array[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \
377 else \ 377 else \
378 gpio_array[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \ 378 gpio_array[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \
379 if (ANOMALY_05000311 || ANOMALY_05000323) { \ 379 if (ANOMALY_05000311 || ANOMALY_05000323) { \
380 AWA_DUMMY_READ(name); \ 380 AWA_DUMMY_READ(name); \
381 local_irq_restore_hw(flags); \ 381 hard_local_irq_restore(flags); \
382 } \ 382 } \
383} \ 383} \
384EXPORT_SYMBOL(set_gpio_ ## name); 384EXPORT_SYMBOL(set_gpio_ ## name);
@@ -391,11 +391,11 @@ void set_gpio_toggle(unsigned gpio)
391{ 391{
392 unsigned long flags; 392 unsigned long flags;
393 if (ANOMALY_05000311 || ANOMALY_05000323) 393 if (ANOMALY_05000311 || ANOMALY_05000323)
394 local_irq_save_hw(flags); 394 flags = hard_local_irq_save();
395 gpio_array[gpio_bank(gpio)]->toggle = gpio_bit(gpio); 395 gpio_array[gpio_bank(gpio)]->toggle = gpio_bit(gpio);
396 if (ANOMALY_05000311 || ANOMALY_05000323) { 396 if (ANOMALY_05000311 || ANOMALY_05000323) {
397 AWA_DUMMY_READ(toggle); 397 AWA_DUMMY_READ(toggle);
398 local_irq_restore_hw(flags); 398 hard_local_irq_restore(flags);
399 } 399 }
400} 400}
401EXPORT_SYMBOL(set_gpio_toggle); 401EXPORT_SYMBOL(set_gpio_toggle);
@@ -408,11 +408,11 @@ void set_gpiop_ ## name(unsigned gpio, unsigned short arg) \
408{ \ 408{ \
409 unsigned long flags; \ 409 unsigned long flags; \
410 if (ANOMALY_05000311 || ANOMALY_05000323) \ 410 if (ANOMALY_05000311 || ANOMALY_05000323) \
411 local_irq_save_hw(flags); \ 411 flags = hard_local_irq_save(); \
412 gpio_array[gpio_bank(gpio)]->name = arg; \ 412 gpio_array[gpio_bank(gpio)]->name = arg; \
413 if (ANOMALY_05000311 || ANOMALY_05000323) { \ 413 if (ANOMALY_05000311 || ANOMALY_05000323) { \
414 AWA_DUMMY_READ(name); \ 414 AWA_DUMMY_READ(name); \
415 local_irq_restore_hw(flags); \ 415 hard_local_irq_restore(flags); \
416 } \ 416 } \
417} \ 417} \
418EXPORT_SYMBOL(set_gpiop_ ## name); 418EXPORT_SYMBOL(set_gpiop_ ## name);
@@ -433,11 +433,11 @@ unsigned short get_gpio_ ## name(unsigned gpio) \
433 unsigned long flags; \ 433 unsigned long flags; \
434 unsigned short ret; \ 434 unsigned short ret; \
435 if (ANOMALY_05000311 || ANOMALY_05000323) \ 435 if (ANOMALY_05000311 || ANOMALY_05000323) \
436 local_irq_save_hw(flags); \ 436 flags = hard_local_irq_save(); \
437 ret = 0x01 & (gpio_array[gpio_bank(gpio)]->name >> gpio_sub_n(gpio)); \ 437 ret = 0x01 & (gpio_array[gpio_bank(gpio)]->name >> gpio_sub_n(gpio)); \
438 if (ANOMALY_05000311 || ANOMALY_05000323) { \ 438 if (ANOMALY_05000311 || ANOMALY_05000323) { \
439 AWA_DUMMY_READ(name); \ 439 AWA_DUMMY_READ(name); \
440 local_irq_restore_hw(flags); \ 440 hard_local_irq_restore(flags); \
441 } \ 441 } \
442 return ret; \ 442 return ret; \
443} \ 443} \
@@ -460,11 +460,11 @@ unsigned short get_gpiop_ ## name(unsigned gpio) \
460 unsigned long flags; \ 460 unsigned long flags; \
461 unsigned short ret; \ 461 unsigned short ret; \
462 if (ANOMALY_05000311 || ANOMALY_05000323) \ 462 if (ANOMALY_05000311 || ANOMALY_05000323) \
463 local_irq_save_hw(flags); \ 463 flags = hard_local_irq_save(); \
464 ret = (gpio_array[gpio_bank(gpio)]->name); \ 464 ret = (gpio_array[gpio_bank(gpio)]->name); \
465 if (ANOMALY_05000311 || ANOMALY_05000323) { \ 465 if (ANOMALY_05000311 || ANOMALY_05000323) { \
466 AWA_DUMMY_READ(name); \ 466 AWA_DUMMY_READ(name); \
467 local_irq_restore_hw(flags); \ 467 hard_local_irq_restore(flags); \
468 } \ 468 } \
469 return ret; \ 469 return ret; \
470} \ 470} \
@@ -525,14 +525,14 @@ int gpio_pm_wakeup_ctrl(unsigned gpio, unsigned ctrl)
525 if (check_gpio(gpio) < 0) 525 if (check_gpio(gpio) < 0)
526 return -EINVAL; 526 return -EINVAL;
527 527
528 local_irq_save_hw(flags); 528 flags = hard_local_irq_save();
529 if (ctrl) 529 if (ctrl)
530 reserve(wakeup, gpio); 530 reserve(wakeup, gpio);
531 else 531 else
532 unreserve(wakeup, gpio); 532 unreserve(wakeup, gpio);
533 533
534 set_gpio_maskb(gpio, ctrl); 534 set_gpio_maskb(gpio, ctrl);
535 local_irq_restore_hw(flags); 535 hard_local_irq_restore(flags);
536 536
537 return 0; 537 return 0;
538} 538}
@@ -690,7 +690,7 @@ int peripheral_request(unsigned short per, const char *label)
690 690
691 BUG_ON(ident >= MAX_RESOURCES); 691 BUG_ON(ident >= MAX_RESOURCES);
692 692
693 local_irq_save_hw(flags); 693 flags = hard_local_irq_save();
694 694
695 /* If a pin can be muxed as either GPIO or peripheral, make 695 /* If a pin can be muxed as either GPIO or peripheral, make
696 * sure it is not already a GPIO pin when we request it. 696 * sure it is not already a GPIO pin when we request it.
@@ -701,7 +701,7 @@ int peripheral_request(unsigned short per, const char *label)
701 printk(KERN_ERR 701 printk(KERN_ERR
702 "%s: Peripheral %d is already reserved as GPIO by %s !\n", 702 "%s: Peripheral %d is already reserved as GPIO by %s !\n",
703 __func__, ident, get_label(ident)); 703 __func__, ident, get_label(ident));
704 local_irq_restore_hw(flags); 704 hard_local_irq_restore(flags);
705 return -EBUSY; 705 return -EBUSY;
706 } 706 }
707 707
@@ -730,7 +730,7 @@ int peripheral_request(unsigned short per, const char *label)
730 printk(KERN_ERR 730 printk(KERN_ERR
731 "%s: Peripheral %d function %d is already reserved by %s !\n", 731 "%s: Peripheral %d function %d is already reserved by %s !\n",
732 __func__, ident, P_FUNCT2MUX(per), get_label(ident)); 732 __func__, ident, P_FUNCT2MUX(per), get_label(ident));
733 local_irq_restore_hw(flags); 733 hard_local_irq_restore(flags);
734 return -EBUSY; 734 return -EBUSY;
735 } 735 }
736 } 736 }
@@ -741,7 +741,7 @@ int peripheral_request(unsigned short per, const char *label)
741 portmux_setup(per); 741 portmux_setup(per);
742 port_setup(ident, PERIPHERAL_USAGE); 742 port_setup(ident, PERIPHERAL_USAGE);
743 743
744 local_irq_restore_hw(flags); 744 hard_local_irq_restore(flags);
745 set_label(ident, label); 745 set_label(ident, label);
746 746
747 return 0; 747 return 0;
@@ -780,10 +780,10 @@ void peripheral_free(unsigned short per)
780 if (!(per & P_DEFINED)) 780 if (!(per & P_DEFINED))
781 return; 781 return;
782 782
783 local_irq_save_hw(flags); 783 flags = hard_local_irq_save();
784 784
785 if (unlikely(!is_reserved(peri, ident, 0))) { 785 if (unlikely(!is_reserved(peri, ident, 0))) {
786 local_irq_restore_hw(flags); 786 hard_local_irq_restore(flags);
787 return; 787 return;
788 } 788 }
789 789
@@ -794,7 +794,7 @@ void peripheral_free(unsigned short per)
794 794
795 set_label(ident, "free"); 795 set_label(ident, "free");
796 796
797 local_irq_restore_hw(flags); 797 hard_local_irq_restore(flags);
798} 798}
799EXPORT_SYMBOL(peripheral_free); 799EXPORT_SYMBOL(peripheral_free);
800 800
@@ -828,7 +828,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
828 if (check_gpio(gpio) < 0) 828 if (check_gpio(gpio) < 0)
829 return -EINVAL; 829 return -EINVAL;
830 830
831 local_irq_save_hw(flags); 831 flags = hard_local_irq_save();
832 832
833 /* 833 /*
834 * Allow that the identical GPIO can 834 * Allow that the identical GPIO can
@@ -837,7 +837,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
837 */ 837 */
838 838
839 if (cmp_label(gpio, label) == 0) { 839 if (cmp_label(gpio, label) == 0) {
840 local_irq_restore_hw(flags); 840 hard_local_irq_restore(flags);
841 return 0; 841 return 0;
842 } 842 }
843 843
@@ -846,7 +846,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
846 dump_stack(); 846 dump_stack();
847 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n", 847 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n",
848 gpio, get_label(gpio)); 848 gpio, get_label(gpio));
849 local_irq_restore_hw(flags); 849 hard_local_irq_restore(flags);
850 return -EBUSY; 850 return -EBUSY;
851 } 851 }
852 if (unlikely(is_reserved(peri, gpio, 1))) { 852 if (unlikely(is_reserved(peri, gpio, 1))) {
@@ -855,7 +855,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
855 printk(KERN_ERR 855 printk(KERN_ERR
856 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", 856 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
857 gpio, get_label(gpio)); 857 gpio, get_label(gpio));
858 local_irq_restore_hw(flags); 858 hard_local_irq_restore(flags);
859 return -EBUSY; 859 return -EBUSY;
860 } 860 }
861 if (unlikely(is_reserved(gpio_irq, gpio, 1))) { 861 if (unlikely(is_reserved(gpio_irq, gpio, 1))) {
@@ -871,7 +871,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
871 reserve(gpio, gpio); 871 reserve(gpio, gpio);
872 set_label(gpio, label); 872 set_label(gpio, label);
873 873
874 local_irq_restore_hw(flags); 874 hard_local_irq_restore(flags);
875 875
876 port_setup(gpio, GPIO_USAGE); 876 port_setup(gpio, GPIO_USAGE);
877 877
@@ -888,13 +888,13 @@ void bfin_gpio_free(unsigned gpio)
888 888
889 might_sleep(); 889 might_sleep();
890 890
891 local_irq_save_hw(flags); 891 flags = hard_local_irq_save();
892 892
893 if (unlikely(!is_reserved(gpio, gpio, 0))) { 893 if (unlikely(!is_reserved(gpio, gpio, 0))) {
894 if (system_state == SYSTEM_BOOTING) 894 if (system_state == SYSTEM_BOOTING)
895 dump_stack(); 895 dump_stack();
896 gpio_error(gpio); 896 gpio_error(gpio);
897 local_irq_restore_hw(flags); 897 hard_local_irq_restore(flags);
898 return; 898 return;
899 } 899 }
900 900
@@ -902,7 +902,7 @@ void bfin_gpio_free(unsigned gpio)
902 902
903 set_label(gpio, "free"); 903 set_label(gpio, "free");
904 904
905 local_irq_restore_hw(flags); 905 hard_local_irq_restore(flags);
906} 906}
907EXPORT_SYMBOL(bfin_gpio_free); 907EXPORT_SYMBOL(bfin_gpio_free);
908 908
@@ -913,7 +913,7 @@ int bfin_special_gpio_request(unsigned gpio, const char *label)
913{ 913{
914 unsigned long flags; 914 unsigned long flags;
915 915
916 local_irq_save_hw(flags); 916 flags = hard_local_irq_save();
917 917
918 /* 918 /*
919 * Allow that the identical GPIO can 919 * Allow that the identical GPIO can
@@ -922,19 +922,19 @@ int bfin_special_gpio_request(unsigned gpio, const char *label)
922 */ 922 */
923 923
924 if (cmp_label(gpio, label) == 0) { 924 if (cmp_label(gpio, label) == 0) {
925 local_irq_restore_hw(flags); 925 hard_local_irq_restore(flags);
926 return 0; 926 return 0;
927 } 927 }
928 928
929 if (unlikely(is_reserved(special_gpio, gpio, 1))) { 929 if (unlikely(is_reserved(special_gpio, gpio, 1))) {
930 local_irq_restore_hw(flags); 930 hard_local_irq_restore(flags);
931 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n", 931 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n",
932 gpio, get_label(gpio)); 932 gpio, get_label(gpio));
933 933
934 return -EBUSY; 934 return -EBUSY;
935 } 935 }
936 if (unlikely(is_reserved(peri, gpio, 1))) { 936 if (unlikely(is_reserved(peri, gpio, 1))) {
937 local_irq_restore_hw(flags); 937 hard_local_irq_restore(flags);
938 printk(KERN_ERR 938 printk(KERN_ERR
939 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", 939 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
940 gpio, get_label(gpio)); 940 gpio, get_label(gpio));
@@ -946,7 +946,7 @@ int bfin_special_gpio_request(unsigned gpio, const char *label)
946 reserve(peri, gpio); 946 reserve(peri, gpio);
947 947
948 set_label(gpio, label); 948 set_label(gpio, label);
949 local_irq_restore_hw(flags); 949 hard_local_irq_restore(flags);
950 port_setup(gpio, GPIO_USAGE); 950 port_setup(gpio, GPIO_USAGE);
951 951
952 return 0; 952 return 0;
@@ -959,18 +959,18 @@ void bfin_special_gpio_free(unsigned gpio)
959 959
960 might_sleep(); 960 might_sleep();
961 961
962 local_irq_save_hw(flags); 962 flags = hard_local_irq_save();
963 963
964 if (unlikely(!is_reserved(special_gpio, gpio, 0))) { 964 if (unlikely(!is_reserved(special_gpio, gpio, 0))) {
965 gpio_error(gpio); 965 gpio_error(gpio);
966 local_irq_restore_hw(flags); 966 hard_local_irq_restore(flags);
967 return; 967 return;
968 } 968 }
969 969
970 unreserve(special_gpio, gpio); 970 unreserve(special_gpio, gpio);
971 unreserve(peri, gpio); 971 unreserve(peri, gpio);
972 set_label(gpio, "free"); 972 set_label(gpio, "free");
973 local_irq_restore_hw(flags); 973 hard_local_irq_restore(flags);
974} 974}
975EXPORT_SYMBOL(bfin_special_gpio_free); 975EXPORT_SYMBOL(bfin_special_gpio_free);
976#endif 976#endif
@@ -983,7 +983,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label)
983 if (check_gpio(gpio) < 0) 983 if (check_gpio(gpio) < 0)
984 return -EINVAL; 984 return -EINVAL;
985 985
986 local_irq_save_hw(flags); 986 flags = hard_local_irq_save();
987 987
988 if (unlikely(is_reserved(peri, gpio, 1))) { 988 if (unlikely(is_reserved(peri, gpio, 1))) {
989 if (system_state == SYSTEM_BOOTING) 989 if (system_state == SYSTEM_BOOTING)
@@ -991,7 +991,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label)
991 printk(KERN_ERR 991 printk(KERN_ERR
992 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", 992 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
993 gpio, get_label(gpio)); 993 gpio, get_label(gpio));
994 local_irq_restore_hw(flags); 994 hard_local_irq_restore(flags);
995 return -EBUSY; 995 return -EBUSY;
996 } 996 }
997 if (unlikely(is_reserved(gpio, gpio, 1))) 997 if (unlikely(is_reserved(gpio, gpio, 1)))
@@ -1002,7 +1002,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label)
1002 reserve(gpio_irq, gpio); 1002 reserve(gpio_irq, gpio);
1003 set_label(gpio, label); 1003 set_label(gpio, label);
1004 1004
1005 local_irq_restore_hw(flags); 1005 hard_local_irq_restore(flags);
1006 1006
1007 port_setup(gpio, GPIO_USAGE); 1007 port_setup(gpio, GPIO_USAGE);
1008 1008
@@ -1016,13 +1016,13 @@ void bfin_gpio_irq_free(unsigned gpio)
1016 if (check_gpio(gpio) < 0) 1016 if (check_gpio(gpio) < 0)
1017 return; 1017 return;
1018 1018
1019 local_irq_save_hw(flags); 1019 flags = hard_local_irq_save();
1020 1020
1021 if (unlikely(!is_reserved(gpio_irq, gpio, 0))) { 1021 if (unlikely(!is_reserved(gpio_irq, gpio, 0))) {
1022 if (system_state == SYSTEM_BOOTING) 1022 if (system_state == SYSTEM_BOOTING)
1023 dump_stack(); 1023 dump_stack();
1024 gpio_error(gpio); 1024 gpio_error(gpio);
1025 local_irq_restore_hw(flags); 1025 hard_local_irq_restore(flags);
1026 return; 1026 return;
1027 } 1027 }
1028 1028
@@ -1030,7 +1030,7 @@ void bfin_gpio_irq_free(unsigned gpio)
1030 1030
1031 set_label(gpio, "free"); 1031 set_label(gpio, "free");
1032 1032
1033 local_irq_restore_hw(flags); 1033 hard_local_irq_restore(flags);
1034} 1034}
1035 1035
1036static inline void __bfin_gpio_direction_input(unsigned gpio) 1036static inline void __bfin_gpio_direction_input(unsigned gpio)
@@ -1052,10 +1052,10 @@ int bfin_gpio_direction_input(unsigned gpio)
1052 return -EINVAL; 1052 return -EINVAL;
1053 } 1053 }
1054 1054
1055 local_irq_save_hw(flags); 1055 flags = hard_local_irq_save();
1056 __bfin_gpio_direction_input(gpio); 1056 __bfin_gpio_direction_input(gpio);
1057 AWA_DUMMY_READ(inen); 1057 AWA_DUMMY_READ(inen);
1058 local_irq_restore_hw(flags); 1058 hard_local_irq_restore(flags);
1059 1059
1060 return 0; 1060 return 0;
1061} 1061}
@@ -1070,9 +1070,9 @@ void bfin_gpio_irq_prepare(unsigned gpio)
1070 port_setup(gpio, GPIO_USAGE); 1070 port_setup(gpio, GPIO_USAGE);
1071 1071
1072#ifdef CONFIG_BF54x 1072#ifdef CONFIG_BF54x
1073 local_irq_save_hw(flags); 1073 flags = hard_local_irq_save();
1074 __bfin_gpio_direction_input(gpio); 1074 __bfin_gpio_direction_input(gpio);
1075 local_irq_restore_hw(flags); 1075 hard_local_irq_restore(flags);
1076#endif 1076#endif
1077} 1077}
1078 1078
@@ -1094,7 +1094,7 @@ int bfin_gpio_direction_output(unsigned gpio, int value)
1094 return -EINVAL; 1094 return -EINVAL;
1095 } 1095 }
1096 1096
1097 local_irq_save_hw(flags); 1097 flags = hard_local_irq_save();
1098 1098
1099 gpio_array[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio); 1099 gpio_array[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio);
1100 gpio_set_value(gpio, value); 1100 gpio_set_value(gpio, value);
@@ -1105,7 +1105,7 @@ int bfin_gpio_direction_output(unsigned gpio, int value)
1105#endif 1105#endif
1106 1106
1107 AWA_DUMMY_READ(dir); 1107 AWA_DUMMY_READ(dir);
1108 local_irq_restore_hw(flags); 1108 hard_local_irq_restore(flags);
1109 1109
1110 return 0; 1110 return 0;
1111} 1111}
@@ -1120,11 +1120,11 @@ int bfin_gpio_get_value(unsigned gpio)
1120 1120
1121 if (unlikely(get_gpio_edge(gpio))) { 1121 if (unlikely(get_gpio_edge(gpio))) {
1122 int ret; 1122 int ret;
1123 local_irq_save_hw(flags); 1123 flags = hard_local_irq_save();
1124 set_gpio_edge(gpio, 0); 1124 set_gpio_edge(gpio, 0);
1125 ret = get_gpio_data(gpio); 1125 ret = get_gpio_data(gpio);
1126 set_gpio_edge(gpio, 1); 1126 set_gpio_edge(gpio, 1);
1127 local_irq_restore_hw(flags); 1127 hard_local_irq_restore(flags);
1128 return ret; 1128 return ret;
1129 } else 1129 } else
1130 return get_gpio_data(gpio); 1130 return get_gpio_data(gpio);