Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH 0/3] staging/fbtft: Minor cleanups.
@ 2026-07-14 19:09 Panagiotis Gravias
  2026-07-14 19:09 ` [PATCH 1/3] staging/fbtft: Remove prohibited space before close parenthesis Panagiotis Gravias
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Panagiotis Gravias @ 2026-07-14 19:09 UTC (permalink / raw)
  To: andy, gregkh
  Cc: namcao, tomasz.unger, dri-devel, linux-fbdev, linux-staging,
	linux-kernel, Panagiotis Gravias

Solved some style errors,
parenthesis spacing, aligning arguments, replacing udelay() with
usleep_range().

I hope this makes future checks with the style script cleaner and more
helpfull.

Panagiotis Gravias (3):
  staging/fbtft: Remove prohibited space before close parenthesis
  staging/fbtft: Align arguments to match open parenthesis
  staging: fbtft: Replace udelay with usleep_range

 drivers/staging/fbtft/fb_ra8875.c    |  4 ++--
 drivers/staging/fbtft/fb_tinylcd.c   |  2 +-
 drivers/staging/fbtft/fb_upd161704.c | 18 +++++++++---------
 drivers/staging/fbtft/fbtft-bus.c    |  4 ++--
 4 files changed, 14 insertions(+), 14 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] staging/fbtft: Remove prohibited space before close parenthesis
  2026-07-14 19:09 [PATCH 0/3] staging/fbtft: Minor cleanups Panagiotis Gravias
@ 2026-07-14 19:09 ` Panagiotis Gravias
  2026-07-14 19:16   ` Andy Shevchenko
  2026-07-14 19:09 ` [PATCH 2/3] staging/fbtft: Align arguments to match open parenthesis Panagiotis Gravias
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Panagiotis Gravias @ 2026-07-14 19:09 UTC (permalink / raw)
  To: andy, gregkh
  Cc: namcao, tomasz.unger, dri-devel, linux-fbdev, linux-staging,
	linux-kernel, Panagiotis Gravias

Fix checkpatch error: "space prohibited before that close parenthesis"
in the define_fbtft_write_reg macro.

Signed-off-by: Panagiotis Gravias <graviaspanagiotis1@gmail.com>
---
 drivers/staging/fbtft/fbtft-bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
index 30e436ff19e4..38697992f5e1 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -62,9 +62,9 @@ out:									      \
 }                                                                             \
 EXPORT_SYMBOL(func);
 
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8,)
 define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16,)
 
 void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
 {
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] staging/fbtft: Align arguments to match open parenthesis
  2026-07-14 19:09 [PATCH 0/3] staging/fbtft: Minor cleanups Panagiotis Gravias
  2026-07-14 19:09 ` [PATCH 1/3] staging/fbtft: Remove prohibited space before close parenthesis Panagiotis Gravias
@ 2026-07-14 19:09 ` Panagiotis Gravias
  2026-07-14 19:16   ` Andy Shevchenko
  2026-07-14 19:09 ` [PATCH 3/3] staging: fbtft: Replace udelay with usleep_range Panagiotis Gravias
  2026-07-14 19:18 ` [PATCH 0/3] staging/fbtft: Minor cleanups Andy Shevchenko
  3 siblings, 1 reply; 8+ messages in thread
From: Panagiotis Gravias @ 2026-07-14 19:09 UTC (permalink / raw)
  To: andy, gregkh
  Cc: namcao, tomasz.unger, dri-devel, linux-fbdev, linux-staging,
	linux-kernel, Panagiotis Gravias

Fix checkpatch warning for alignment in write_reg() call to match
the open parenthesis, improving code readability.

Signed-off-by: Panagiotis Gravias <graviaspanagiotis1@gmail.com>
---
 drivers/staging/fbtft/fb_tinylcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c
index afa8f1c740c5..d58b1247262b 100644
--- a/drivers/staging/fbtft/fb_tinylcd.c
+++ b/drivers/staging/fbtft/fb_tinylcd.c
@@ -38,7 +38,7 @@ static int init_display(struct fbtft_par *par)
 	write_reg(par, 0xE5, 0x00);
 	write_reg(par, 0xF0, 0x36, 0xA5, 0x53);
 	write_reg(par, 0xE0, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00,
-		       0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
+		  0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
 	write_reg(par, MIPI_DCS_SET_PIXEL_FORMAT, 0x55);
 	write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE);
 	fsleep(250);
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] staging: fbtft: Replace udelay with usleep_range
  2026-07-14 19:09 [PATCH 0/3] staging/fbtft: Minor cleanups Panagiotis Gravias
  2026-07-14 19:09 ` [PATCH 1/3] staging/fbtft: Remove prohibited space before close parenthesis Panagiotis Gravias
  2026-07-14 19:09 ` [PATCH 2/3] staging/fbtft: Align arguments to match open parenthesis Panagiotis Gravias
@ 2026-07-14 19:09 ` Panagiotis Gravias
  2026-07-14 19:17   ` Andy Shevchenko
  2026-07-14 19:18 ` [PATCH 0/3] staging/fbtft: Minor cleanups Andy Shevchenko
  3 siblings, 1 reply; 8+ messages in thread
