linux/drivers/staging/fbtft/fb_uc1611.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * FB driver for the UltraChip UC1611 LCD controller
 *
 * The display is 4-bit grayscale (16 shades) 240x160.
 *
 * Copyright (C) 2015 Henri Chain
 */

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/gpio/consumer.h>
#include <linux/spi/spi.h>
#include <linux/delay.h>

#include "fbtft.h"

#define DRVNAME
#define WIDTH
#define HEIGHT
#define BPP
#define FPS

/*
 * LCD voltage is a combination of ratio, gain, pot and temp
 *
 * V_LCD = V_BIAS * ratio
 * V_LCD = (C_V0 + C_PM × pot) * (1 + (T - 25) * temp)
 * C_V0 and C_PM depend on ratio and gain
 * T is ambient temperature
 */

/* BR -> actual ratio: 0-3 -> 5, 10, 11, 13 */
static unsigned int ratio =;
module_param(ratio, uint, 0000);
MODULE_PARM_DESC();

static unsigned int gain =;
module_param(gain, uint, 0000);
MODULE_PARM_DESC();

static unsigned int pot =;
module_param(pot, uint, 0000);
MODULE_PARM_DESC();

/* TC -> % compensation per deg C: 0-3 -> -.05, -.10, -.015, -.20 */
static unsigned int temp;
module_param(temp, uint, 0000);
MODULE_PARM_DESC();

/* PC[1:0] -> LCD capacitance: 0-3 -> <20nF, 20-28 nF, 29-40 nF, 40-56 nF */
static unsigned int load =;
module_param(load, uint, 0000);
MODULE_PARM_DESC();

/* PC[3:2] -> V_LCD: 0, 1, 3 -> ext., int. with ratio = 5, int. standard */
static unsigned int pump =;
module_param(pump, uint, 0000);
MODULE_PARM_DESC();

static int init_display(struct fbtft_par *par)
{}

static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
{}

static int blank(struct fbtft_par *par, bool on)
{}

static int set_var(struct fbtft_par *par)
{}

static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
{}

static struct fbtft_display display =;

FBTFT_REGISTER_DRIVER();

MODULE_ALIAS();
MODULE_ALIAS();
MODULE_ALIAS();
MODULE_ALIAS();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();