#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/vmalloc.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/list.h>
#include <linux/firmware.h>
#include <linux/dma-mapping.h>
#include <linux/uaccess.h>
#include <linux/irq.h>
#include <video/metronomefb.h>
#include <asm/unaligned.h>
#define DPY_W …
#define DPY_H …
static int user_wfm_size;
struct epd_frame { … };
static struct epd_frame epd_frame_table[] = …;
static struct fb_fix_screeninfo metronomefb_fix = …;
static struct fb_var_screeninfo metronomefb_var = …;
struct waveform_hdr { … } __attribute__ ((packed));
static u8 calc_cksum(int start, int end, u8 *mem)
{ … }
static u16 calc_img_cksum(u16 *start, int length)
{ … }
static int load_waveform(u8 *mem, size_t size, int m, int t,
struct metronomefb_par *par)
{ … }
static int metronome_display_cmd(struct metronomefb_par *par)
{ … }
static int metronome_powerup_cmd(struct metronomefb_par *par)
{ … }
static int metronome_config_cmd(struct metronomefb_par *par)
{ … }
static int metronome_init_cmd(struct metronomefb_par *par)
{ … }
static int metronome_init_regs(struct metronomefb_par *par)
{ … }
static void metronomefb_dpy_update(struct metronomefb_par *par)
{ … }
static u16 metronomefb_dpy_update_page(struct metronomefb_par *par, int index)
{ … }
static void metronomefb_dpy_deferred_io(struct fb_info *info, struct list_head *pagereflist)
{ … }
static void metronomefb_defio_damage_range(struct fb_info *info, off_t off, size_t len)
{ … }
static void metronomefb_defio_damage_area(struct fb_info *info, u32 x, u32 y,
u32 width, u32 height)
{ … }
FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(metronomefb,
metronomefb_defio_damage_range,
metronomefb_defio_damage_area)
static const struct fb_ops metronomefb_ops = …;
static struct fb_deferred_io metronomefb_defio = …;
static int metronomefb_probe(struct platform_device *dev)
{ … }
static void metronomefb_remove(struct platform_device *dev)
{ … }
static struct platform_driver metronomefb_driver = …;
module_platform_driver(…) …;
module_param(user_wfm_size, uint, 0);
MODULE_PARM_DESC(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…) …;