From 3c588452c2df09e1f0aa48b0e04bf53c31d61565 Mon Sep 17 00:00:00 2001 From: Anton Gerasimov Date: Sat, 13 Jun 2015 22:23:47 +0300 Subject: [PATCH] staging: fbtft: split long strings Split long function declarations, function calls, comments etc. Signed-off-by: Anton Gerasimov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fbtft/fb_ra8875.c | 13 ++++++++---- drivers/staging/fbtft/fb_tls8204.c | 11 +++++++--- drivers/staging/fbtft/fbtft_device.c | 3 ++- drivers/staging/fbtft/flexfb.c | 41 +++++++++++++++++++++++++----------- 4 files changed, 48 insertions(+), 20 deletions(-) diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c index 2c4d4dc..54bc566 100644 --- a/drivers/staging/fbtft/fb_ra8875.c +++ b/drivers/staging/fbtft/fb_ra8875.c @@ -73,7 +73,9 @@ static int init_display(struct fbtft_par *par) 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); @@ -101,7 +103,8 @@ static int init_display(struct fbtft_par *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); @@ -125,7 +128,8 @@ static int init_display(struct fbtft_par *par) 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); @@ -149,7 +153,8 @@ static int init_display(struct fbtft_par *par) 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); diff --git a/drivers/staging/fbtft/fb_tls8204.c b/drivers/staging/fbtft/fb_tls8204.c index 5ea73b5..3253a25 100644 --- a/drivers/staging/fbtft/fb_tls8204.c +++ b/drivers/staging/fbtft/fb_tls8204.c @@ -35,7 +35,9 @@ #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); @@ -51,7 +53,8 @@ static int init_display(struct fbtft_par *par) 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 */ @@ -83,7 +86,9 @@ 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) { - 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 diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index df6cd77..611e128 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1063,7 +1063,8 @@ static struct fbtft_device_display displays[] = { .display = { .buswidth = 8, .backlight = 1, - .init_sequence = waveshare32b_init_sequence, + .init_sequence = + waveshare32b_init_sequence, }, .bgr = true, .gpios = (const struct fbtft_gpio []) { diff --git a/drivers/staging/fbtft/flexfb.c b/drivers/staging/fbtft/flexfb.c index ca39fe9..5c813fc 100644 --- a/drivers/staging/fbtft/flexfb.c +++ b/drivers/staging/fbtft/flexfb.c @@ -134,9 +134,12 @@ static int ssd1351_init[] = { -1,0xfd,0x12,-1,0xfd,0xb1,-1,0xae,-1,0xb3,0xf1,-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 */ @@ -161,9 +164,12 @@ static void flexfb_set_addr_win_1(struct fbtft_par *par, int xs, int ys, int xe, } /* 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 */ @@ -191,9 +197,12 @@ static void flexfb_set_addr_win_2(struct fbtft_par *par, int xs, int ys, int xe, } /* 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); @@ -205,7 +214,8 @@ static int flexfb_verify_gpios_dc(struct fbtft_par *par) 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; } @@ -235,7 +245,9 @@ static int flexfb_verify_gpios_db(struct fbtft_par *par) 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; } } @@ -245,7 +257,8 @@ static int flexfb_verify_gpios_db(struct fbtft_par *par) 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; @@ -260,7 +273,8 @@ static int flexfb_probe_common(struct spi_device *sdev, struct platform_device * 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) { @@ -403,7 +417,9 @@ static int flexfb_probe_common(struct spi_device *sdev, struct platform_device * 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; } @@ -483,7 +499,8 @@ static int flexfb_probe_common(struct spi_device *sdev, struct platform_device * 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; } -- 2.7.4