From: Panagiotis Gravias @ 2026-07-14 19:09 UTC (permalink / raw)
  To: andy, gregkh
  Cc: namcao, tomasz.unger, dri-devel, linux-fbdev, linux-staging,
	linux-kernel, Panagiotis Gravias

Fix checkpatch warnings preferring usleep_range over udelay.
Replaced udelay() calls with usleep_range() providing a reasonable
upper bound to allow the scheduler to coalesce timer interrupts.

Signed-off-by: Panagiotis Gravias <graviaspanagiotis1@gmail.com>
---
 drivers/staging/fbtft/fb_ra8875.c    |  4 ++--
 drivers/staging/fbtft/fb_upd161704.c | 18 +++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c
index 0ab1de6647d0..d2400bb44f1c 100644
--- a/drivers/staging/fbtft/fb_ra8875.c
+++ b/drivers/staging/fbtft/fb_ra8875.c
@@ -210,7 +210,7 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
 	}
 	len--;
 
-	udelay(100);
+	usleep_range(100, 200);
 
 	if (len) {
 		buf = (u8 *)par->buf;
@@ -231,7 +231,7 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
 
 	/* restore user spi-speed */
 	par->fbtftops.write = fbtft_write_spi;
-	udelay(100);
+	usleep_range(100, 200);
 }
 
 static int write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len)
diff --git a/drivers/staging/fbtft/fb_upd161704.c b/drivers/staging/fbtft/fb_upd161704.c
index c680160d6380..e26766f58a50 100644
--- a/drivers/staging/fbtft/fb_upd161704.c
+++ b/drivers/staging/fbtft/fb_upd161704.c
@@ -32,27 +32,27 @@ static int init_display(struct fbtft_par *par)
 
 	/* oscillator start */
 	write_reg(par, 0x003A, 0x0001);	/*Oscillator 0: stop, 1: operation */
-	udelay(100);
+	usleep_range(100, 200);
 
 	/* y-setting */
 	write_reg(par, 0x0024, 0x007B);	/* amplitude setting */
-	udelay(10);
+	usleep_range(10, 20);
 	write_reg(par, 0x0025, 0x003B);	/* amplitude setting */
 	write_reg(par, 0x0026, 0x0034);	/* amplitude setting */
-	udelay(10);
+	usleep_range(10, 20);
 	write_reg(par, 0x0027, 0x0004);	/* amplitude setting */
 	write_reg(par, 0x0052, 0x0025);	/* circuit setting 1 */
-	udelay(10);
+	usleep_range(10, 20);
 	write_reg(par, 0x0053, 0x0033);	/* circuit setting 2 */
 	write_reg(par, 0x0061, 0x001C);	/* adjustment V10 positive polarity */
-	udelay(10);
+	usleep_range(10, 20);
 	write_reg(par, 0x0062, 0x002C);	/* adjustment V9 negative polarity */
 	write_reg(par, 0x0063, 0x0022);	/* adjustment V34 positive polarity */
-	udelay(10);
+	usleep_range(10, 20);
 	write_reg(par, 0x0064, 0x0027);	/* adjustment V31 negative polarity */
-	udelay(10);
+	usleep_range(10, 20);
 	write_reg(par, 0x0065, 0x0014);	/* adjustment V61 negative polarity */
-	udelay(10);
+	usleep_range(10, 20);
 	write_reg(par, 0x0066, 0x0010);	/* adjustment V61 negative polarity */
 
 	/* Basical clock for 1 line (BASECOUNT[7:0]) number specified */
@@ -60,7 +60,7 @@ static int init_display(struct fbtft_par *par)
 
 	/* Power supply setting */
 	write_reg(par, 0x0019, 0x0000);	/* DC/DC output setting */
