Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3034231pxk; Mon, 7 Sep 2020 00:46:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhLekKusQZVhqJcjEyBXbF6MVt9zZqYvpaa5/4LpWoNlqGF04hLfpcjz3480sxt5++SzBi X-Received: by 2002:aa7:ce97:: with SMTP id y23mr20874597edv.128.1599464814393; Mon, 07 Sep 2020 00:46:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599464814; cv=none; d=google.com; s=arc-20160816; b=UQAXgk1i2zSr316jaFs8PkbVGGMc/0g/Yv5nHBgT4JQOYVuwHvcVq1u0lGzIK8UwoJ pk/NGCs7tgLjpXcvE4tKvIAlkS6uML53nUcBYsZotPulCgmAul5cmubY5VPflT6S+8FS ukL7lZVa+Q+Y4c2pGq5PE5GjHUmNGhS9wjUNEm2CysLytof5nD6Q4fTJxstLYzNw0/AA JxKcsd0jG8vb7tns1yIAAQ81oDYKaxWQR53hGbT1knI+yO8k6OhF6Be+UTqPvPA14mGy ES5HUcIEzYJz/8XFn1/nKedRpZDBPy7/gCd3c9fHIhdhRMx8gFwcSa9cy+6/XLx3f5qL cVyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=AmS+WX8v56KPRE3mouK3hpLz1cGRz9Qs6+RZ7w+4DVc=; b=ZcDfKA6HKpMdxXFY3uj2W6ymh4A4KUfNeR7h9YoHaKTJBNQZ4cQ15QoScRFsABI5Yx hYvE8f8dsiOHX55vSMad+ed79YOCkMqZy1xGsq0AR5CiUheLyR0B48Tr33QKqP7EUg8I Kr/JMwSRSrT7gW6SFzWb/5EnLUuAbrdTo2FznzMCIGEWq8Ew1wUXHzGco83vnIiDY0yl gEo9ziWuwByvBu0yQZH7NfqWRXrn2MYDmBoTh4J4w4klK82/LCXyyQnFKIUVimFFz61/ 0E5A9LnlKo9E1zOxRdfinReTx8ER4xIch5lMz9Y0XkVt3HNmktt0FW4gLlpx5uosLhp8 1sDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si11839435edb.127.2020.09.07.00.46.32; Mon, 07 Sep 2020 00:46:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727773AbgIGHpU (ORCPT + 99 others); Mon, 7 Sep 2020 03:45:20 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:44363 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726896AbgIGHpN (ORCPT ); Mon, 7 Sep 2020 03:45:13 -0400 X-Originating-IP: 93.34.118.233 Received: from uno.localdomain (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id E04B1C0014; Mon, 7 Sep 2020 07:45:06 +0000 (UTC) Date: Mon, 7 Sep 2020 09:48:54 +0200 From: Jacopo Mondi To: Sowjanya Komatineni Cc: thierry.reding@gmail.com, jonathanh@nvidia.com, sakari.ailus@iki.fi, hverkuil@xs4all.nl, jacopo+renesas@jmondi.org, luca@lucaceresoli.net, leonl@leopardimaging.com, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 3/3] media: i2c: imx274: Add IMX274 power on and off sequence Message-ID: <20200907074854.uxq4a76k5amjfopi@uno.localdomain> References: <1599012278-10203-1-git-send-email-skomatineni@nvidia.com> <1599012278-10203-4-git-send-email-skomatineni@nvidia.com> <20200903144713.fyhmhs2bfcz5br6d@uno.localdomain> <094073f1-ef58-a2fd-bed4-7fa3b99dd120@nvidia.com> <20200904085552.5xddn2kecoktuesg@uno.localdomain> <5ebe8d22-86fb-7bf2-ab19-e729caf8d88f@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5ebe8d22-86fb-7bf2-ab19-e729caf8d88f@nvidia.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Fri, Sep 04, 2020 at 10:04:10AM -0700, Sowjanya Komatineni wrote: > > On 9/4/20 1:55 AM, Jacopo Mondi wrote: > > > > usleep_range() allows you to provide an interval in which your timeout > > > > can be coalesced with others. Giving a [1usec, 2usec] range kind of > > > > defeat the purpose. And most than everything, does sleeping for 2usec > > > > serve any real purpose ? > > > Following delay recommendation from DS for power on sequence. > > > > > 2 useconds ? Seems very short:) > > > As per IMX274 datasheet for power on sequence, 100ns is the min wait time > after the last power supply of 1v8/1v2/2v8 is ON before releasing RESET > high. ook.. well, it's actually reasonable, it's just the time for the regulators to ramp up, I initially thought it was the time for the chip to exit reset. Let me be a bit more picky and ask if you have considered busy waiting on such a small sleep interval by using udelay. Again, as this happens at chip power on only, the impact on the system of mis-using usleep_range() is negligible, but according to documentation: SLEEPING FOR "A FEW" USECS ( < ~10us? ): * Use udelay - Why not usleep? On slower systems, (embedded, OR perhaps a speed- stepped PC!) the overhead of setting up the hrtimers for usleep *may* not be worth it. Such an evaluation will obviously depend on your specific situation, but it is something to be aware of. Up to you, really! Thanks j