mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: fbtft: Replace mdelay() with msleep() and usleep_range()
Date: Fri, 27 Jul 2018 19:43:28 +0800	[thread overview]
Message-ID: <6ed64d7e-2899-ac18-78ed-508d14abf845@gmail.com> (raw)
In-Reply-To: <CAHp75VdMQ2Cx+0cH8PuM8t8i2NgphxEqU4g86y5Hgwi1_CQ9zQ@mail.gmail.com>



On 2018/7/27 18:34, Andy Shevchenko wrote:
> On Fri, Jul 27, 2018 at 12:21 PM, Jia-Ju Bai <baijiaju1990@gmail.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

      reply	other threads:[~2018-07-27 11:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27  9:21 Jia-Ju Bai
2018-07-27 10:34 ` Andy Shevchenko
2018-07-27 11:43   ` Jia-Ju Bai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ed64d7e-2899-ac18-78ed-508d14abf845@gmail.com \
    --to=baijiaju1990@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®