-	udelay(200);
+	usleep_range(200, 300);
 	write_reg(par, 0x001A, 0x1000);	/* DC/DC frequency setting */
 	write_reg(par, 0x001B, 0x0023);	/* DC/DC rising setting */
 	write_reg(par, 0x001C, 0x0C01);	/* Regulator voltage setting */
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] staging/fbtft: Remove prohibited space before close parenthesis
  2026-07-14 19:09 ` [PATCH 1/3] staging/fbtft: Remove prohibited space before close parenthesis Panagiotis Gravias
@ 2026-07-14 19:16   ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-07-14 19:16 UTC (permalink / raw)
  To: Panagiotis Gravias
  Cc: andy, gregkh, namcao, tomasz.unger, dri-devel, linux-fbdev,
	linux-staging, linux-kernel

On Tue, Jul 14, 2026 at 10:09:40PM +0300, Panagiotis Gravias wrote:
> Fix checkpatch error: "space prohibited before that close parenthesis"
> in the define_fbtft_write_reg macro.

NAK.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] staging/fbtft: Align arguments to match open parenthesis
  2026-07-14 19:09 ` [PATCH 2/3] staging/fbtft: Align arguments to match open parenthesis Panagiotis Gravias
@ 2026-07-14 19:16   ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-07-14 19:16 UTC (permalink / raw)
  To: Panagiotis Gravias
  Cc: andy, gregkh, namcao, tomasz.unger, dri-devel, linux-fbdev,
	linux-staging, linux-kernel

On Tue, Jul 14, 2026 at 10:09:41PM +0300, Panagiotis Gravias wrote:
> Fix checkpatch warning for alignment in write_reg() call to match
> the open parenthesis, improving code readability.

NAK.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] staging: fbtft: Replace udelay with usleep_range
  2026-07-14 19:09 ` [PATCH 3/3] staging: fbtft: Replace udelay with usleep_range Panagiotis Gravias
@ 2026-07-14 19:17   ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-07-14 19:17 UTC (permalink / raw)
  To: Panagiotis Gravias
  Cc: andy, gregkh, namcao, tomasz.unger, dri-devel, linux-fbdev,
	linux-staging, linux-kernel

On Tue, Jul 14, 2026 at 10:09:42PM +0300, Panagiotis Gravias wrote:
> Fix checkpatch warnings preferring usleep_range over udelay.
> Replaced udelay() calls with usleep_range() providing a reasonable
> upper bound to allow the scheduler to coalesce timer interrupts.

NAK.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] staging/fbtft: Minor cleanups.
  2026-07-14 19:09 [PATCH 0/3] staging/fbtft: Minor cleanups Panagiotis Gravias
                   ` (2 preceding siblings ...)
  2026-07-14 19:09 ` [PATCH 3/3] staging: fbtft: Replace udelay with usleep_range Panagiotis Gravias
@ 2026-07-14 19:18 ` Andy Shevchenko
  3 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-07-14 19:18 UTC (permalink / raw)
  To: Panagiotis Gravias
  Cc: andy, gregkh, namcao, tomasz.unger, dri-devel, linux-fbdev,
	linux-staging, linux-kernel

On Tue, Jul 14, 2026 at 10:09:38PM +0300, Panagiotis Gravias wrote:
> Solved some style errors,
> parenthesis spacing, aligning arguments, replacing udelay() with
> usleep_range().
> 
> I hope this makes future checks with the style script cleaner and more
> helpfull.

To understand the resolution, read the mailing list archives for
the last ~6-9 months against this driver.

Also read and understand README in the folder of the driver.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-07-14 19:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14 19:09 [PATCH 0/3] staging/fbtft: Minor cleanups Panagiotis Gravias
2026-07-14 19:09 ` [PATCH 1/3] staging/fbtft: Remove prohibited space before close parenthesis Panagiotis Gravias
2026-07-14 19:16   ` Andy Shevchenko
2026-07-14 19:09 ` [PATCH 2/3] staging/fbtft: Align arguments to match open parenthesis Panagiotis Gravias
2026-07-14 19:16   ` Andy Shevchenko
2026-07-14 19:09 ` [PATCH 3/3] staging: fbtft: Replace udelay with usleep_range Panagiotis Gravias
2026-07-14 19:17   ` Andy Shevchenko
2026-07-14 19:18 ` [PATCH 0/3] staging/fbtft: Minor cleanups Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox