Commit 7fae8a9c authored by Linus Walleij's avatar Linus Walleij

fmc: Decouple from Linux GPIO subsystem

FMC has its own GPIO handling, the inclusion of <linux/gpio.h>
is only to reuse some flags that we can just as well provide
using local defines.

Cc: Federico Vaga <federico.vaga@cern.ch>
Cc: Pat Riehecky <riehecky@fnal.gov>
Acked-by: default avatarAlessandro Rubini <rubini@gnudd.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent fc8938d4
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/gpio.h>
#include <linux/fmc.h> #include <linux/fmc.h>
static struct fmc_driver t_drv; /* initialized later */ static struct fmc_driver t_drv; /* initialized later */
......
...@@ -100,7 +100,7 @@ struct fmc_gpio { ...@@ -100,7 +100,7 @@ struct fmc_gpio {
char *carrier_name; /* name or NULL for virtual pins */ char *carrier_name; /* name or NULL for virtual pins */
int gpio; int gpio;
int _gpio; /* internal use by the carrier */ int _gpio; /* internal use by the carrier */
int mode; /* GPIOF_DIR_OUT etc, from <linux/gpio.h> */ int mode; /* GPIOF_DIR_OUT etc */
int irqmode; /* IRQF_TRIGGER_LOW and so on */ int irqmode; /* IRQF_TRIGGER_LOW and so on */
}; };
...@@ -114,13 +114,15 @@ struct fmc_gpio { ...@@ -114,13 +114,15 @@ struct fmc_gpio {
#define FMC_GPIO_USER(x) ((x) + 0x1400) /* 256 of them */ #define FMC_GPIO_USER(x) ((x) + 0x1400) /* 256 of them */
/* We may add SCL and SDA, or other roles if the need arises */ /* We may add SCL and SDA, or other roles if the need arises */
/* GPIOF_DIR_IN etc are missing before 3.0. copy from <linux/gpio.h> */ /*
#ifndef GPIOF_DIR_IN * These are similar to the legacy Linux GPIO defines from <linux/gpio.h>
# define GPIOF_DIR_OUT (0 << 0) * but in fact FMC has its own GPIO handling and is not using the Linux
# define GPIOF_DIR_IN (1 << 0) * GPIO subsystem.
# define GPIOF_INIT_LOW (0 << 1) */
# define GPIOF_INIT_HIGH (1 << 1) #define GPIOF_DIR_OUT (0 << 0)
#endif #define GPIOF_DIR_IN (1 << 0)
#define GPIOF_INIT_LOW (0 << 1)
#define GPIOF_INIT_HIGH (1 << 1)
/* /*
* The operations are offered by each carrier and should make driver * The operations are offered by each carrier and should make driver
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment