From: Linus Walleij Date: Sat, 8 Jun 2019 23:11:38 +0000 (+0200) Subject: fmc: Decouple from Linux GPIO subsystem X-Git-Tag: v5.3-rc1~176^2~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7fae8a9ced742f364604a88a53084f471cc9c6e5;p=thirdparty%2Fkernel%2Flinux.git fmc: Decouple from Linux GPIO subsystem FMC has its own GPIO handling, the inclusion of is only to reuse some flags that we can just as well provide using local defines. Cc: Federico Vaga Cc: Pat Riehecky Acked-by: Alessandro Rubini Signed-off-by: Linus Walleij --- diff --git a/drivers/fmc/fmc-trivial.c b/drivers/fmc/fmc-trivial.c index 8defdee3e3a33..b99dbc7ee2030 100644 --- a/drivers/fmc/fmc-trivial.c +++ b/drivers/fmc/fmc-trivial.c @@ -15,7 +15,6 @@ #include #include #include -#include #include static struct fmc_driver t_drv; /* initialized later */ diff --git a/include/linux/fmc.h b/include/linux/fmc.h index b355f3806f3f5..8661a46a676f4 100644 --- a/include/linux/fmc.h +++ b/include/linux/fmc.h @@ -100,7 +100,7 @@ struct fmc_gpio { char *carrier_name; /* name or NULL for virtual pins */ int gpio; int _gpio; /* internal use by the carrier */ - int mode; /* GPIOF_DIR_OUT etc, from */ + int mode; /* GPIOF_DIR_OUT etc */ int irqmode; /* IRQF_TRIGGER_LOW and so on */ }; @@ -114,13 +114,15 @@ struct fmc_gpio { #define FMC_GPIO_USER(x) ((x) + 0x1400) /* 256 of them */ /* We may add SCL and SDA, or other roles if the need arises */ -/* GPIOF_DIR_IN etc are missing before 3.0. copy from */ -#ifndef GPIOF_DIR_IN -# define GPIOF_DIR_OUT (0 << 0) -# define GPIOF_DIR_IN (1 << 0) -# define GPIOF_INIT_LOW (0 << 1) -# define GPIOF_INIT_HIGH (1 << 1) -#endif +/* + * These are similar to the legacy Linux GPIO defines from + * but in fact FMC has its own GPIO handling and is not using the Linux + * GPIO subsystem. + */ +#define GPIOF_DIR_OUT (0 << 0) +#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