diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2011-05-08 04:42:13 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-05-19 04:55:45 -0400 |
commit | c1e58a3129bc327f7e0eb06fd4fe5ebf2af5d8ef (patch) | |
tree | 1fd971a6aa91616b29d19cb6d8efa3cd5c42b12b /arch/mips/include | |
parent | 0591128066bdfe07e0ef0ab7f877f794d8ba071d (diff) |
MIPS: Alchemy: update inlinable GPIO API
This fixes a build failure with gpio_keys and CONFIG_GPIOLIB=n (mtx1):
CC drivers/input/keyboard/gpio_keys.o
gpio_keys.c: In function 'gpio_keys_report_event':
gpio_keys.c:325:2: error: implicit declaration of function 'gpio_get_value_cansleep'
gpio_keys.c: In function 'gpio_keys_setup_key':
gpio_keys.c:390:3: error: implicit declaration of function 'gpio_set_debounce'
Also add stubs for the other new functions.
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Patchwork: https://patchwork.linux-mips.org/patch/2346/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/gpio-au1000.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h index 62d2f136d941..8f8c1c55593a 100644 --- a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h +++ b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #define MAKE_IRQ(intc, off) (AU1000_INTC##intc##_INT_BASE + (off)) | 25 | #define MAKE_IRQ(intc, off) (AU1000_INTC##intc##_INT_BASE + (off)) |
26 | 26 | ||
27 | struct gpio; | ||
27 | 28 | ||
28 | static inline int au1000_gpio1_to_irq(int gpio) | 29 | static inline int au1000_gpio1_to_irq(int gpio) |
29 | { | 30 | { |
@@ -556,6 +557,16 @@ static inline void gpio_set_value(int gpio, int v) | |||
556 | alchemy_gpio_set_value(gpio, v); | 557 | alchemy_gpio_set_value(gpio, v); |
557 | } | 558 | } |
558 | 559 | ||
560 | static inline int gpio_get_value_cansleep(unsigned gpio) | ||
561 | { | ||
562 | return gpio_get_value(gpio); | ||
563 | } | ||
564 | |||
565 | static inline void gpio_set_value_cansleep(unsigned gpio, int value) | ||
566 | { | ||
567 | gpio_set_value(gpio, value); | ||
568 | } | ||
569 | |||
559 | static inline int gpio_is_valid(int gpio) | 570 | static inline int gpio_is_valid(int gpio) |
560 | { | 571 | { |
561 | return alchemy_gpio_is_valid(gpio); | 572 | return alchemy_gpio_is_valid(gpio); |
@@ -581,10 +592,50 @@ static inline int gpio_request(unsigned gpio, const char *label) | |||
581 | return 0; | 592 | return 0; |
582 | } | 593 | } |
583 | 594 | ||
595 | static inline int gpio_request_one(unsigned gpio, | ||
596 | unsigned long flags, const char *label) | ||
597 | { | ||
598 | return 0; | ||
599 | } | ||
600 | |||
601 | static inline int gpio_request_array(struct gpio *array, size_t num) | ||
602 | { | ||
603 | return 0; | ||
604 | } | ||
605 | |||
584 | static inline void gpio_free(unsigned gpio) | 606 | static inline void gpio_free(unsigned gpio) |
585 | { | 607 | { |
586 | } | 608 | } |
587 | 609 | ||
610 | static inline void gpio_free_array(struct gpio *array, size_t num) | ||
611 | { | ||
612 | } | ||
613 | |||
614 | static inline int gpio_set_debounce(unsigned gpio, unsigned debounce) | ||
615 | { | ||
616 | return -ENOSYS; | ||
617 | } | ||
618 | |||
619 | static inline int gpio_export(unsigned gpio, bool direction_may_change) | ||
620 | { | ||
621 | return -ENOSYS; | ||
622 | } | ||
623 | |||
624 | static inline int gpio_export_link(struct device *dev, const char *name, | ||
625 | unsigned gpio) | ||
626 | { | ||
627 | return -ENOSYS; | ||
628 | } | ||
629 | |||
630 | static inline int gpio_sysfs_set_active_low(unsigned gpio, int value) | ||
631 | { | ||
632 | return -ENOSYS; | ||
633 | } | ||
634 | |||
635 | static inline void gpio_unexport(unsigned gpio) | ||
636 | { | ||
637 | } | ||
638 | |||
588 | #endif /* !CONFIG_ALCHEMY_GPIO_INDIRECT */ | 639 | #endif /* !CONFIG_ALCHEMY_GPIO_INDIRECT */ |
589 | 640 | ||
590 | 641 | ||