mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Domenico Andreoli <cavokz@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Add btgpio driver
Date: Tue, 1 Jul 2008 15:37:46 -0700	[thread overview]
Message-ID: <200807011537.46297.david-b@pacbell.net> (raw)
In-Reply-To: <20080701220601.GA31029@ska.dandreoli.com>

On Tuesday 01 July 2008, Domenico Andreoli wrote:
> 
> > How one is supposed to test this driver? I am unable to switch on
> > the GPIO lib support in my config. I tried also allyesconfig but no
> > trace of gpio lib stuff.
> 
> Really, GPIO menu is no present anywhere. While searching for GPIO
> finds stuff, I am unable to locate and select it. I am using 2.6.26-rc8

Appended is what I use on x86 PCs.  It's not quite suitable for merge
as-is since there's some x86 system with a nonstandard setup.

- Dave

====== CUT HERE
DEBUG ONLY -- make X86_PC use gpiolib.

It's not clear to me how the various x86-ish platforms should
be made to work here, since there seems to be no convention
that each platform type has its own <asm/arch/...> subdir.

---
 arch/x86/Kconfig       |    2 ++
 include/asm-x86/gpio.h |   20 +++++++++++++++++++-
 2 files changed, 21 insertions(+), 1 deletion(-)

--- a/arch/x86/Kconfig	2008-06-30 16:44:30.000000000 -0700
+++ b/arch/x86/Kconfig	2008-06-30 21:37:08.000000000 -0700
@@ -236,6 +236,8 @@ choice
 
 config X86_PC
 	bool "PC-compatible"
+	select GENERIC_GPIO
+	select HAVE_GPIO_LIB
 	help
 	  Choose this option if your computer is a standard PC or compatible.
 
--- a/include/asm-x86/gpio.h	2008-06-30 16:44:30.000000000 -0700
+++ b/include/asm-x86/gpio.h	2008-06-30 21:37:08.000000000 -0700
@@ -1,6 +1,24 @@
 #ifndef _ASM_I386_GPIO_H
 #define _ASM_I386_GPIO_H
 
-#include <gpio.h>
+// #include <gpio.h>
+
+#include <linux/errno.h>
+#include <asm-generic/gpio.h>           /* cansleep wrappers */
+
+#define gpio_get_value	__gpio_get_value
+#define gpio_set_value	__gpio_set_value
+#define gpio_cansleep	__gpio_cansleep
+
+static inline int gpio_to_irq(unsigned gpio)
+{
+	return -ENOSYS;
+}
+
+static inline int irq_to_gpio(unsigned irq)
+{
+	return -EINVAL;
+}
+
 
 #endif /* _ASM_I386_GPIO_H */

  parent reply	other threads:[~2008-07-01 22:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01  0:06 Michael Buesch
2008-07-01  1:04 ` Domenico Andreoli
2008-07-01 22:06   ` Domenico Andreoli
2008-07-01 22:09     ` Randy.Dunlap
2008-07-01 22:41       ` Domenico Andreoli
2008-07-01 22:37     ` David Brownell [this message]
2008-07-01  1:57 ` Marcel Holtmann

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=200807011537.46297.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=cavokz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome