[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6ed64d7e-2899-ac18-78ed-508d14abf845@gmail.com>
Date: Fri, 27 Jul 2018 19:43:28 +0800
From: Jia-Ju Bai <baijiaju1990@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: fbtft: Replace mdelay() with msleep() and
usleep_range()
On 2018/7/27 18:34, Andy Shevchenko wrote:
> On Fri, Jul 27, 2018 at 12:21 PM, Jia-Ju Bai <baijiaju1990@...il.com> wrote:
>> reset() and init_display() are never called in atomic context.
>> They call mdelay() to busily wait, which is not necessary.
>> mdelay() can be replaced with msleep().
>> gpio_set_value(par->gpio.reset, 0);
>> udelay(20);
>> gpio_set_value(par->gpio.reset, 1);
>> - mdelay(120);
>> + msleep(120);
> I didn't look to the rest, but this one will be inconsistent after your patch.
>
> The question here is why udelay() is needed, while mdelay() changed?
>
I thought udelay() is used for short delay, so it is not very necessary
to change udelay() to usleep_range().
mdelay() is used for longer delay, so I changed it to msleep().
If you think udelay() should be also changed, I can send a new patch :)
Best wishes,
Jia-Ju Bai
Powered by blists - more mailing lists