#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/spi/altera.h>
#include <linux/spi/spi.h>
#include <linux/io.h>
#include <linux/of.h>
#define DRV_NAME …
enum altera_spi_type { … };
static const struct regmap_config spi_altera_config = …;
static int altera_spi_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id altera_spi_match[] = …;
MODULE_DEVICE_TABLE(of, altera_spi_match);
#endif
static const struct platform_device_id altera_spi_ids[] = …;
MODULE_DEVICE_TABLE(platform, altera_spi_ids);
static struct platform_driver altera_spi_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;