fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
"%s()\n", __func__);
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
- "display size %dx%d\n", par->info->var.xres, par->info->var.yres);
+ "display size %dx%d\n",
+ par->info->var.xres,
+ par->info->var.yres);
par->fbtftops.reset(par);
write_reg(par, 0x1D, 0x0E);
write_reg(par, 0x1E, 0x00);
write_reg(par, 0x1F, 0x02);
- } else if ((par->info->var.xres == 480) && (par->info->var.yres == 272)) {
+ } else if ((par->info->var.xres == 480) &&
+ (par->info->var.yres == 272)) {
/* PLL clock frequency */
write_reg(par, 0x88, 0x0A);
write_reg(par, 0x89, 0x02);
write_reg(par, 0x1D, 0x07);
write_reg(par, 0x1E, 0x00);
write_reg(par, 0x1F, 0x09);
- } else if ((par->info->var.xres == 640) && (par->info->var.yres == 480)) {
+ } else if ((par->info->var.xres == 640) &&
+ (par->info->var.yres == 480)) {
/* PLL clock frequency */
write_reg(par, 0x88, 0x0B);
write_reg(par, 0x89, 0x02);
write_reg(par, 0x1D, 0x0E);
write_reg(par, 0x1E, 0x00);
write_reg(par, 0x1F, 0x01);
- } else if ((par->info->var.xres == 800) && (par->info->var.yres == 480)) {
+ } else if ((par->info->var.xres == 800) &&
+ (par->info->var.yres == 480)) {
/* PLL clock frequency */
write_reg(par, 0x88, 0x0B);
write_reg(par, 0x89, 0x02);
#define WIDTH 84
#define HEIGHT 48
#define TXBUFLEN WIDTH
-#define DEFAULT_GAMMA "40" /* gamma is used to control contrast in this driver */
+
+/* gamma is used to control contrast in this driver */
+#define DEFAULT_GAMMA "40"
static unsigned bs = 4;
module_param(bs, uint, 0);
write_reg(par, 0x21); /* 5:1 1
2:0 PD - Powerdown control: chip is active
1:0 V - Entry mode: horizontal addressing
- 0:1 H - Extended instruction set control: extended
+ 0:1 H - Extended instruction set control:
+ extended
*/
/* H=1 Bias system */
static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
{
- fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par, "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);
+ fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par,
+ "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n",
+ __func__, xs, ys, xe, ye);
/* H=0 Set X address of RAM */
write_reg(par, 0x80); /* 7:1 1
/* ili9320, ili9325 */
-static void flexfb_set_addr_win_1(struct fbtft_par *par, int xs, int ys, int xe, int ye)
+static void flexfb_set_addr_win_1(struct fbtft_par *par,
+ int xs, int ys, int xe, int ye)
{
- fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par, "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);
+ fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par,
+ "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n",
+ __func__, xs, ys, xe, ye);
switch (par->info->var.rotate) {
/* R20h = Horizontal GRAM Start Address */
/* R21h = Vertical GRAM Start Address */
}
/* ssd1289 */
-static void flexfb_set_addr_win_2(struct fbtft_par *par, int xs, int ys, int xe, int ye)
+static void flexfb_set_addr_win_2(struct fbtft_par *par,
+ int xs, int ys, int xe, int ye)
{
- fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par, "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);
+ fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par,
+ "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n",
+ __func__, xs, ys, xe, ye);
switch (par->info->var.rotate) {
/* R4Eh - Set GDDRAM X address counter */
}
/* ssd1351 */
-static void set_addr_win_3(struct fbtft_par *par, int xs, int ys, int xe, int ye)
+static void set_addr_win_3(struct fbtft_par *par,
+ int xs, int ys, int xe, int ye)
{
- fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par, "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);
+ fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par,
+ "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__,
+ xs, ys, xe, ye);
write_reg(par, 0x15, xs, xe);
write_reg(par, 0x75, ys, ye);
fbtft_par_dbg(DEBUG_VERIFY_GPIOS, par, "%s()\n", __func__);
if (par->gpio.dc < 0) {
- dev_err(par->info->device, "Missing info about 'dc' gpio. Aborting.\n");
+ dev_err(par->info->device,
+ "Missing info about 'dc' gpio. Aborting.\n");
return -EINVAL;
}
num_db=buswidth/2;
for (i=0;i < num_db;i++) {
if (par->gpio.db[i] < 0) {
- dev_err(par->info->device, "Missing info about 'db%02d' gpio. Aborting.\n", i);
+ dev_err(par->info->device,
+ "Missing info about 'db%02d' gpio. Aborting.\n",
+ i);
return -EINVAL;
}
}
static struct fbtft_display flex_display = { };
-static int flexfb_probe_common(struct spi_device *sdev, struct platform_device *pdev)
+static int flexfb_probe_common(struct spi_device *sdev,
+ struct platform_device *pdev)
{
struct device *dev;
struct fb_info *info;
else
dev = &pdev->dev;
- fbtft_init_dbg(dev, "%s(%s)\n", __func__, sdev ? "'SPI device'" : "'Platform device'");
+ fbtft_init_dbg(dev, "%s(%s)\n", __func__,
+ sdev ? "'SPI device'" : "'Platform device'");
if (chip) {
par->fbtftops.write_register = fbtft_write_reg16_bus8;
break;
default:
- dev_err(dev, "argument 'regwidth': %d is not supported.\n", regwidth);
+ dev_err(dev,
+ "argument 'regwidth': %d is not supported.\n",
+ regwidth);
return -EINVAL;
}
par->fbtftops.set_addr_win = set_addr_win_3;
break;
default:
- dev_err(dev, "argument 'setaddrwin': unknown value %d.\n", setaddrwin);
+ dev_err(dev, "argument 'setaddrwin': unknown value %d.\n",
+ setaddrwin);
return -EINVAL;
}