From 9c9f32eddee56888c7acd0d69134a5dcae09e1a8 Mon Sep 17 00:00:00 2001 From: Alessandro Rubini Date: Wed, 12 Jun 2013 09:13:25 +0200 Subject: FMC: create drivers/fmc and toplevel Kconfig question 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 Acked-by: Juan David Gonzalez Cobas Acked-by: Emilio G. Cota Acked-by: Samuel Iglesias Gonsalvez Signed-off-by: Greg Kroah-Hartman --- drivers/fmc/Kconfig | 17 +++++++++++++++++ drivers/fmc/Makefile | 4 ++++ drivers/fmc/fmc-core.c | 24 ++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 drivers/fmc/Kconfig create mode 100644 drivers/fmc/Makefile create mode 100644 drivers/fmc/fmc-core.c (limited to 'drivers/fmc') diff --git a/drivers/fmc/Kconfig b/drivers/fmc/Kconfig new file mode 100644 index 0000000..e287902 --- /dev/null +++ b/drivers/fmc/Kconfig @@ -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 index 0000000..a2784d8 --- /dev/null +++ b/drivers/fmc/Makefile @@ -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 index 0000000..fc3547f --- /dev/null +++ b/drivers/fmc/fmc-core.c @@ -0,0 +1,24 @@ +/* Temporary placeholder so the empty code can build */ +#include +#include +#include +#include + +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"); -- cgit v1.1