Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp641569imm; Fri, 27 Jul 2018 03:36:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdOj7R9k+JG1/9aI5Z4GJQlLO+FOoNSXoGWbPMGrYYMfHuwTXceYDMIi7wJ8oZAOpHBwgeZ X-Received: by 2002:aa7:84c2:: with SMTP id x2-v6mr6072412pfn.220.1532687775538; Fri, 27 Jul 2018 03:36:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532687775; cv=none; d=google.com; s=arc-20160816; b=iU7VZQPfqb/Q4bxb7RDThwpN+5X9zqo6FWsorVbSuekUbDFrbb204UOm9El7bvd8d9 LAL5vCsZaY0JJZD9eA0kmvpu2cvd+HiBFJzW/20Q7t5O/j3JaUYiQTpKt+QE64CcO26P GfaLac2Y8gTLgEYsiIzexx9rHSiNIPOzxL3lsqG6A8elXOaom0FC8xOHm662klnX3HT6 o/8q7blE+NfUHUFlYAVfaJHROuIqrRjMVDIxi/bLOssbhMTxpRoujesnAcac/q2pUyI/ ipLxe2rC0KUPtxX8oXPKivHXDTB23ryLBkK6K6mvyTtiwK3/jhoW5innmvWDEx7W3fVC oYsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=UjF6nTwgsEbX/QP2fzgeHH0/EecAJjQ7huBNdi5RP0E=; b=vwghRjCukdoYyO6ns3G+YiicwmAEW6BLz2DhXSXgO4XQyZB0l59Csd523ixIk1RUn/ xsMMPjNA3tAarPrRzUZU4D80FAJEkV6vmMJ2jb8tHbkdKLzliEu5LYJ8fzHZ7kdj+VKG Mvp+AdKcJZCT1yA6uHpemx97PNjmwAtboXOxcSNjDpWqx6pcGez26TPCgiCAM8DAQFeH MEH057ha9XuyrTDHc79eZsgyHre/j0aMZU82kxqGJUwls3EWmjJ8z85zVnMW0uizVFsY FfBv2TjuCOed8RTkyuconsp4EuECnyRkn06ReWC8hGQqgMlpfhaZdAoZdX0xxl7OWtgY mi6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=liJX55vo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c16-v6si3183198pgw.460.2018.07.27.03.36.00; Fri, 27 Jul 2018 03:36:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=liJX55vo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730590AbeG0L4I (ORCPT + 99 others); Fri, 27 Jul 2018 07:56:08 -0400 Received: from mail-vk0-f66.google.com ([209.85.213.66]:34172 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730026AbeG0L4I (ORCPT ); Fri, 27 Jul 2018 07:56:08 -0400 Received: by mail-vk0-f66.google.com with SMTP id l143-v6so2227131vke.1 for ; Fri, 27 Jul 2018 03:34:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UjF6nTwgsEbX/QP2fzgeHH0/EecAJjQ7huBNdi5RP0E=; b=liJX55volULUwtHV6jeJbxB6u68k24taE4sL2uAnXB70g5o8vQvzVFnZ2fVwmBD+cN gFKuq3cRZDszoW/hq/VBJrUfCgxrXu2pvSpaKc+Q+Ak4fp1PqeGRO+Yso5q3dnK2LgEF Gk243TfGOQgjX5kXOvZ6qEtxfze0mH2k+s8t4dtah+uPLZcO3BiMugjaAOCiNrcVBJgy UjK6irdny1i/1+aZc5LLIyXMWVuCo8n4QhOV22RRk4wEe3xFgmtYbUislhhjyW76sRp3 eOoT9G696ApwA1iOsF7V3nGe1ZJk5hnlPpQoTvHYqrR6Z2m9qWkTkDFGTtZfySpbuSrj e7Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UjF6nTwgsEbX/QP2fzgeHH0/EecAJjQ7huBNdi5RP0E=; b=FkR74+5FYr5vM3NZXzqKOYK8b7but7ZfMkb8vM7ZepMwUuqzCXLtwS4Mp3pja+b5e7 JWU6j6mff9XERUTNjt96n6XIb3PSj0gFB8ryDK1wYnpqZhVQ4akts/OFadj7pES9wD5I uRgNI/uYUjFXBA6A748aa6Y6IgoM5Z/UmkXPajUiQZ8pT/eZi4qwknZ27998P1F/NjBd f2v+JYkn7ubUO9Plm7Oo6fB4Zya/JJxGpFz5VrIhPBlYXdI5xo1SBYhikgPJgy8lG6aN RRFCDp/FNafudFxm7qRHff+69AdDTaDzhk2l8kGFn2uapUG8s114jKegNtcQ4Vb9EtUp BbbQ== X-Gm-Message-State: AOUpUlG15mkhEZjO9yJk3IyoWSWSMRyODM/WMYigcD78tkgFvxXUmo+z 5p/D7V3GpyaF347S3KYydtd+2usVJZ5e1yj1Z9I= X-Received: by 2002:a1f:4c7:: with SMTP id 190-v6mr3496407vke.63.1532687689421; Fri, 27 Jul 2018 03:34:49 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Fri, 27 Jul 2018 03:34:48 -0700 (PDT) In-Reply-To: <20180727092111.7218-1-baijiaju1990@gmail.com> References: <20180727092111.7218-1-baijiaju1990@gmail.com> From: Andy Shevchenko Date: Fri, 27 Jul 2018 13:34:48 +0300 Message-ID: Subject: Re: [PATCH] staging: fbtft: Replace mdelay() with msleep() and usleep_range() To: Jia-Ju Bai Cc: Thomas Petazzoni , Greg Kroah-Hartman , devel@driverdev.osuosl.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 27, 2018 at 12:21 PM, Jia-Ju Bai 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? -- With Best Regards, Andy Shevchenko