#include <linux/backlight.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/pwm.h>
#include <linux/uaccess.h>
#include <linux/regulator/consumer.h>
#define SSD1307FB_DATA …
#define SSD1307FB_COMMAND …
#define SSD1307FB_SET_ADDRESS_MODE …
#define SSD1307FB_SET_ADDRESS_MODE_HORIZONTAL …
#define SSD1307FB_SET_ADDRESS_MODE_VERTICAL …
#define SSD1307FB_SET_ADDRESS_MODE_PAGE …
#define SSD1307FB_SET_COL_RANGE …
#define SSD1307FB_SET_PAGE_RANGE …
#define SSD1307FB_CONTRAST …
#define SSD1307FB_SET_LOOKUP_TABLE …
#define SSD1307FB_CHARGE_PUMP …
#define SSD1307FB_SEG_REMAP_ON …
#define SSD1307FB_DISPLAY_OFF …
#define SSD1307FB_SET_MULTIPLEX_RATIO …
#define SSD1307FB_DISPLAY_ON …
#define SSD1307FB_START_PAGE_ADDRESS …
#define SSD1307FB_SET_DISPLAY_OFFSET …
#define SSD1307FB_SET_CLOCK_FREQ …
#define SSD1307FB_SET_AREA_COLOR_MODE …
#define SSD1307FB_SET_PRECHARGE_PERIOD …
#define SSD1307FB_SET_COM_PINS_CONFIG …
#define SSD1307FB_SET_VCOMH …
#define MAX_CONTRAST …
#define REFRESHRATE …
static u_int refreshrate = …;
module_param(refreshrate, uint, 0);
struct ssd1307fb_deviceinfo { … };
struct ssd1307fb_par { … };
struct ssd1307fb_array { … };
static const struct fb_fix_screeninfo ssd1307fb_fix = …;
static const struct fb_var_screeninfo ssd1307fb_var = …;
static struct ssd1307fb_array *ssd1307fb_alloc_array(u32 len, u8 type)
{ … }
static int ssd1307fb_write_array(struct i2c_client *client,
struct ssd1307fb_array *array, u32 len)
{ … }
static inline int ssd1307fb_write_cmd(struct i2c_client *client, u8 cmd)
{ … }
static int ssd1307fb_set_col_range(struct ssd1307fb_par *par, u8 col_start,
u8 cols)
{ … }
static int ssd1307fb_set_page_range(struct ssd1307fb_par *par, u8 page_start,
u8 pages)
{ … }
static int ssd1307fb_update_rect(struct ssd1307fb_par *par, unsigned int x,
unsigned int y, unsigned int width,
unsigned int height)
{ … }
static int ssd1307fb_update_display(struct ssd1307fb_par *par)
{ … }
static int ssd1307fb_blank(int blank_mode, struct fb_info *info)
{ … }
static void ssd1307fb_defio_damage_range(struct fb_info *info, off_t off, size_t len)
{ … }
static void ssd1307fb_defio_damage_area(struct fb_info *info, u32 x, u32 y,
u32 width, u32 height)
{ … }
FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(ssd1307fb,
ssd1307fb_defio_damage_range,
ssd1307fb_defio_damage_area)
static const struct fb_ops ssd1307fb_ops = …;
static void ssd1307fb_deferred_io(struct fb_info *info, struct list_head *pagereflist)
{ … }
static int ssd1307fb_init(struct ssd1307fb_par *par)
{ … }
static int ssd1307fb_update_bl(struct backlight_device *bdev)
{ … }
static int ssd1307fb_get_brightness(struct backlight_device *bdev)
{ … }
static const struct backlight_ops ssd1307fb_bl_ops = …;
static struct ssd1307fb_deviceinfo ssd1307fb_ssd1305_deviceinfo = …;
static struct ssd1307fb_deviceinfo ssd1307fb_ssd1306_deviceinfo = …;
static struct ssd1307fb_deviceinfo ssd1307fb_ssd1307_deviceinfo = …;
static struct ssd1307fb_deviceinfo ssd1307fb_ssd1309_deviceinfo = …;
static const struct of_device_id ssd1307fb_of_match[] = …;
MODULE_DEVICE_TABLE(of, ssd1307fb_of_match);
static int ssd1307fb_probe(struct i2c_client *client)
{ … }
static void ssd1307fb_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id ssd1307fb_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, ssd1307fb_i2c_id);
static struct i2c_driver ssd1307fb_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;