FMC: create drivers/fmc and toplevel Kconfig question
authorAlessandro Rubini <rubini@gnudd.com>
Wed, 12 Jun 2013 07:13:25 +0000 (09:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jun 2013 23:38:57 +0000 (16:38 -0700)
This commit creates the drivers/fmc directory and puts the necessary
hooks for kbuild and kconfig.  The code is currently a placeholder
that only registers an empty bus.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Juan David Gonzalez Cobas <dcobas@cern.ch>
Acked-by: Emilio G. Cota <cota@braap.org>
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
MAINTAINERS
drivers/Kconfig
drivers/Makefile
drivers/fmc/Kconfig [new file with mode: 0644]
drivers/fmc/Makefile [new file with mode: 0644]
drivers/fmc/fmc-core.c [new file with mode: 0644]

index 5be702c..14746ad 100644 (file)
@@ -3309,6 +3309,15 @@ T:       git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/floppy.git
 S:     Odd fixes
 F:     drivers/block/floppy.c
 
+FMC SUBSYSTEM
+M:     Alessandro Rubini <rubini@gnudd.com>
+W:     http://www.ohwr.org/projects/fmc-bus
+S:     Supported
+F:     drivers/fmc/
+F:     include/linux/fmc*.h
+F:     include/linux/ipmi-fru.h
+K:     fmc_d.*register
+
 FPU EMULATOR
 M:     Bill Metzenthen <billm@melbpc.org.au>
 W:     http://floatingpoint.sourceforge.net/emulator/index.html
index 9953a42..ae050b5 100644 (file)
@@ -166,4 +166,6 @@ source "drivers/ipack/Kconfig"
 
 source "drivers/reset/Kconfig"
 
+source "drivers/fmc/Kconfig"
+
 endmenu
index 130abc1..336b0ad 100644 (file)
@@ -152,3 +152,4 @@ obj-$(CONFIG_IIO)           += iio/
 obj-$(CONFIG_VME_BUS)          += vme/
 obj-$(CONFIG_IPACK_BUS)                += ipack/
 obj-$(CONFIG_NTB)              += ntb/
+obj-$(CONFIG_FMC)              += fmc/
diff --git a/drivers/fmc/Kconfig b/drivers/fmc/Kconfig
new file mode 100644 (file)
index 0000000..e287902
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# FMC (ANSI-VITA 57.1) bus support
+#
+
+menuconfig FMC
+       tristate "FMC support"
+       help
+
+         FMC (FPGA Mezzanine Carrier) is a mechanical and electrical
+         standard for mezzanine cards that plug into a carrier board.
+         This kernel subsystem supports the matching between carrier
+         and mezzanine based on identifiers stored in the internal I2C
+         EEPROM, as well as having carrier-independent drivers.
+
+         The framework was born outside of the kernel and at this time
+         the off-tree code base is more complete.  Code and documentation
+         is at git://ohwr.org/fmc-projects/fmc-bus.git .
diff --git a/drivers/fmc/Makefile b/drivers/fmc/Makefile
new file mode 100644 (file)
index 0000000..a2784d8
--- /dev/null
@@ -0,0 +1,4 @@
+
+obj-$(CONFIG_FMC) += fmc.o
+
+fmc-y = fmc-core.o
diff --git a/drivers/fmc/fmc-core.c b/drivers/fmc/fmc-core.c
new file mode 100644 (file)
index 0000000..fc3547f
--- /dev/null
@@ -0,0 +1,24 @@
+/* Temporary placeholder so the empty code can build */
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/device.h>
+
+static struct bus_type fmc_bus_type = {
+       .name = "fmc",
+};
+
+static int fmc_init(void)
+{
+       return bus_register(&fmc_bus_type);
+}
+
+static void fmc_exit(void)
+{
+       bus_unregister(&fmc_bus_type);
+}
+
+module_init(fmc_init);
+module_exit(fmc_exit);
+
+MODULE_LICENSE("GPL");