#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/slab.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/uaccess.h>
#include <video/broadsheetfb.h>
struct panel_info { … };
static struct panel_info panel_table[] = …;
#define DPY_W …
#define DPY_H …
static struct fb_fix_screeninfo broadsheetfb_fix = …;
static struct fb_var_screeninfo broadsheetfb_var = …;
static void broadsheet_gpio_issue_data(struct broadsheetfb_par *par, u16 data)
{ … }
static void broadsheet_gpio_issue_cmd(struct broadsheetfb_par *par, u16 data)
{ … }
static void broadsheet_gpio_send_command(struct broadsheetfb_par *par, u16 data)
{ … }
static void broadsheet_gpio_send_cmdargs(struct broadsheetfb_par *par, u16 cmd,
int argc, u16 *argv)
{ … }
static void broadsheet_mmio_send_cmdargs(struct broadsheetfb_par *par, u16 cmd,
int argc, u16 *argv)
{ … }
static void broadsheet_send_command(struct broadsheetfb_par *par, u16 data)
{ … }
static void broadsheet_send_cmdargs(struct broadsheetfb_par *par, u16 cmd,
int argc, u16 *argv)
{ … }
static void broadsheet_gpio_burst_write(struct broadsheetfb_par *par, int size,
u16 *data)
{ … }
static void broadsheet_mmio_burst_write(struct broadsheetfb_par *par, int size,
u16 *data)
{ … }
static void broadsheet_burst_write(struct broadsheetfb_par *par, int size,
u16 *data)
{ … }
static u16 broadsheet_gpio_get_data(struct broadsheetfb_par *par)
{ … }
static u16 broadsheet_get_data(struct broadsheetfb_par *par)
{ … }
static void broadsheet_gpio_write_reg(struct broadsheetfb_par *par, u16 reg,
u16 data)
{ … }
static void broadsheet_mmio_write_reg(struct broadsheetfb_par *par, u16 reg,
u16 data)
{ … }
static void broadsheet_write_reg(struct broadsheetfb_par *par, u16 reg,
u16 data)
{ … }
static void broadsheet_write_reg32(struct broadsheetfb_par *par, u16 reg,
u32 data)
{ … }
static u16 broadsheet_read_reg(struct broadsheetfb_par *par, u16 reg)
{ … }
static int is_broadsheet_pll_locked(struct broadsheetfb_par *par)
{ … }
static int broadsheet_setup_plls(struct broadsheetfb_par *par)
{ … }
static int broadsheet_setup_spi(struct broadsheetfb_par *par)
{ … }
static int broadsheet_setup_spiflash(struct broadsheetfb_par *par,
u16 *orig_sfmcd)
{ … }
static int broadsheet_spiflash_wait_for_bit(struct broadsheetfb_par *par,
u16 reg, int bitnum, int val,
int timeout)
{ … }
static int broadsheet_spiflash_write_byte(struct broadsheetfb_par *par, u8 data)
{ … }
static int broadsheet_spiflash_read_byte(struct broadsheetfb_par *par, u8 *data)
{ … }
static int broadsheet_spiflash_wait_for_status(struct broadsheetfb_par *par,
int timeout)
{ … }
static int broadsheet_spiflash_op_on_address(struct broadsheetfb_par *par,
u8 op, u32 addr)
{ … }
static int broadsheet_verify_spiflash(struct broadsheetfb_par *par,
int *flash_type)
{ … }
static int broadsheet_setup_for_wfm_write(struct broadsheetfb_par *par,
u16 *initial_sfmcd, int *flash_type)
{ … }
static int broadsheet_spiflash_write_control(struct broadsheetfb_par *par,
int mode)
{ … }
static int broadsheet_spiflash_erase_sector(struct broadsheetfb_par *par,
int addr)
{ … }
static int broadsheet_spiflash_read_range(struct broadsheetfb_par *par,
int addr, int size, char *data)
{ … }
#define BS_SPIFLASH_PAGE_SIZE …
static int broadsheet_spiflash_write_page(struct broadsheetfb_par *par,
int addr, const char *data)
{ … }
static int broadsheet_spiflash_write_sector(struct broadsheetfb_par *par,
int addr, const char *data, int sector_size)
{ … }
static int broadsheet_spiflash_rewrite_sector(struct broadsheetfb_par *par,
int sector_size, int data_start_addr,
int data_len, const char *data)
{ … }
static int broadsheet_write_spiflash(struct broadsheetfb_par *par, u32 wfm_addr,
const u8 *wfm, int bytecount, int flash_type)
{ … }
static int broadsheet_store_waveform_to_spiflash(struct broadsheetfb_par *par,
const u8 *wfm, size_t wfm_size)
{ … }
static ssize_t broadsheet_loadstore_waveform(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
{ … }
static DEVICE_ATTR(loadstore_waveform, S_IWUSR, NULL,
broadsheet_loadstore_waveform);
static void broadsheet_init_display(struct broadsheetfb_par *par)
{ … }
static void broadsheet_identify(struct broadsheetfb_par *par)
{ … }
static void broadsheet_init(struct broadsheetfb_par *par)
{ … }
static void broadsheetfb_dpy_update_pages(struct broadsheetfb_par *par,
u16 y1, u16 y2)
{ … }
static void broadsheetfb_dpy_update(struct broadsheetfb_par *par)
{ … }
static void broadsheetfb_dpy_deferred_io(struct fb_info *info, struct list_head *pagereflist)
{ … }
static void broadsheetfb_defio_damage_range(struct fb_info *info, off_t off, size_t len)
{ … }
static void broadsheetfb_defio_damage_area(struct fb_info *info, u32 x, u32 y,
u32 width, u32 height)
{ … }
FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(broadsheetfb,
broadsheetfb_defio_damage_range,
broadsheetfb_defio_damage_area)
static const struct fb_ops broadsheetfb_ops = …;
static struct fb_deferred_io broadsheetfb_defio = …;
static int broadsheetfb_probe(struct platform_device *dev)
{ … }
static void broadsheetfb_remove(struct platform_device *dev)
{ … }
static struct platform_driver broadsheetfb_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…) …;