From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0EDAC43331 for ; Sat, 7 Sep 2019 03:58:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 960C3208C3 for ; Sat, 7 Sep 2019 03:58:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WA4AE3jB"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="a+4E7MF0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 960C3208C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0UIPvmMQ+VR5UnzM3R7mvqHz9ficXSl2AVAqRmu1kJU=; b=WA4AE3jBNwkn3w v69jf7gmDetr6ngykWpj95QJCWzSW98oliLIQmvP/fJHqNa7hWGskzA58Lbi1bklmamgaqqFag/Iy KbPIp7qV3cR7JIQepVtIp/fhBOWBZNhpiIhDwe7OLn1TCy6KRp6MBKF5KZxpdkzPgBsNHcZMoSyWF /JZzEsMUA8FSIWNlKdK9wi5VCnEgtbqJvyzaxe5O8XXHWLlAABL0lI1baH5sV7w/6T/qF1H07hKCi eQMMf46jNIjqx2DklnYNd5BXGh9fwElWXb8ZL1bOykEU5BSu7Tih7dEQU8Uzrpnfkt3ANzObsgRT4 Q+9nlUicNR1+xeiWI1gQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i6Rrc-0000OZ-0k; Sat, 07 Sep 2019 03:58:16 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i6RrZ-0000O5-4p for linux-arm-kernel@lists.infradead.org; Sat, 07 Sep 2019 03:58:14 +0000 Received: by mail-ed1-x542.google.com with SMTP id a23so6152228edv.5 for ; Fri, 06 Sep 2019 20:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z8g/yuEAbsV3RHz2NFoSIRvhRhOGryUeAZNMBK0KH30=; b=a+4E7MF06twSs/byvYx7TYHU2ZXGvTdd/OretEjRgUWdyZOpoUAB4C/xMHxHRG1sxr IothwulEFXzhDLIrDy6sZJcxPDDPL3B4Oc1/8ym/YU4fmlo/qep0VnTLwg8apEOcikaw CUwEUXBXVrl6aIAN1UqMhm3tqqogBokpZg6j4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z8g/yuEAbsV3RHz2NFoSIRvhRhOGryUeAZNMBK0KH30=; b=Cq130vrRslZjRNuMJd0vqFytpM5aLHSILnozJOYeWoli0dp2+ptkQ2YQc78Ha837Xt d295//rwIMxuswN41w3LWGK278k+ujNopigltCKdb6Etwv+aDjNqn6ogucFQsDUY4DLt rgseSvxPxbL1Vzhshh4QZnwYRYyg3emWvg6uANvyTKOYafWFa7mw0lxKUqALprgTk1Wz nEYAfvJGyqXir1/vK6ATEhgx6z90BLB2Ei9VqYe7Amy1yeylWF3m3s2DmPsPuRCObtsu UQJzCYZiiyTiyOH4BtPZ5NMLZX1/8B7VysVqMrAvK8tHO0jq35rcxejNZsZ6318gVtEX u8rA== X-Gm-Message-State: APjAAAUJ2zjC4IZock4G27qxWhYHRftPiwsvppGv0cGt0PvWIH8rGp7D gr9NMKyXLzzTZjEsrITTgCz421ziUndOkw== X-Google-Smtp-Source: APXvYqw7BvZnJSPdZxiapGejlx9ETIiXRdq9imuW0eAha66sgpPPxsyBVZkyKbasCirnznCTUCWKrA== X-Received: by 2002:a17:906:c7d0:: with SMTP id dc16mr10201884ejb.30.1567828691557; Fri, 06 Sep 2019 20:58:11 -0700 (PDT) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com. [209.85.128.51]) by smtp.gmail.com with ESMTPSA id l10sm1364833edd.5.2019.09.06.20.58.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Sep 2019 20:58:11 -0700 (PDT) Received: by mail-wm1-f51.google.com with SMTP id c10so8374139wmc.0 for ; Fri, 06 Sep 2019 20:58:11 -0700 (PDT) X-Received: by 2002:a1c:c104:: with SMTP id r4mr4712727wmf.64.1567828296905; Fri, 06 Sep 2019 20:51:36 -0700 (PDT) MIME-Version: 1.0 References: <20190819034331.13098-1-dongchun.zhu@mediatek.com> <20190819034331.13098-3-dongchun.zhu@mediatek.com> <20190819083009.GC6133@paasikivi.fi.intel.com> <1567676465.21623.100.camel@mhfsdcap03> <20190905104546.GA5475@paasikivi.fi.intel.com> <20190905160512.GG5475@paasikivi.fi.intel.com> <1567733585.21623.163.camel@mhfsdcap03> In-Reply-To: <1567733585.21623.163.camel@mhfsdcap03> From: Tomasz Figa Date: Sat, 7 Sep 2019 12:51:23 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [V3, 2/2] media: i2c: Add Omnivision OV02A10 camera sensor driver To: Dongchun Zhu X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190906_205813_186663_AF16E0FF X-CRM114-Status: GOOD ( 18.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Nicolas Boichat , srv_heupstream , shengnan.wang@mediatek.com, Louis Kuo , Sj Huang , Rob Herring , "moderated list:ARM/Mediatek SoC support" , Sakari Ailus , Matthias Brugger , Cao Bing Bu , Mauro Carvalho Chehab , "list@263.net:IOMMU DRIVERS , Joerg Roedel , " , Linux Media Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 6, 2019 at 10:33 AM Dongchun Zhu wrote: > > On Fri, 2019-09-06 at 06:58 +0800, Nicolas Boichat wrote: > > On Fri, Sep 6, 2019 at 12:05 AM Sakari Ailus > > wrote: > > > > > > On Thu, Sep 05, 2019 at 07:53:37PM +0900, Tomasz Figa wrote: > > > > On Thu, Sep 5, 2019 at 7:45 PM Sakari Ailus > > > > wrote: > > > > > > > > > > Hi Dongchun, > > > > > > > > > > On Thu, Sep 05, 2019 at 05:41:05PM +0800, Dongchun Zhu wrote: > > > > > > > > > > ... > > > > > > > > > > > > > + ret = regulator_bulk_enable(OV02A10_NUM_SUPPLIES, ov02a10->supplies); > > > > > > > > + if (ret < 0) { > > > > > > > > + dev_err(dev, "Failed to enable regulators\n"); > > > > > > > > + goto disable_clk; > > > > > > > > + } > > > > > > > > + msleep_range(7); > > > > > > > > > > > > > > This has some potential of clashing with more generic functions in the > > > > > > > future. Please use usleep_range directly, or msleep. > > > > > > > > > > > > > > > > > > > Did you mean using usleep_range(7*1000, 8*1000), as used in patch v1? > > > > > > https://patchwork.kernel.org/patch/10957225/ > > > > > > > > > > Yes, please. > > > > > > > > Why not just msleep()? > > > > > > msleep() is usually less accurate. I'm not sure it makes a big different in > > > this case. Perhaps, if someone wants that the sensor is powered on and > > > streaming as soon as possible. > > > > https://elixir.bootlin.com/linux/latest/source/Documentation/timers/timers-howto.txt#L70 > > > > Use usleep_range for delays up to 20ms (at least that's what the > > documentation (still) says?) > > > > Thank you for your clarifications. > From the doc, > "msleep(1~20) may not do what the caller intends, and > will often sleep longer (~20 ms actual sleep for any > value given in the 1~20ms range). In many cases this > is not the desired behavior." > > So, it is supposed to use usleep_range in shorter sleep case, > such as 5ms. Thanks for double checking. usleep_range() sounds good then. Sorry for the noise. Best regards, Tomasz _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel