From: Manuel Lauss <manuel.lauss@googlemail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Florian Fainelli <florian@openwrt.org>,
Wolfgang Grandegger <wg@grandegger.com>,
Manuel Lauss <manuel.lauss@googlemail.com>
Subject: [PATCH 2/9] MIPS: Alchemy: update inlinable GPIO API
Date: Sun, 8 May 2011 10:42:13 +0200 [thread overview]
Message-ID: <1304844140-3259-3-git-send-email-manuel.lauss@googlemail.com> (raw)
In-Reply-To: <1304844140-3259-1-git-send-email-manuel.lauss@googlemail.com>
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>
---
Updated version of a patch I submitted a few times earlier.
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 62d2f13..8f8c1c5 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 @@
#define MAKE_IRQ(intc, off) (AU1000_INTC##intc##_INT_BASE + (off))
+struct gpio;
static inline int au1000_gpio1_to_irq(int gpio)
{
@@ -556,6 +557,16 @@ static inline void gpio_set_value(int gpio, int v)
alchemy_gpio_set_value(gpio, v);
}
+static inline int gpio_get_value_cansleep(unsigned gpio)
+{
+ return gpio_get_value(gpio);
+}
+
+static inline void gpio_set_value_cansleep(unsigned gpio, int value)
+{
+ gpio_set_value(gpio, value);
+}
+
static inline int gpio_is_valid(int gpio)
{
return alchemy_gpio_is_valid(gpio);
@@ -581,10 +592,50 @@ static inline int gpio_request(unsigned gpio, const char *label)
return 0;
}
+static inline int gpio_request_one(unsigned gpio,
+ unsigned long flags, const char *label)
+{
+ return 0;
+}
+
+static inline int gpio_request_array(struct gpio *array, size_t num)
+{
+ return 0;
+}
+
static inline void gpio_free(unsigned gpio)
{
}
+static inline void gpio_free_array(struct gpio *array, size_t num)
+{
+}
+
+static inline int gpio_set_debounce(unsigned gpio, unsigned debounce)
+{
+ return -ENOSYS;
+}
+
+static inline int gpio_export(unsigned gpio, bool direction_may_change)
+{
+ return -ENOSYS;
+}
+
+static inline int gpio_export_link(struct device *dev, const char *name,
+ unsigned gpio)
+{
+ return -ENOSYS;
+}
+
+static inline int gpio_sysfs_set_active_low(unsigned gpio, int value)
+{
+ return -ENOSYS;
+}
+
+static inline void gpio_unexport(unsigned gpio)
+{
+}
+
#endif /* !CONFIG_ALCHEMY_GPIO_INDIRECT */
--
1.7.5.rc3
next prev parent reply other threads:[~2011-05-08 8:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-08 8:42 [RFC PATCH 0/9] Misc. Alchemy updates Manuel Lauss
2011-05-08 8:42 ` [PATCH 1/9] MIPS: DB1200: Set Config[OD] for improved stability Manuel Lauss
2011-05-10 15:01 ` Ralf Baechle
2011-05-08 8:42 ` Manuel Lauss [this message]
2011-05-10 15:01 ` [PATCH 2/9] MIPS: Alchemy: update inlinable GPIO API Ralf Baechle
2011-05-08 8:42 ` [PATCH 3/9] MIPS: Alchemy: irq code and constant cleanup Manuel Lauss
2011-05-10 15:01 ` Ralf Baechle
2011-05-08 8:42 ` [PATCH 4/9] MIPS: Alchemy: convert irq.c to syscore_ops Manuel Lauss
2011-05-10 15:01 ` Ralf Baechle
2011-05-08 8:42 ` [PATCH 5/9] MIPS: Alchemy: convert dbdma.c " Manuel Lauss
2011-05-10 15:01 ` Ralf Baechle
2011-05-08 8:42 ` [PATCH 6/9] MIPS: Alchemy: rewrite UART setup and constants Manuel Lauss
2011-05-10 15:01 ` Ralf Baechle
2011-05-08 8:42 ` [PATCH 7/9] MIPS: Alchemy: rewrite ethernet platform setup Manuel Lauss
2011-05-10 15:02 ` Ralf Baechle
2011-05-08 8:42 ` [PATCH 8/9] MIPS: Alchemy: cleanup DMA addresses Manuel Lauss
2011-05-10 15:02 ` Ralf Baechle
2011-05-08 8:42 ` [PATCH 9/9] MIPS: Alchemy: clean up GPIO registers and accessors Manuel Lauss
2011-05-10 15:02 ` Ralf Baechle
2011-05-10 19:07 ` Manuel Lauss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304844140-3259-3-git-send-email-manuel.lauss@googlemail.com \
--to=manuel.lauss@googlemail.com \
--cc=florian@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.