staging: fbtft: Fix checkpatch warning
Subsystems (2)
cover staging: fbtft: Fix checkpatch warning
Fix checkpatch.pl warning:
Block comments use * on subsequent lines Block comments use a trailing */ on a separate line
Anson Jacob (9):
staging: fbtft: fb_s6d02a1.c: Fix checkpatch warning
staging: fbtft: fb_s6d1121.c: Fix checkpatch warning
staging: fbtft: fb_ssd1289: Fix checkpatch warning
staging: fbtft: fb_ssd1306: Fix checkpatch warning
staging: fbtft: fb_ssd1331: Fix checkpatch warning
staging: fbtft: fb_st7735r: Fix checkpatch warning
staging: fbtft: fbtft-bus: Fix checkpatch warning
staging: fbtft: fbtft_device: Fix checkpatch warning
staging: fbtft: fb_tls8204: Fix checkpatch warning
drivers/staging/fbtft/fb_s6d02a1.c | 14 +++++---- drivers/staging/fbtft/fb_s6d1121.c | 8 ++--- drivers/staging/fbtft/fb_ssd1289.c | 8 ++--- drivers/staging/fbtft/fb_ssd1306.c | 23 ++++++++------- drivers/staging/fbtft/fb_ssd1331.c | 40 ++++++++++++------------- drivers/staging/fbtft/fb_st7735r.c | 43 ++++++++++++++++----------- drivers/staging/fbtft/fb_tls8204.c | 57 ++++++++++++++++++------------------ drivers/staging/fbtft/fbtft-bus.c | 3 +- drivers/staging/fbtft/fbtft_device.c | 8 +++-- 9 files changed, 110 insertions(+), 94 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/9 staging: fbtft: fb_s6d02a1.c: Fix checkpatch warning
Fix checkpatch.pl warning:
Block comments use * on subsequent lines Block comments use a trailing */ on a separate line
--- drivers/staging/fbtft/fb_s6d02a1.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/staging/fbtft/fb_s6d02a1.c +8 -6
@@ -113,12 +113,14 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)#define MV BIT(5)static int set_var (struct fbtft_par *par) { -/* Memory data access control (0x36h) -RGB/BGR: -1. Mode selection pin SRGB -RGB H/W pin for color filter setting: 0=RGB, 1=BGR -2. MADCTL RGB bit -RGB-BGR ORDER color filter panel: 0=RGB, 1=BGR */ +/* +* Memory data access control (0x36h) +* RGB/BGR: +* 1. Mode selection pin SRGB +* RGB H/W pin for color filter setting: 0=RGB, 1=BGR +* 2. MADCTL RGB bit +* RGB-BGR ORDER color filter panel: 0=RGB, 1=BGR +*/ switch (par->info->var.rotate) {case 0 : write_reg(par, MIPI_DCS_SET_ADDRESS_MODE,
Signature · 1 line
2.7.4
PATCH 2/9 staging: fbtft: fb_s6d1121.c: Fix checkpatch warning
In reply to Anson JacobFix checkpatch.pl warning:
Block comments use * on subsequent lines
--- drivers/staging/fbtft/fb_s6d1121.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/fbtft/fb_s6d1121.c +4 -4
@@ -125,10 +125,10 @@ static int set_var(struct fbtft_par *par) }/* -Gamma string format: -PKP0 PKP1 PKP2 PKP3 PKP4 PKP5 PKP6 PKP7 PKP8 PKP9 PKP10 PKP11 VRP0 VRP1 -PKN0 PKN1 PKN2 PKN3 PKN4 PKN5 PKN6 PKN7 PRN8 PRN9 PRN10 PRN11 VRN0 VRN1 -*/ +* Gamma string format: +* PKP0 PKP1 PKP2 PKP3 PKP4 PKP5 PKP6 PKP7 PKP8 PKP9 PKP10 PKP11 VRP0 VRP1 +* PKN0 PKN1 PKN2 PKN3 PKN4 PKN5 PKN6 PKN7 PRN8 PRN9 PRN10 PRN11 VRN0 VRN1 +*/ #define CURVE (num, idx) curves[num * par->gamma.num_values + idx]static int set_gamma (struct fbtft_par *par,unsigned long *curves) {
Signature · 1 line
2.7.4
PATCH 3/9 staging: fbtft: fb_ssd1289: Fix checkpatch warning
In reply to Anson JacobFix checkpatch.pl warning:
Block comments use * on subsequent lines
--- drivers/staging/fbtft/fb_ssd1289.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/fbtft/fb_ssd1289.c +4 -4
@@ -131,10 +131,10 @@ static int set_var(struct fbtft_par *par) }/* -Gamma string format: -VRP0 VRP1 PRP0 PRP1 PKP0 PKP1 PKP2 PKP3 PKP4 PKP5 -VRN0 VRN1 PRN0 PRN1 PKN0 PKN1 PKN2 PKN3 PKN4 PKN5 -*/ +* Gamma string format: +* VRP0 VRP1 PRP0 PRP1 PKP0 PKP1 PKP2 PKP3 PKP4 PKP5 +* VRN0 VRN1 PRN0 PRN1 PKN0 PKN1 PKN2 PKN3 PKN4 PKN5 +*/ #define CURVE (num, idx) curves[num * par->gamma.num_values + idx]static int set_gamma (struct fbtft_par *par,unsigned long *curves) {
Signature · 1 line
2.7.4
PATCH 4/9 staging: fbtft: fb_ssd1306: Fix checkpatch warning
In reply to Anson JacobFix checkpatch.pl warning:
Block comments use * on subsequent lines Block comments use a trailing */ on a separate line
--- drivers/staging/fbtft/fb_ssd1306.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
drivers/staging/fbtft/fb_ssd1306.c +12 -11
@@ -27,15 +27,15 @@#define HEIGHT 64/* -write_reg() caveat: - -This doesn't work because D/C has to be LOW for both values: -write_reg(par, val1, val2); - -Do it like this: -write_reg(par, val1); -write_reg(par, val2); -*/ +* write_reg() caveat: +* +* This doesn't work because D/C has to be LOW for both values: +* write_reg(par, val1, val2); +* +* Do it like this: +* write_reg(par, val1); +* write_reg(par, val2); +*/ /* Init sequence taken from the Adafruit SSD1306 Arduino library */ static int init_display (struct fbtft_par *par)
@@ -113,8 +113,9 @@ static int init_display(struct fbtft_par *par)write_reg (par,0xA4 );/* Set Normal Display -0 in RAM: OFF in display panel -1 in RAM: ON in display panel */ +* 0 in RAM: OFF in display panel +* 1 in RAM: ON in display panel +*/ write_reg (par,0xA6 );/* Set Display ON */
Signature · 1 line
2.7.4
PATCH 5/9 staging: fbtft: fb_ssd1331: Fix checkpatch warning
In reply to Anson JacobFix checkpatch.pl warning:
Block comments use * on subsequent lines
--- drivers/staging/fbtft/fb_ssd1331.c | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-)
drivers/staging/fbtft/fb_ssd1331.c +20 -20
@@ -102,26 +102,26 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...) }/* -Grayscale Lookup Table -GS1 - GS63 -The driver Gamma curve contains the relative values between the entries -in the Lookup table. - -From datasheet: -8.8 Gray Scale Decoder - -there are total 180 Gamma Settings (Setting 0 to Setting 180) -available for the Gray Scale table. - -The gray scale is defined in incremental way, with reference -to the length of previous table entry: -Setting of GS1 has to be >= 0 -Setting of GS2 has to be > Setting of GS1 +1 -Setting of GS3 has to be > Setting of GS2 +1 -: -Setting of GS63 has to be > Setting of GS62 +1 - -*/ +* Grayscale Lookup Table +* GS1 - GS63 +* The driver Gamma curve contains the relative values between the entries +* in the Lookup table. +* +* From datasheet: +* 8.8 Gray Scale Decoder +* +* there are total 180 Gamma Settings (Setting 0 to Setting 180) +* available for the Gray Scale table. +* +* The gray scale is defined in incremental way, with reference +* to the length of previous table entry: +* Setting of GS1 has to be >= 0 +* Setting of GS2 has to be > Setting of GS1 +1 +* Setting of GS3 has to be > Setting of GS2 +1 +* : +* Setting of GS63 has to be > Setting of GS62 +1 +* +*/ static int set_gamma (struct fbtft_par *par,unsigned long *curves) {unsigned long tmp[GAMMA_NUM *GAMMA_LEN ];
Signature · 1 line
2.7.4
PATCH 6/9 staging: fbtft: fb_st7735r: Fix checkpatch warning
In reply to Anson JacobFix checkpatch.pl warning:
Block comments use * on subsequent lines Block comments use a trailing */ on a separate line
--- drivers/staging/fbtft/fb_st7735r.c | 43 +++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 17 deletions(-)
drivers/staging/fbtft/fb_st7735r.c +26 -17
@@ -33,35 +33,43 @@ static int default_init_sequence[] = {-2 ,500 ,/* delay */ /* FRMCTR1 - frame rate control: normal mode -frame rate = fosc / (1 x 2 + 40) * (LINE + 2C + 2D) */ +* frame rate = fosc / (1 x 2 + 40) * (LINE + 2C + 2D) +*/ -1 ,0xB1 ,0x01 ,0x2C ,0x2D ,/* FRMCTR2 - frame rate control: idle mode -frame rate = fosc / (1 x 2 + 40) * (LINE + 2C + 2D) */ +* frame rate = fosc / (1 x 2 + 40) * (LINE + 2C + 2D) +*/ -1 ,0xB2 ,0x01 ,0x2C ,0x2D ,/* FRMCTR3 - frame rate control - partial mode -dot inversion mode, line inversion mode */ +* dot inversion mode, line inversion mode +*/ -1 ,0xB3 ,0x01 ,0x2C ,0x2D ,0x01 ,0x2C ,0x2D ,/* INVCTR - display inversion control -no inversion */ +* no inversion +*/ -1 ,0xB4 ,0x07 ,/* PWCTR1 - Power Control --4.6V, AUTO mode */ +* -4.6V, AUTO mode +*/ -1 ,0xC0 ,0xA2 ,0x02 ,0x84 ,/* PWCTR2 - Power Control -VGH25 = 2.4C VGSEL = -10 VGH = 3 * AVDD */ +* VGH25 = 2.4C VGSEL = -10 VGH = 3 * AVDD +*/ -1 ,0xC1 ,0xC5 ,/* PWCTR3 - Power Control -Opamp current small, Boost frequency */ +* Opamp current small, Boost frequency +*/ -1 ,0xC2 ,0x0A ,0x00 ,/* PWCTR4 - Power Control -BCLK/2, Opamp current small & Medium low */ +* BCLK/2, Opamp current small & Medium low +*/ -1 ,0xC3 ,0x8A ,0x2A , /* PWCTR5 - Power Control */
@@ -101,11 +109,12 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)static int set_var (struct fbtft_par *par) {/* MADCTL - Memory data access control -RGB/BGR: -1. Mode selection pin SRGB -RGB H/W pin for color filter setting: 0=RGB, 1=BGR -2. MADCTL RGB bit -RGB-BGR ORDER color filter panel: 0=RGB, 1=BGR */ +* RGB/BGR: +* 1. Mode selection pin SRGB +* RGB H/W pin for color filter setting: 0=RGB, 1=BGR +* 2. MADCTL RGB bit +* RGB-BGR ORDER color filter panel: 0=RGB, 1=BGR +*/ switch (par->info->var.rotate) {case 0 : write_reg(par, MIPI_DCS_SET_ADDRESS_MODE,
@@ -129,10 +138,10 @@ static int set_var(struct fbtft_par *par) }/* -Gamma string format: -VRF0P VOS0P PK0P PK1P PK2P PK3P PK4P PK5P PK6P PK7P PK8P PK9P SELV0P SELV1P SELV62P SELV63P -VRF0N VOS0N PK0N PK1N PK2N PK3N PK4N PK5N PK6N PK7N PK8N PK9N SELV0N SELV1N SELV62N SELV63N -*/ +* Gamma string format: +* VRF0P VOS0P PK0P PK1P PK2P PK3P PK4P PK5P PK6P PK7P PK8P PK9P SELV0P SELV1P SELV62P SELV63P +* VRF0N VOS0N PK0N PK1N PK2N PK3N PK4N PK5N PK6N PK7N PK8N PK9N SELV0N SELV1N SELV62N SELV63N +*/ #define CURVE (num, idx) curves[num * par->gamma.num_values + idx]static int set_gamma (struct fbtft_par *par,unsigned long *curves) {
Signature · 1 line
2.7.4
PATCH 7/9 staging: fbtft: fbtft-bus: Fix checkpatch warning
In reply to Anson JacobFix checkpatch.pl warning:
Block comments use * on subsequent lines Block comments use a trailing */ on a separate line
--- drivers/staging/fbtft/fbtft-bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/fbtft/fbtft-bus.c +2 -1
@@ -92,7 +92,8 @@ void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)if (par->spi && (par->spi->bits_per_word ==8 )) {/* we're emulating 9-bit, pad start of buffer with no-ops -(assuming here that zero is a no-op) */ +* (assuming here that zero is a no-op) +*/ pad = (len %4 ) ?4 - (len %4 ) :0 ;for (i =0 ; i < pad; i++) *buf++ =0x000 ;
Signature · 1 line
2.7.4
PATCH 8/9 staging: fbtft: fbtft_device: Fix checkpatch warning
In reply to Anson JacobFix checkpatch.pl warning:
Block comments use * on subsequent lines Block comments use a trailing */ on a separate line
--- drivers/staging/fbtft/fbtft_device.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fbtft_device.c +5 -3
@@ -1215,7 +1215,8 @@ static struct fbtft_device_display displays[] = { } }, {/* This should be the last item. -Used with the custom argument */ +* Used with the custom argument +*/ .name = "", .spi = &(struct spi_board_info ) { .modalias = "",
@@ -1306,8 +1307,9 @@ static struct fbtft_gpio fbtft_device_param_gpios[MAX_GPIOS + 1] = { };static void fbtft_device_pdev_release (struct device *dev) {/* Needed to silence this message: -Device 'xxx' does not have a release() function, it is broken and must be fixed -*/ +* Device 'xxx' does not have a release() function, +* it is broken and must be fixed +*/ }static int spi_device_found (struct device *dev,void *data)
Signature · 1 line
2.7.4
PATCH 9/9 staging: fbtft: fb_tls8204: Fix checkpatch warning
In reply to Anson JacobFix checkpatch.pl warning:
Block comments use * on subsequent lines Block comments use a trailing */ on a separate line
--- drivers/staging/fbtft/fb_tls8204.c | 57 +++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 28 deletions(-)
drivers/staging/fbtft/fb_tls8204.c +29 -28
@@ -44,21 +44,21 @@ static int init_display(struct fbtft_par *par) par->fbtftops.reset (par);/* Enter extended command mode */ -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 -*/ +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 +*/ /* H=1 Bias system */ -write_reg (par,0x10 | (bs &0x7 ));/* -4:1 1 -3:0 0 -2:x BS2 - Bias System -1:x BS1 -0:x BS0 -*/ +write_reg (par,0x10 | (bs &0x7 )); +/* 4:1 1 +* 3:0 0 +* 2:x BS2 - Bias System +* 1:x BS1 +* 0:x BS0 +*/ /* Set the address of the first display line. */ write_reg (par,0x04 | (64 >>6 ));
@@ -68,12 +68,12 @@ static int init_display(struct fbtft_par *par)write_reg (par,0x20 );/* H=0 Display control */ -write_reg (par,0x08 |4 );/* -3:1 1 -2:1 D - DE: 10=normal mode -1:0 0 -0:0 E -*/ +write_reg (par,0x08 |4 ); +/* 3:1 1 +* 2:1 D - DE: 10=normal mode +* 1:0 0 +* 0:0 E +*/ return 0 ; }
@@ -81,15 +81,15 @@ 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) {/* H=0 Set X address of RAM */ -write_reg (par,0x80 );/* 7:1 1 -6-0: X[6:0] - 0x00 -*/ +write_reg (par,0x80 );/* 7:1 1 +* 6-0: X[6:0] - 0x00 +*/ /* H=0 Set Y address of RAM */ -write_reg (par,0x40 );/* 7:0 0 -6:1 1 -2-0: Y[2:0] - 0x0 -*/ +write_reg (par,0x40 );/* 7:0 0 +* 6:1 1 +* 2-0: Y[2:0] - 0x0 +*/ }static int write_vmem (struct fbtft_par *par,size_t offset,size_t len)
@@ -100,8 +100,9 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)for (y =0 ; y <HEIGHT /8 ; y++) {u8 *buf = par->txbuf.buf; -/* The display is 102x68 but the LCD is 84x48. Set -the write pointer at the start of each row. */ +/* The display is 102x68 but the LCD is 84x48. +* Set the write pointer at the start of each row. +*/ gpio_set_value (par->gpio.dc,0 );write_reg (par,0x80 |0 );write_reg (par,0x40 | y);
Signature · 1 line
2.7.4