Skip to contentSkip to conversation

FBTFT: Changed delay function.

PATCH In review Rama Kumar 2 participants 2 messages Nov 3, 2019

Subsystems (2)
lore
Share & tools
lore

Rama Kumar

author
#0 lore raw

PATCH 1/1 FBTFT: Changed delay function.

Hi,

Changed udelay() to usleep_range() based on the document in the path, "Documentation/timers/timers-howto.rst". It was suggested to use usleep_range() function for sleeping duration between 10us - 20 ms. original code used udelay() for sleeping 20 us.

---
drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_agm1264k-fl.c +1 -1
index eeeeec97ad27..471a145e3c00 100644
@@ -85,7 +85,7 @@ static void reset(struct fbtft_par *par)
 	dev_dbg(par->info->device, "%s()\n", __func__);
 
 	gpiod_set_value(par->gpio.reset, 0);
-	udelay(20);
+	usleep_range(20,20);
 	gpiod_set_value(par->gpio.reset, 1);
 	mdelay(120);
 }
Signature · 6 lines
Signed-off-by: Rama Kumar <[email protected]>

Thanks,
Rama Kumar

2.17.1
maintainer
#1 lore raw
Quoted 24 lines · Rama Kumar

Hi,

Changed udelay() to usleep_range() based on the document in the path, "Documentation/timers/timers-howto.rst". It was suggested to use usleep_range() function for sleeping duration between 10us - 20 ms. original code used udelay() for sleeping 20 us.

---
drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_agm1264k-fl.c +1 -1
index eeeeec97ad27..471a145e3c00 100644
@@ -85,7 +85,7 @@ static void reset(struct fbtft_par *par)
 	dev_dbg(par->info->device, "%s()\n", __func__);
 
 	gpiod_set_value(par->gpio.reset, 0);
-	udelay(20);
+	usleep_range(20,20);
 	gpiod_set_value(par->gpio.reset, 1);
 	mdelay(120);
 }
Signature · 1 line
Signed-off-by: Rama Kumar <[email protected]>

Always run checkptch.pl on patches you send out so you don't get grumpy maintainers telling you to run checkpatch.pl on your patch :)

thanks,

greg k-h